From dee1a598daff26055ac6b4b709d328d61ace8d87 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 22 Mar 2010 23:26:13 +0100 Subject: [PATCH] Don't show import tab if user doesn't have edit permissions. --- kronolith/js/kronolith.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 8a3f0b1bb..12705a68a 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2344,7 +2344,6 @@ KronolithCore = { switch (type) { case 'internal': kronolithCTagAc.reset(); - $('kronolithCalendar' + type + 'LinkImport').up('span').hide(); // Fall through. case 'tasklists': $('kronolithCalendar' + type + 'LinkExport').up('span').hide(); @@ -2370,7 +2369,11 @@ KronolithCore = { case 'internal': kronolithCTagAc.reset(Kronolith.conf.calendars.internal[calendar].tg); $('kronolithCalendar' + type + 'ImportCal').setValue(calendar); - $('kronolithCalendar' + type + 'LinkImport').up('span').show(); + if (info.edit) { + $('kronolithCalendar' + type + 'LinkImport').up('li').show(); + } else { + $('kronolithCalendar' + type + 'LinkImport').up('li').hide(); + } // Fall through. case 'tasklists': $('kronolithCalendar' + type + 'Description').setValue(info.desc); -- 2.11.0