From 48c5daf420ccb339a66437023f7bc8835bf60aaf Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 9 Apr 2010 16:49:38 +0100 Subject: [PATCH] Show 'no items' notice if a calendar section is empty. --- kronolith/js/kronolith.js | 7 +++++++ kronolith/templates/index/index.inc | 3 +++ 2 files changed, 10 insertions(+) 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 @@ +
-- 2.11.0