Highlight today in the minical.
authorJan Schneider <jan@horde.org>
Wed, 25 Nov 2009 14:19:25 +0000 (15:19 +0100)
committerJan Schneider <jan@horde.org>
Wed, 25 Nov 2009 22:59:44 +0000 (23:59 +0100)
kronolith/js/kronolith.js
kronolith/themes/screen.css

index 3f8a5be..e871e7e 100644 (file)
@@ -751,7 +751,7 @@ KronolithCore = {
     buildMinical: function(tbody, date, view, idPrefix)
     {
         var dates = this.viewDates(date, 'month'), day = dates[0].clone(),
-            date7 = date.clone().add(1).week(),
+            date7 = date.clone().add(1).week(), today = Date.today(),
             weekStart, weekEnd, weekEndDay, dateString, td, tr, i;
 
         // Remove old calendar rows. Maybe we should only rebuild the minical
@@ -788,6 +788,10 @@ KronolithCore = {
                  (view == 'agenda' && !day.isBefore(date) && day.isBefore(date7)))) {
                 td.addClassName('kronolithSelected');
             }
+            // Highlight today.
+            if (day.equals(today)) {
+                td.addClassName('kronolithToday');
+            }
             td.innerHTML = day.getDate();
             tr.insert(td);
             day.next().day();
index eca0b52..549e583 100644 (file)
@@ -806,8 +806,7 @@ div#kronolithEventTabTags {
     color: silver;
 }
 .kronolithMinical .kronolithSelected {
-    background-color: #ebf3fc;
-    border: 1px #808080 solid;
+    background-color: #ffc;
 }
 
 /* Main views */
@@ -1130,7 +1129,7 @@ table.kronolithView td.kronolithFirstCol {
     border-color: transparent;
     color: silver;
 }
-.kronolithViewMonth .kronolithToday {
+.kronolithToday, .kronolithMinical .kronolithToday {
     background-color: #ebf3fc;
     border-color: #808080;
 }