diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php index ab8a7021b..e6b387d7b 100644 --- a/controllers/front/CategoryController.php +++ b/controllers/front/CategoryController.php @@ -36,15 +36,19 @@ class CategoryControllerCore extends FrontController public function setMedia() { parent::setMedia(); - //TODO : check why cluetip css is include without js file - $this->addCSS(array( - _THEME_CSS_DIR_.'scenes.css' => 'all', - _THEME_CSS_DIR_.'category.css' => 'all', - _THEME_CSS_DIR_.'product_list.css' => 'all', - )); - if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) - $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + if ($this->context->getMobileDevice() == false) + { + //TODO : check why cluetip css is include without js file + $this->addCSS(array( + _THEME_CSS_DIR_.'scenes.css' => 'all', + _THEME_CSS_DIR_.'category.css' => 'all', + _THEME_CSS_DIR_.'product_list.css' => 'all', + )); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } } public function canonicalRedirection($canonicalURL = '') diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 5b49f343e..53b752a95 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -135,17 +135,20 @@ class ParentOrderControllerCore extends FrontController { parent::setMedia(); - // Adding CSS style sheet - $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); - // Adding JS files - $this->addJS(_THEME_JS_DIR_.'tools.js'); - if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Tools::getValue('step') == 1) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) - $this->addJS(_THEME_JS_DIR_.'order-address.js'); - $this->addJqueryPlugin('fancybox'); - if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + if ($this->context->getMobileDevice() == false) { - $this->addJS(_THEME_JS_DIR_.'cart-summary.js'); - $this->addJqueryPlugin('typewatch'); + // Adding CSS style sheet + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + // Adding JS files + $this->addJS(_THEME_JS_DIR_.'tools.js'); + if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Tools::getValue('step') == 1) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + $this->addJS(_THEME_JS_DIR_.'order-address.js'); + $this->addJqueryPlugin('fancybox'); + if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + { + $this->addJS(_THEME_JS_DIR_.'cart-summary.js'); + $this->addJqueryPlugin('typewatch'); + } } } diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php index ad56a97dc..f040f59c0 100644 --- a/modules/blockreinsurance/blockreinsurance.php +++ b/modules/blockreinsurance/blockreinsurance.php @@ -315,11 +315,14 @@ class Blockreinsurance extends Module $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; return $helper; - } public function hookFooter($params) { + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + $this->context->controller->addCSS($this->_path.'style.css', 'all'); $infos = $this->getListContent($this->context->language->id); $this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos))); diff --git a/modules/homeslider/homeslider.php b/modules/homeslider/homeslider.php index 005a7c19e..c698afbc1 100644 --- a/modules/homeslider/homeslider.php +++ b/modules/homeslider/homeslider.php @@ -648,6 +648,10 @@ class HomeSlider extends Module if(!$this->_prepareHook()) return; + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); $this->context->controller->addCSS($this->_path.'bx_styles.css'); $this->context->controller->addJS($this->_path.'js/homeslider.js');