diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-25 00:30:27 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-25 02:54:38 +0400 |
commit | 9dcf29ff514222b652e642d358b10d375c30dbb5 (patch) | |
tree | 63262669ba12edd667e369ebf05b59930cbbae40 /settings | |
parent | 0d3181b6d1fc8b2af1b222cae29fff89a0754797 (diff) |
fix bug in group mangement
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index bfc00138e0e..26e7ff24452 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -184,7 +184,13 @@ $(document).ready(function(){ select.data('username',username); select.data('userGroups',groups.join(', ')); tr.find('td.groups').empty(); - $.each($('#content table').data('groups').split(', '),function(i,group){ + var allGroups=$('#content table').data('groups').split(', '); + for(var i=0;i<groups.length;i++){ + if(allGroups.indexOf(groups[i])==-1){ + allGroups.push(groups[i]); + } + } + $.each(allGroups,function(i,group){ select.append($('<option value="'+group+'">'+group+'</option>')); }); tr.find('td.groups').append(select); |