From: Jan Schneider Date: Wed, 2 Jun 2010 10:08:31 +0000 (+0200) Subject: Hide group section in advanced permissions too, if there aren't any groups. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8d98bbdba6ae699995d2477f9e85e471a4136d74;p=horde.git Hide group section in advanced permissions too, if there aren't any groups. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 873be90a6..2c28397fc 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -3052,7 +3052,7 @@ KronolithCore = { }, /** - * Updates the basic group permission interface after the group list has + * Updates the group permission interface after the group list has * been loaded. * * @param string type The calendar type, 'internal' or 'taskslists'. @@ -3062,16 +3062,20 @@ KronolithCore = { { $('kronolithC' + type + 'PGSingle').clear(); if (!groups) { + $('kronolithC' + type + 'PGNew').up('div').hide(); $('kronolithC' + type + 'PG').up('span').hide(); - } else if (groups.size() == 1) { - $('kronolithC' + type + 'PGName') - .update('"' + groups.values()[0].escapeHTML() + '"') - .show(); - $('kronolithC' + type + 'PGSingle').setValue(groups.keys()[0]); - $('kronolithC' + type + 'PGList').hide(); } else { - $('kronolithC' + type + 'PGName').hide(); - $('kronolithC' + type + 'PGList').show(); + $('kronolithC' + type + 'PGNew').up('div').show(); + if (groups.size() == 1) { + $('kronolithC' + type + 'PGName') + .update('"' + groups.values()[0].escapeHTML() + '"') + .show(); + $('kronolithC' + type + 'PGSingle').setValue(groups.keys()[0]); + $('kronolithC' + type + 'PGList').hide(); + } else { + $('kronolithC' + type + 'PGName').hide(); + $('kronolithC' + type + 'PGList').show(); + } } },