Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
@@ -313,12 +313,12 @@ abstract class ControllerCore
|
||||
/**
|
||||
* Add a new javascript file in page header.
|
||||
*
|
||||
* @param mixed $js_uri
|
||||
* @param mixed $name
|
||||
* @param mixed $folder
|
||||
* @return void
|
||||
*/
|
||||
public function addJqueryPlugin($name, $folder = null)
|
||||
{
|
||||
$plugin_path = array();
|
||||
if (is_array($name))
|
||||
{
|
||||
foreach ($name as $plugin)
|
||||
@@ -334,10 +334,10 @@ abstract class ControllerCore
|
||||
{
|
||||
$plugin_path = Media::getJqueryPluginPath($name, $folder);
|
||||
|
||||
if(!empty($plugin_path['css']))
|
||||
$this->addCSS($plugin_path['css']);
|
||||
if(!empty($plugin_path['js']))
|
||||
$this->addJS($plugin_path['js']);
|
||||
if(!empty($plugin_path['css']))
|
||||
$this->addCSS($plugin_path['css']);
|
||||
if(!empty($plugin_path['js']))
|
||||
$this->addJS($plugin_path['js']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ class FrontControllerCore extends Controller
|
||||
else
|
||||
{
|
||||
$page_name = Dispatcher::getInstance()->getController();
|
||||
$page_name = (preg_match('/^[0-9]/', $page_name)) ? 'page_'.$page_name : $page_name;
|
||||
$page_name = (preg_match('/^[0-9]/', $page_name) ? 'page_'.$page_name : $page_name);
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(Meta::getMetaTags($this->context->language->id, $page_name));
|
||||
@@ -346,7 +346,8 @@ class FrontControllerCore extends Controller
|
||||
'PS_STOCK_MANAGEMENT' => Configuration::get('PS_STOCK_MANAGEMENT'),
|
||||
'quick_view' => Configuration::get('PS_QUICK_VIEW'),
|
||||
'shop_phone' => Configuration::get('PS_SHOP_PHONE'),
|
||||
'compared_products' => is_array($compared_products) ? $compared_products : array()
|
||||
'compared_products' => is_array($compared_products) ? $compared_products : array(),
|
||||
'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM')
|
||||
));
|
||||
|
||||
// Add the tpl files directory for mobile
|
||||
@@ -757,6 +758,8 @@ class FrontControllerCore extends Controller
|
||||
$this->addjqueryPlugin('fancybox');
|
||||
$this->addJS(_THEME_JS_DIR_.'quick-view.js');
|
||||
}
|
||||
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
|
||||
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
|
||||
|
||||
// Execute Hook FrontController SetMedia
|
||||
Hook::exec('actionFrontControllerSetMedia', array());
|
||||
|
||||
Reference in New Issue
Block a user