[+] Classes : added new class Media => It contains all the method related to media like CSS, JS
[+] Classes : added new method Media::addJquery(), Media::addJqueryUI(), Media::addJqueryPlugin() [~] Deprecated : All method related to CCC has been moved in class Media git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8926 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1052,10 +1052,9 @@ class BlockLayered extends Module
|
||||
if (!empty($metaKeyWordsComplement))
|
||||
$smarty->assign('meta_keywords', rtrim($categoryTitle.', '.$metaKeyWordsComplement.', '.$categoryMetas['meta_keywords'], ', '));
|
||||
|
||||
Tools::addJS(($this->_path).'blocklayered.js');
|
||||
Tools::addJS(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js');
|
||||
Tools::addCSS(_PS_CSS_DIR_.'jquery-ui-1.8.10.custom.css', 'all');
|
||||
Tools::addCSS(($this->_path).'blocklayered.css', 'all');
|
||||
$this->context->controller->addJs($this->_path.'blocklayered.js');
|
||||
$this->context->controller->addJqueryUI('ui.slider');
|
||||
$this->context->controller->addCSS($this->_path.'blocklayered.css', 'all');
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
@@ -1923,7 +1922,7 @@ class BlockLayered extends Module
|
||||
}
|
||||
}
|
||||
|
||||
$idCurrency = Currency::getCurrent()->id;
|
||||
$idCurrency = (int)$this->context->currency->id;;
|
||||
$priceFilterQueryIn = ''; // All products with price range between price filters limits
|
||||
$priceFilterQueryOut = ''; // All products with a price filters limit on it price range
|
||||
if (isset($priceFilter) && $priceFilter)
|
||||
@@ -2164,7 +2163,7 @@ class BlockLayered extends Module
|
||||
{
|
||||
case 'price':
|
||||
$priceArray = array('type_lite' => 'price', 'type' => 'price', 'id_key' => 0, 'name' => $this->l('Price'),
|
||||
'slider' => true, 'max' => '0', 'min' => null, 'values' => array ('1' => 0), 'unit' => Currency::getCurrent()->sign);
|
||||
'slider' => true, 'max' => '0', 'min' => null, 'values' => array ('1' => 0), 'unit' => (int)$this->context->currency->sign);
|
||||
if (isset($products) && $products)
|
||||
foreach ($products as $product)
|
||||
{
|
||||
@@ -2477,18 +2476,17 @@ class BlockLayered extends Module
|
||||
|
||||
private static function getPriceFilterSubQuery($filterValue)
|
||||
{
|
||||
$idCurrency = (int)Currency::getCurrent()->id;
|
||||
$idCurrency = (int)Context::getContext()->currency->id;
|
||||
$priceFilterQuery = '';
|
||||
if (isset($filterValue) && $filterValue)
|
||||
{
|
||||
$idCurrency = Currency::getCurrent()->id;
|
||||
$priceFilterQuery = '
|
||||
INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product AND psi.id_currency = '.(int)$idCurrency.'
|
||||
AND psi.price_min <= '.(int)$filterValue[1].' AND psi.price_max >= '.(int)$filterValue[0].') ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$idCurrency = Currency::getCurrent()->id;
|
||||
|
||||
$priceFilterQuery = '
|
||||
INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi
|
||||
ON (psi.id_product = p.id_product AND psi.id_currency = '.(int)$idCurrency.') ';
|
||||
|
||||
@@ -89,10 +89,7 @@ class BlockSearch extends Module
|
||||
$instantSearch = (int)(Configuration::get('PS_INSTANT_SEARCH'));
|
||||
$this->context->smarty->assign('instantsearch', $instantSearch);
|
||||
if ($ajaxSearch)
|
||||
{
|
||||
$this->context->controller->addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css');
|
||||
$this->context->controller->addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js');
|
||||
}
|
||||
$this->context->controller->addJqueryPlugin('autocomplete');
|
||||
$this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css');
|
||||
$this->context->controller->addCSS(($this->_path).'blocksearch.css', 'all');
|
||||
return true;
|
||||
|
||||
@@ -38,8 +38,7 @@ $context = Context::getContext();
|
||||
if (!$context->customer->isLogged())
|
||||
Tools::redirect('index.php?controller=authentication&back=modules/loyalty/loyalty-program.php');
|
||||
|
||||
$context->controller->addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all');
|
||||
$context->controller->addJS(array(_PS_JS_DIR_.'jquery/jquery.dimensions.js',_PS_JS_DIR_.'jquery/jquery.cluetip.js'));
|
||||
$context->controller->addJqueryPlugin(array('dimensions', 'cluetip'));
|
||||
|
||||
$customerPoints = (int)(LoyaltyModule::getPointsByCustomer((int)($cookie->id_customer)));
|
||||
|
||||
|
||||
@@ -175,6 +175,7 @@ class productsCategory extends Module
|
||||
public function hookHeader($params)
|
||||
{
|
||||
$this->context->controller->addCSS($this->_path.'productscategory.css', 'all');
|
||||
$this->context->controller->addJS(array($this->_path.'productscategory.js', _PS_JS_DIR_.'jquery/jquery.serialScroll-1.2.2-min.js'));
|
||||
$this->context->controller->addJS($this->_path.'productscategory.js');
|
||||
$this->context->controller->addJqueryPlugin('serialScroll');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,7 @@ $context = Context::getContext();
|
||||
if (!$context->customer->isLogged())
|
||||
Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php');
|
||||
|
||||
$context->controller->addCSS(_PS_CSS_DIR_.'thickbox.css', 'all');
|
||||
$context->controller->addJS(array(_PS_JS_DIR_.'jquery/thickbox-modified.js',_PS_JS_DIR_.'jquery/jquery.idTabs.modified.js'));
|
||||
$context->controller->addJqueryPlugin(array('thickbox', 'idTabs'));
|
||||
|
||||
include(dirname(__FILE__).'/../../header.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user