[*] BO : Admin Modules now works in Ajax :)
This commit is contained in:
@@ -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('<img src="../img/loader.gif" border="0">');
|
||||
},
|
||||
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
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="subHeadline">{$nb_modules}</div>
|
||||
<ul class="categorieList">
|
||||
{foreach from=$list_modules_categories item=module_category key=module_category_key}
|
||||
<li {if isset($categoryFiltered[$module_category_key])}style="background-color:#EBEDF4"{/if}>
|
||||
<li {if isset($categoryFiltered[$module_category_key])}style="background-color:#EBEDF4"{/if} class="categoryModuleFilterLink">
|
||||
<div class="categorieWidth"><a href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}"><span>{$module_category.name}</span></a></div>
|
||||
<div class="count">{$module_category.nb}</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user