diff --git a/admin-dev/themes/default/js/admin-theme.js b/admin-dev/themes/default/js/admin-theme.js index 1955c9116..83afba909 100755 --- a/admin-dev/themes/default/js/admin-theme.js +++ b/admin-dev/themes/default/js/admin-theme.js @@ -110,16 +110,6 @@ $( document ).ready(function() { $('.expanded').removeClass('expanded'); }); - function animateGoTop() { - if ($(window).scrollTop()) - { - $('#go-top:hidden').stop(true, true).fadeIn(); - $('#go-top:hidden').removeClass('hide'); - } - else - $('#go-top').stop(true, true).fadeOut(); - } - $("#go-top").click(function() { $("html, body").animate({ scrollTop: 0 }, "slow"); return false; @@ -129,4 +119,45 @@ $( document ).ready(function() { }); animateGoTop(); -}); \ No newline at end of file +}); + +function animateGoTop() { + if ($(window).scrollTop()) + { + $('#go-top:hidden').stop(true, true).fadeIn(); + $('#go-top:hidden').removeClass('hide'); + } + else + $('#go-top').stop(true, true).fadeOut(); +} + +function openModulesList() +{ + if (!modules_list_loaded) + { + $.ajax({ + type: "POST", + url : admin_modules_link, + async: true, + data : { + ajax : "1", + controller : "AdminModules", + action : "getTabModulesList", + tab_modules_list : tab_modules_list, + back_tab_modules_list : window.location.href + }, + success : function(data) + { + $('#modules_list_container_tab').html(data).slideDown(); + $('#modules_list_loader').hide(); + modules_list_loaded = true; + } + }); + } + else + { + $('#modules_list_container_tab').slideDown(); + $('#modules_list_loader').hide(); + } + return false; +} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/modules/favorites.tpl b/admin-dev/themes/default/template/controllers/modules/favorites.tpl index 1596032a0..738e56c5b 100755 --- a/admin-dev/themes/default/template/controllers/modules/favorites.tpl +++ b/admin-dev/themes/default/template/controllers/modules/favorites.tpl @@ -1,4 +1,28 @@ - {include file='controllers/modules/header.tpl'} +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{include file='controllers/modules/top.tpl'}
diff --git a/admin-dev/themes/default/template/controllers/modules/page.tpl b/admin-dev/themes/default/template/controllers/modules/page.tpl index e18bfe7f4..d088fd9a2 100644 --- a/admin-dev/themes/default/template/controllers/modules/page.tpl +++ b/admin-dev/themes/default/template/controllers/modules/page.tpl @@ -22,28 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - -{$kpis} - -
-

- {l s='List of modules'} -

-
-
- -
-
-
+{include file='controllers/modules/top.tpl'} {if $add_permission eq '1'}
diff --git a/admin-dev/themes/default/template/controllers/modules/top.tpl b/admin-dev/themes/default/template/controllers/modules/top.tpl new file mode 100644 index 000000000..91029ef1b --- /dev/null +++ b/admin-dev/themes/default/template/controllers/modules/top.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{$kpis} + +
+

+ {l s='List of modules'} +

+
+
+ +
+
+
\ No newline at end of file diff --git a/admin-dev/themes/default/template/header.tpl b/admin-dev/themes/default/template/header.tpl index 3eca86fd3..397b224e9 100644 --- a/admin-dev/themes/default/template/header.tpl +++ b/admin-dev/themes/default/template/header.tpl @@ -72,6 +72,8 @@ var currentIndex = '{$currentIndex}'; var default_language = '{$default_language|intval}'; var choose_language_translate = "{l s='Choose language' slashes=1}"; + var admin_modules_link = '{$link->getAdminLink("AdminModules")|addslashes}'; + var tab_modules_list = '{if isset($tab_modules_list) && $tab_modules_list}{$tab_modules_list|addslashes}{/if}'; {/if} {if isset($css_files)} diff --git a/admin-dev/themes/default/template/page_header_toolbar.tpl b/admin-dev/themes/default/template/page_header_toolbar.tpl index eeaba22db..92116296b 100644 --- a/admin-dev/themes/default/template/page_header_toolbar.tpl +++ b/admin-dev/themes/default/template/page_header_toolbar.tpl @@ -68,8 +68,7 @@ if (btn_submit.html().length > 0) lbl_save.find('span').html(btn_submit.html()); - if (btn_save_and_stay.length > 0) - { + if (btn_save_and_stay.length > 0) { //get reference on current save link label lbl_save_and_stay = $('#page-header-desc-{$table}-save-and-stay'); @@ -100,12 +99,10 @@ return false; }); - if (btn_save_and_stay) - { + if (btn_save_and_stay) { btn_save_and_stay.click(function() { //add hidden input to emulate submit button click when posting the form -> field name posted btn_submit.before(''); - $('#{$table}_form').submit(); return false; }); @@ -113,47 +110,17 @@ {/block} } - {if isset($tab_modules_open)} - if ({$tab_modules_open}) - openModulesList(); + {if isset($tab_modules_open) && $tab_modules_open} + $('#modules_list_container').modal('show'); + openModulesList(); {/if} }); + {if isset($tab_modules_list)} - $('.process-icon-modules-list').parent('a').unbind().bind('click', function (){ - openModulesList(); - }); - - function openModulesList() - { - $('#modules_list_container').modal('show'); - if (!modules_list_loaded) - { - $.ajax({ - type: "POST", - url : '{$admin_module_ajax_url}', - async: true, - data : { - ajax : "1", - controller : "AdminModules", - action : "getTabModulesList", - tab_modules_list : '{$tab_modules_list}', - back_tab_modules_list : '{$back_tab_modules_list}' - }, - success : function(data) - { - $('#modules_list_container_tab').html(data).slideDown(); - $('#modules_list_loader').hide(); - modules_list_loaded = true; - } - }); - } - else - { - $('#modules_list_container_tab').slideDown(); - $('#modules_list_loader').hide(); - } - return false; - } + $('.process-icon-modules-list').parent('a').unbind().bind('click', function (){ + $('#modules_list_container').modal('show'); + openModulesList(); + }); {/if} //]]> diff --git a/admin-dev/themes/default/template/toolbar.tpl b/admin-dev/themes/default/template/toolbar.tpl index b59459ebc..c2eb566ee 100644 --- a/admin-dev/themes/default/template/toolbar.tpl +++ b/admin-dev/themes/default/template/toolbar.tpl @@ -46,7 +46,7 @@ {/foreach} -