[-] CORE : fixed some bad include of jquery plugin

This commit is contained in:
vAugagneur
2012-11-23 16:35:57 +01:00
parent 3664925fb9
commit 0e0ca2a473
4 changed files with 15 additions and 12 deletions
@@ -18,15 +18,13 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2012 PrestaShop SA
* @copyright 2007-2012 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">{$autocompleteList}</script>
<script type="text/javascript">{$autocompleteList}</script>
<script type="text/javascript" src="{$smarty.const._PS_JS_DIR_}jquery/plugins/autocomplete/jquery.autocomplete.js"></script>
<script type="text/javascript">
var token = '{$token}';
var currentIndex = '{$currentIndex}';
+1 -1
View File
@@ -381,7 +381,7 @@ class MediaCore
* @param mixed $name
* @return void
*/
public static function getJqueryPluginCSSPath($name, $folder)
public static function getJqueryPluginCSSPath($name, $folder = null)
{
if ($folder === null)
$folder = _PS_JS_DIR_.'jquery/plugins/'; //set default folder
@@ -48,6 +48,12 @@ class AdminCartRulesControllerCore extends AdminController
parent::__construct();
}
public function setMedia()
{
parent::setMedia();
$this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete'));
}
public function postProcess()
{
if (Tools::isSubmit('submitAddcart_rule') || Tools::isSubmit('submitAddcart_ruleAndStay'))
@@ -465,13 +471,6 @@ class AdminCartRulesControllerCore extends AdminController
'desc' => $this->l('Save and Stay')
);
// Todo: change for "Media" version
$this->addJs(_PS_JS_DIR_.'jquery/plugins/jquery.typewatch.js');
$this->addJs(_PS_JS_DIR_.'jquery/plugins/fancybox/jquery.fancybox.js');
$this->addJs(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js');
$this->addCss(_PS_JS_DIR_.'jquery/plugins/fancybox/jquery.fancybox.css');
$this->addCss(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.css');
$current_object = $this->loadObject(true);
// All the filter are prefilled with the correct information
@@ -127,6 +127,12 @@ class AdminModulesControllerCore extends AdminController
if (isset($this->context->cookie->username_addons) && isset($this->context->cookie->password_addons) && !empty($this->context->cookie->username_addons) && !empty($this->context->cookie->password_addons))
$this->logged_on_addons = true;
}
public function setMedia()
{
parent::setMedia();
$this->addJqueryPlugin(array('autocomplete', 'fancybox'));
}
public function ajaxProcessRefreshModuleList()
{