[-] FO : mobile theme : fix #PSCFV-4275 : delete calls to css and js not used
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17498 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -36,6 +36,9 @@ class CategoryControllerCore extends FrontController
|
|||||||
public function setMedia()
|
public function setMedia()
|
||||||
{
|
{
|
||||||
parent::setMedia();
|
parent::setMedia();
|
||||||
|
|
||||||
|
if ($this->context->getMobileDevice() == false)
|
||||||
|
{
|
||||||
//TODO : check why cluetip css is include without js file
|
//TODO : check why cluetip css is include without js file
|
||||||
$this->addCSS(array(
|
$this->addCSS(array(
|
||||||
_THEME_CSS_DIR_.'scenes.css' => 'all',
|
_THEME_CSS_DIR_.'scenes.css' => 'all',
|
||||||
@@ -46,6 +49,7 @@ class CategoryControllerCore extends FrontController
|
|||||||
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
|
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
|
||||||
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
|
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function canonicalRedirection($canonicalURL = '')
|
public function canonicalRedirection($canonicalURL = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
parent::setMedia();
|
parent::setMedia();
|
||||||
|
|
||||||
|
if ($this->context->getMobileDevice() == false)
|
||||||
|
{
|
||||||
// Adding CSS style sheet
|
// Adding CSS style sheet
|
||||||
$this->addCSS(_THEME_CSS_DIR_.'addresses.css');
|
$this->addCSS(_THEME_CSS_DIR_.'addresses.css');
|
||||||
// Adding JS files
|
// Adding JS files
|
||||||
@@ -148,6 +150,7 @@ class ParentOrderControllerCore extends FrontController
|
|||||||
$this->addJqueryPlugin('typewatch');
|
$this->addJqueryPlugin('typewatch');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if order is free
|
* Check if order is free
|
||||||
|
|||||||
@@ -315,11 +315,14 @@ class Blockreinsurance extends Module
|
|||||||
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
$helper->token = Tools::getAdminTokenLite('AdminModules');
|
||||||
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
|
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
|
||||||
return $helper;
|
return $helper;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hookFooter($params)
|
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');
|
$this->context->controller->addCSS($this->_path.'style.css', 'all');
|
||||||
$infos = $this->getListContent($this->context->language->id);
|
$infos = $this->getListContent($this->context->language->id);
|
||||||
$this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos)));
|
$this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos)));
|
||||||
|
|||||||
@@ -648,6 +648,10 @@ class HomeSlider extends Module
|
|||||||
if(!$this->_prepareHook())
|
if(!$this->_prepareHook())
|
||||||
return;
|
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->addJS($this->_path.'js/jquery.bxSlider.min.js');
|
||||||
$this->context->controller->addCSS($this->_path.'bx_styles.css');
|
$this->context->controller->addCSS($this->_path.'bx_styles.css');
|
||||||
$this->context->controller->addJS($this->_path.'js/homeslider.js');
|
$this->context->controller->addJS($this->_path.'js/homeslider.js');
|
||||||
|
|||||||
Reference in New Issue
Block a user