diff --git a/admin-dev/themes/template/modules/js.tpl b/admin-dev/themes/template/modules/js.tpl index ad8613a0b..0aa9401d5 100644 --- a/admin-dev/themes/template/modules/js.tpl +++ b/admin-dev/themes/template/modules/js.tpl @@ -77,6 +77,50 @@ }); }); + + + + // Method to reload filter in ajax + $(document).ready(function(){ + $('.categoryModuleFilterLink').click(function() + { + $('.categoryModuleFilterLink').css('background-color', 'white'); + $(this).css('background-color', '#EBEDF4'); + var ajaxReloadCurrentIndex = $(this).find('a').attr('href').replace('index.php', 'ajax-tab.php'); + try + { + resAjax = $.ajax({ + type:"POST", + url : ajaxReloadCurrentIndex, + async: true, + data : { + ajax : "1", + token : token, + controller : "AdminModules", + action : "reloadModulesList", + }, + beforeSend: function(xhr) + { + $('#moduleContainer').html(''); + }, + success : function(data) + { + $('#moduleContainer').html(data); + }, + error: function(res,textStatus,jqXHR) + { + //alert("TECHNICAL ERROR"+res); + } + }); + } + catch(e){} + return false; + }); + }); + + + + // Method to get modules_list.xml from prestashop.com and default_country_modules_list.xml from addons.prestashop.com $(document).ready(function(){ try diff --git a/admin-dev/themes/template/modules/page.tpl b/admin-dev/themes/template/modules/page.tpl index 50a9cb26f..dedadc297 100644 --- a/admin-dev/themes/template/modules/page.tpl +++ b/admin-dev/themes/template/modules/page.tpl @@ -55,7 +55,7 @@
{$nb_modules}