Fix adding all-day events.
authorJan Schneider <jan@horde.org>
Thu, 17 Jun 2010 14:57:33 +0000 (16:57 +0200)
committerJan Schneider <jan@horde.org>
Thu, 17 Jun 2010 14:57:33 +0000 (16:57 +0200)
kronolith/js/kronolith.js

index 77c11f0..ac2c890 100644 (file)
@@ -4218,20 +4218,6 @@ KronolithCore = {
                 e.stop();
                 return;
 
-            case 'kronolithEventsWeek':
-            case 'kronolithAllDayContainer':
-                var date = elt.retrieve('date');
-                if (elt.className == 'kronolithAllDayContainer') {
-                    date += 'all';
-                } else {
-                    date = this.parseDate(date);
-                    date.add(Math.round((e.pointerY() - elt.cumulativeOffset().top) / this.weekSizes.height * 2) * 30).minutes();
-                    date = date.toString('yyyyMMddHHmm');
-                }
-                this.go('event:' + date);
-                e.stop();
-                return;
-
             case 'kronolithMore':
                 this.go('day:' + elt.retrieve('date'));
                 e.stop();
@@ -4279,6 +4265,19 @@ KronolithCore = {
                 this.go('day:' + elt.retrieve('date'));
                 e.stop();
                 return;
+            } else if (elt.hasClassName('kronolithEventsWeek') ||
+                       elt.hasClassName('kronolithAllDayContainer')) {
+                var date = elt.retrieve('date');
+                if (elt.hasClassName('kronolithAllDayContainer')) {
+                    date += 'all';
+                } else {
+                    date = this.parseDate(date);
+                    date.add(Math.round((e.pointerY() - elt.cumulativeOffset().top) / this.weekSizes.height * 2) * 30).minutes();
+                    date = date.toString('yyyyMMddHHmm');
+                }
+                this.go('event:' + date);
+                e.stop();
+                return;
             } else if (elt.hasClassName('kronolithTaskCheckbox')) {
                 var taskid = elt.up('tr.kronolithTaskRow', 0).retrieve('taskid'),
                     tasklist = elt.up('tr.kronolithTaskRow', 0).retrieve('tasklist');