diff --git a/admin-dev/themes/default/css/vendor/index.php b/admin-dev/themes/default/css/vendor/index.php new file mode 100755 index 000000000..f42f03e4d --- /dev/null +++ b/admin-dev/themes/default/css/vendor/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/admin-dev/themes/default/css/nv.d3.css b/admin-dev/themes/default/css/vendor/nv.d3.css similarity index 100% rename from admin-dev/themes/default/css/nv.d3.css rename to admin-dev/themes/default/css/vendor/nv.d3.css diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index c0d88ac1a..64dd7eaee 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -1917,6 +1917,14 @@ class AdminControllerCore extends Controller $this->helper = $helper; } + + public function setDeprecatedMedia() + { + $admin_webpath = str_ireplace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_); + $admin_webpath = preg_replace('/^'.preg_quote(DIRECTORY_SEPARATOR, '/').'/', '', $admin_webpath); + $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-bootstrap-reset.css', 'all'); + $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-old.css', 'all'); + } public function setMedia() { @@ -1927,14 +1935,10 @@ class AdminControllerCore extends Controller $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/admin-theme.css', 'all'); // Deprecated stylesheets + reset bootstrap style for the #nobootstrap field - Backward compatibility - //if (!$this->bootstrap) - //{ - $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-bootstrap-reset.css', 'all'); - $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-old.css', 'all'); - - //} + if (!$this->bootstrap) + $this->setDeprecatedMedia(); - //todo csss for rtl support + //todo css for rtl support if ($this->context->language->is_rtl) $this->addCSS(_THEME_CSS_DIR_.'rtl.css'); diff --git a/controllers/admin/AdminDashboardController.php b/controllers/admin/AdminDashboardController.php index c006fa09a..58d502113 100644 --- a/controllers/admin/AdminDashboardController.php +++ b/controllers/admin/AdminDashboardController.php @@ -49,7 +49,7 @@ class AdminDashboardControllerCore extends AdminController _PS_JS_DIR_.'/admin-dashboard.js', )); $this->addCSS(array( - __PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/nv.d3.css', + __PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/vendor/nv.d3.css', )); } diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 9ef2ab135..398ff4a7c 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -694,6 +694,8 @@ class AdminModulesControllerCore extends AdminController if ($key == 'configure' && Module::isInstalled($module->name)) { $this->bootstrap = (isset($module->bootstrap) && $module->bootstrap); + if (!$this->bootstrap) + $this->setDeprecatedMedia(); if (isset($module->multishop_context)) $this->multishop_context = $module->multishop_context; diff --git a/modules/gapi/gapi.php b/modules/gapi/gapi.php index 42e12d10f..a5d2f8994 100644 --- a/modules/gapi/gapi.php +++ b/modules/gapi/gapi.php @@ -36,6 +36,7 @@ class Gapi extends Module $this->version = 0.9; $this->author = 'PrestaShop'; $this->need_instance = 0; + $this->bootstrap = true; parent::__construct(); diff --git a/modules/graphnvd3/graphnvd3.php b/modules/graphnvd3/graphnvd3.php index 8e8112ebb..0b33cad20 100644 --- a/modules/graphnvd3/graphnvd3.php +++ b/modules/graphnvd3/graphnvd3.php @@ -66,7 +66,7 @@ class GraphNvD3 extends ModuleGraphEngine _PS_JS_DIR_.'/vendor/d3.js', __PS_BASE_URI__.$admin_webpath.'/themes/'.$this->context->employee->bo_theme.'/js/vendor/nv.d3.min.js', )); - $this->context->controller->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->context->employee->bo_theme.'/css/nv.d3.css'); + $this->context->controller->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->context->employee->bo_theme.'/css/vendor/nv.d3.css'); } public static function hookGraphEngine($params, $drawer)