Update new view captions.
authorJan Schneider <jan@horde.org>
Fri, 15 May 2009 16:27:58 +0000 (18:27 +0200)
committerJan Schneider <jan@horde.org>
Fri, 15 May 2009 16:29:26 +0000 (18:29 +0200)
kronolith/js/src/kronolith.js
kronolith/lib/Kronolith.php

index 2d3a47b..07905d2 100644 (file)
@@ -254,7 +254,7 @@ KronolithCore = {
             this.dayEvents = [];
             this.dayGroups = [];
             this.allDayEvents = [];
-            $('kronolithViewDay').down('.kronolithCol').setText(date.toString('D'));
+            $('kronolithViewDay').down('caption span').setText(date.toString('D'));
             break;
 
         case 'week':
@@ -266,6 +266,9 @@ KronolithCore = {
                 td = $('kronolithViewWeekBody').down('td').next('td'),
                 dates = this.viewDates(date, view),
                 day = dates[0].clone();
+
+            $('kronolithViewWeek').down('caption span').setText(Kronolith.text.week.interpolate({ week: date.getWeek() }));
+
             for (var i = 0; i < 7; i++) {
                 div.writeAttribute('id', 'kronolithEventsWeek' + day.dateString());
                 th.writeAttribute('date', day.dateString()).down('span').setText(day.toString('dddd, d'));
@@ -282,6 +285,8 @@ KronolithCore = {
                 dates = this.viewDates(date, view),
                 day = dates[0].clone(), rows = 0, row;
 
+            $('kronolithViewMonth').down('caption span').setText(date.toString('MMMM'));
+
             // Remove old rows. Maybe we should only rebuild the calendars if
             // necessary.
             tbody.childElements().each(function(row) {
index 4a6e064..1ecd0b2 100644 (file)
@@ -200,6 +200,7 @@ class Kronolith
             'ajax_recover' => _("The connection to the remote server has been restored."),
             'alarm' => _("Alarm:"),
             'noalerts' => _("No Alerts"),
+            'week' => str_replace('%d', '#{week}', _("Week %d")),
         ));
         for ($i = 1; $i <= 12; ++$i) {
             $code['text']['month'][$i - 1] = NLS::getLangInfo(constant('MON_' . $i));