From bf9b6e9ccc6b2677247aa0a8348337248e7cd25e Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 20 Jul 2012 17:18:40 +0200 Subject: [PATCH] don't show label 'add group' for subadmins and remove some debug code --- settings/js/users.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/settings/js/users.js b/settings/js/users.js index f1fb0f5f6d..c184db4374 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -83,7 +83,6 @@ $(document).ready(function(){ } function applyMultiplySelect(element){ - console.log(element); var checked=[]; var user=element.data('username'); if($(element).attr('class') == 'groupsselect'){ @@ -114,9 +113,15 @@ $(document).ready(function(){ } }) }; + var label; + if(isadmin){ + label = t('files', 'add group'); + }else{ + label = null; + } element.multiSelect({ createCallback:addGroup, - createText:'add group', + createText:label, checked:checked, oncheck:checkHandeler, onuncheck:checkHandeler, @@ -142,8 +147,6 @@ $(document).ready(function(){ }; var addSubAdmin = function(group) { - console.log('addSubAdmin called'); - console.log(group); $('select[multiple]').each(function(index, element) { if ($(element).find('option[value="'+group +'"]').length == 0) { $(element).append(''); @@ -294,7 +297,6 @@ $(document).ready(function(){ } else { groups = result.data.groups; - console.log(groups); var tr=$('#content table tbody tr').first().clone(); tr.attr('data-uid',username); tr.find('td.name').text(username);