Make sure that the initial date is always at midnight.
authorJan Schneider <jan@horde.org>
Mon, 30 Nov 2009 14:09:29 +0000 (15:09 +0100)
committerJan Schneider <jan@horde.org>
Mon, 30 Nov 2009 15:50:44 +0000 (16:50 +0100)
kronolith/js/kronolith.js
kronolith/lib/Kronolith.php

index 7f3449d..32e4f55 100644 (file)
@@ -25,7 +25,7 @@ KronolithCore = {
     eventsLoading: {},
     loading: 0,
     fbLoading: 0,
-    date: new Date(),
+    date: Date.today(),
     tasktype: 'incomplete',
     growls: 0,
     alarms: [],
@@ -763,8 +763,6 @@ KronolithCore = {
             date7 = date.clone().add(1).week(), today = Date.today(),
             weekStart, weekEnd, weekEndDay, dateString, td, tr, i;
 
-        day = new Date(day.getFullYear(), day.getMonth(), day.getDate(), 0, 0, 0);
-
         // Remove old calendar rows. Maybe we should only rebuild the minical
         // if necessary.
         tbody.childElements().invoke('remove');
index 3c76e6a..90f7464 100644 (file)
@@ -75,9 +75,9 @@ class Kronolith
         Horde::addScriptFile('dhtmlHistory.js', 'horde');
         Horde::addScriptFile('redbox.js', 'horde');
         Horde::addScriptFile('tooltips.js', 'horde');
-        Horde::addScriptFile('kronolith.js', 'kronolith');
         Horde::addScriptFile($datejs, 'kronolith');
         Horde::addScriptFile('date.js', 'kronolith');
+        Horde::addScriptFile('kronolith.js', 'kronolith');
 
         // No IE 8 code at the moment.
         header('X-UA-Compatible: IE=7');