[-] BO : BugFix : #PSTEST-1054 : Employees and permission updated

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14401 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-04-02 10:05:24 +00:00
parent a606f14f76
commit 3c8af49bdb
5 changed files with 117 additions and 10 deletions
@@ -59,8 +59,34 @@
$(document).ready(function(){
$('select[name=id_profile]').change(function(){
ifSuperAdmin($(this));
});
$.ajax({
url: "{$link->getAdminLink('AdminEmployees')}",
cache: false,
data : {
ajax : '1',
action : 'getTabByIdProfile',
id_profile : $(this).val()
},
dataType : 'json',
success : function(resp,textStatus,jqXHR)
{
if (resp != false)
{
$('select[name=default_tab]').html('');
$.each(resp, function(key, r){
if (r.id_parent == 0)
{
$('select[name=default_tab]').append('<optgroup label="'+r.name+'"></optgroup>');
$.each(r.children, function(k, value){
$('select[name=default_tab]').append('<option value="'+r.id_tab+'">'+value.name+'</option>')
});
}
});
}
}
});
});
ifSuperAdmin($('select[name=id_profile]'));
});