[-] BO : fixed ajax in permissions tab #PSCFV-7442

This commit is contained in:
Damien Metzger
2013-06-14 11:20:38 +02:00
parent 2ae0e4f844
commit 12e13e275f
3 changed files with 24 additions and 30 deletions
@@ -49,8 +49,10 @@
if (perm == 'all' && $(this).parent().parent().hasClass('parent'))
{
checked = enabled ? 'checked': '';
$(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').attr('checked', checked);
if (enabled)
$(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').attr('checked', 'checked');
else
$(this).parent().parent().parent().find('.child-'+id_tab+' input[type=checkbox]').removeAttr('checked');
$.ajax({
url: "{$link->getAdminLink('AdminAccess')|addslashes}",
cache: false,
@@ -68,15 +70,12 @@
},
success : function(res,textStatus,jqXHR)
{
try
{
try {
if (res == 'ok')
showSuccessMessage("{l s='Update successful'}");
else
showErrorMessage("{l s='Update error'}");
}
catch(e)
{
} catch(e) {
jAlert('Technical error');
}
}