No reason to show and hide these anymore.
authorJan Schneider <jan@horde.org>
Mon, 3 May 2010 16:36:50 +0000 (18:36 +0200)
committerJan Schneider <jan@horde.org>
Mon, 3 May 2010 16:38:04 +0000 (18:38 +0200)
kronolith/js/kronolith.js
kronolith/templates/index/index.inc

index 35a844b..cc7c86b 100644 (file)
@@ -952,49 +952,16 @@ KronolithCore = {
      */
     updateCalendarList: function()
     {
-        var my = 0, shared = 0, ext = $H(), extNames = $H(),
-            remote, holidays, api, div;
+        var ext = $H(), extNames = $H();
 
         $H(Kronolith.conf.calendars.internal).each(function(cal) {
-            if (cal.value.owner) {
-                my++;
-            } else {
-                shared++;
-            }
             this.insertCalendarInList('internal', cal.key, cal.value);
         }, this);
-        if (my) {
-            $('kronolithMyCalendars').show();
-        } else {
-            $('kronolithMyCalendars').hide();
-        }
-        if (shared) {
-            $('kronolithSharedCalendars').show();
-        } else {
-            $('kronolithSharedCalendars').hide();
-        }
 
         if (Kronolith.conf.tasks) {
-            my = 0;
-            shared = 0;
             $H(Kronolith.conf.calendars.tasklists).each(function(cal) {
-                if (cal.value.owner) {
-                    my++;
-                } else {
-                    shared++;
-                }
                 this.insertCalendarInList('tasklists', cal.key, cal.value);
             }, this);
-            if (my) {
-                $('kronolithMyTasklists').show();
-            } else {
-                $('kronolithMyTasklists').hide();
-            }
-            if (shared) {
-                $('kronolithSharedTasklists').show();
-            } else {
-                $('kronolithSharedTasklists').hide();
-            }
         }
 
         $H(Kronolith.conf.calendars.external).each(function(cal) {
@@ -1015,25 +982,13 @@ KronolithCore = {
             }, this);
         }, this);
 
-        remote = $H(Kronolith.conf.calendars.remote);
-        remote.each(function(cal) {
+        $H(Kronolith.conf.calendars.remote).each(function(cal) {
             this.insertCalendarInList('remote', cal.key, cal.value);
         }, this);
-        if (remote.size()) {
-            $('kronolithRemoteCalendars').show();
-        } else {
-            $('kronolithRemoteCalendars').hide();
-        }
 
-        holidays = $H(Kronolith.conf.calendars.holiday);
-        holidays.each(function(cal) {
+        $H(Kronolith.conf.calendars.holiday).each(function(cal) {
             this.insertCalendarInList('holiday', cal.key, cal.value);
         }, this);
-        if (holidays.size()) {
-            $('kronolithHolidayCalendars').show();
-        } else {
-            $('kronolithHolidayCalendars').hide();
-        }
     },
 
     /**
index b0d198e..7c0dae9 100644 (file)
@@ -97,7 +97,7 @@
     <span><?php echo _("My Calendars") ?></span>
   </h3>
 
-  <div id="kronolithMyCalendars" class="kronolithCalendars" style="display:none">
+  <div id="kronolithMyCalendars" class="kronolithCalendars">
   </div>
 
   <?php if ($GLOBALS['registry']->hasInterface('tasks')): ?>
     <span><?php echo _("My Task Lists") ?></span>
   </h3>
 
-  <div id="kronolithMyTasklists" class="kronolithCalendars" style="display:none">
+  <div id="kronolithMyTasklists" class="kronolithCalendars">
   </div>
   <?php endif; ?>
 
   </h3>
 
   <div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
-  <div id="kronolithSharedCalendars" class="kronolithCalendars" style="display:none">
+  <div id="kronolithSharedCalendars" class="kronolithCalendars">
   </div>
 
   <?php if ($GLOBALS['registry']->hasInterface('tasks')): ?>
   </h3>
 
   <div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
-  <div id="kronolithSharedTasklists" class="kronolithCalendars" style="display:none">
+  <div id="kronolithSharedTasklists" class="kronolithCalendars">
   </div>
   <?php endif; ?>
 
   </h3>
 
   <div class="kronolithDialogInfo"><?php echo _("No items to display") ?></div>
-  <div id="kronolithRemoteCalendars" class="kronolithCalendars" style="display:none">
+  <div id="kronolithRemoteCalendars" class="kronolithCalendars">
   </div>
 
   <h3>
     <span><?php echo _("Holidays") ?></span>
   </h3>
 
-  <div id="kronolithHolidayCalendars" class="kronolithCalendars" style="display:none">
+  <div id="kronolithHolidayCalendars" class="kronolithCalendars">
   </div>
   </div>