Always show six weeks in minical so that the navigation doesn't jump around.
authorJan Schneider <jan@horde.org>
Fri, 23 Oct 2009 17:40:53 +0000 (19:40 +0200)
committerJan Schneider <jan@horde.org>
Mon, 26 Oct 2009 18:51:02 +0000 (19:51 +0100)
kronolith/js/kronolith.js

index 0aa5d95..a4c654f 100644 (file)
@@ -670,13 +670,13 @@ KronolithCore = {
     {
         var dates = this.viewDates(date, 'month'), day = dates[0].clone(),
             date7 = date.clone().add(1).week(),
-            weekStart, weekEnd, weekEndDay, td, tr;
+            weekStart, weekEnd, weekEndDay, td, tr, i;
 
         // Remove old calendar rows. Maybe we should only rebuild the minical
         // if necessary.
         tbody.childElements().invoke('remove');
 
-        while (day.compareTo(dates[1]) < 1) {
+        for (i = 0; i < 42; i++) {
             // Create calendar row and insert week number.
             if (day.getDay() == Kronolith.conf.week_start) {
                 tr = new Element('TR');