// context->controller now work for adminController too
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9090 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -106,6 +106,7 @@ abstract class ControllerCore
|
|||||||
$this->display_footer = true;
|
$this->display_footer = true;
|
||||||
|
|
||||||
$this->context = Context::getContext();
|
$this->context = Context::getContext();
|
||||||
|
$this->context->controller = $this;
|
||||||
$this->ajax = Tools::getValue('ajax') || Tools::isSubmit('ajax');
|
$this->ajax = Tools::getValue('ajax') || Tools::isSubmit('ajax');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +186,7 @@ abstract class ControllerCore
|
|||||||
if ($css_path)
|
if ($css_path)
|
||||||
$this->css_files = array_merge($css_path, $this->css_files);
|
$this->css_files = array_merge($css_path, $this->css_files);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$css_path = Media::getCSSPath($media, $css_media_type);
|
$css_path = Media::getCSSPath($media, $css_media_type);
|
||||||
if ($css_path)
|
if ($css_path)
|
||||||
@@ -222,7 +223,7 @@ abstract class ControllerCore
|
|||||||
$this->js_files[] = $js_path;
|
$this->js_files[] = $js_path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new javascript file in page header.
|
* Add a new javascript file in page header.
|
||||||
*
|
*
|
||||||
@@ -233,7 +234,7 @@ abstract class ControllerCore
|
|||||||
{
|
{
|
||||||
$this->addJS(Media::getJqueryPath($version, $folder, $minifier));
|
$this->addJS(Media::getJqueryPath($version, $folder, $minifier));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new javascript file in page header.
|
* Add a new javascript file in page header.
|
||||||
*
|
*
|
||||||
@@ -252,7 +253,7 @@ abstract class ControllerCore
|
|||||||
$this->addCSS($ui_path['css']);
|
$this->addCSS($ui_path['css']);
|
||||||
$this->addJS($ui_path['js']);
|
$this->addJS($ui_path['js']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new javascript file in page header.
|
* Add a new javascript file in page header.
|
||||||
*
|
*
|
||||||
@@ -268,12 +269,12 @@ abstract class ControllerCore
|
|||||||
{
|
{
|
||||||
$plugin_path = Media::getJqueryPluginPath($plugin);
|
$plugin_path = Media::getJqueryPluginPath($plugin);
|
||||||
$this->addJS($plugin_path['js']);
|
$this->addJS($plugin_path['js']);
|
||||||
$this->addCSS($plugin_path['css']);
|
$this->addCSS($plugin_path['css']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$plugin_path = Media::getJqueryPluginPath($name);
|
$plugin_path = Media::getJqueryPluginPath($name);
|
||||||
|
|
||||||
$this->addCSS($plugin_path['css']);
|
$this->addCSS($plugin_path['css']);
|
||||||
$this->addJS($plugin_path['js']);
|
$this->addJS($plugin_path['js']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,7 +338,6 @@ class FrontControllerCore extends Controller
|
|||||||
|
|
||||||
$this->context->cart = $cart;
|
$this->context->cart = $cart;
|
||||||
$this->context->currency = $currency;
|
$this->context->currency = $currency;
|
||||||
$this->context->controller = $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
@@ -498,10 +497,10 @@ class FrontControllerCore extends Controller
|
|||||||
public function setMedia()
|
public function setMedia()
|
||||||
{
|
{
|
||||||
$this->addCSS(_THEME_CSS_DIR_.'global.css', 'all');
|
$this->addCSS(_THEME_CSS_DIR_.'global.css', 'all');
|
||||||
$this->addjquery();
|
$this->addjquery();
|
||||||
$this->addjqueryPlugin('easing');
|
$this->addjqueryPlugin('easing');
|
||||||
$this->addJS(_PS_JS_DIR_.'tools.js');
|
$this->addJS(_PS_JS_DIR_.'tools.js');
|
||||||
|
|
||||||
if (Tools::isSubmit('live_edit') AND Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))
|
if (Tools::isSubmit('live_edit') AND Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))
|
||||||
{
|
{
|
||||||
$this->addJqueryUI('ui.sortable');
|
$this->addJqueryUI('ui.sortable');
|
||||||
|
|||||||
Reference in New Issue
Block a user