From 8d98bbdba6ae699995d2477f9e85e471a4136d74 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 2 Jun 2010 12:08:31 +0200 Subject: [PATCH] Hide group section in advanced permissions too, if there aren't any groups. --- kronolith/js/kronolith.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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(); + } } }, -- 2.11.0