[-] 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:
@@ -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]'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user