From: Jan Schneider Date: Fri, 9 Apr 2010 15:49:38 +0000 (+0100) Subject: Show 'no items' notice if a calendar section is empty. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=48c5daf420ccb339a66437023f7bc8835bf60aaf;p=horde.git Show 'no items' notice if a calendar section is empty. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 3d706f3f7..7bf4aa3fb 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -917,9 +917,16 @@ KronolithCore = { */ insertCalendarInList: function(type, id, cal, div) { + var noItems; if (!div) { div = this.getCalendarList(type, cal.owner); } + noItems = div.previous(); + if (noItems && + noItems.tagName == 'DIV' && + noItems.className == 'kronolithDialogInfo') { + noItems.hide(); + } if (type != 'holiday' && type != 'external') { div.insert(new Element('span', { className: 'kronolithCalEdit' }) .insert('▸')); diff --git a/kronolith/templates/index/index.inc b/kronolith/templates/index/index.inc index 8dba54e66..940b15a99 100644 --- a/kronolith/templates/index/index.inc +++ b/kronolith/templates/index/index.inc @@ -117,6 +117,7 @@ +
@@ -126,6 +127,7 @@ +
@@ -137,6 +139,7 @@ +