From 301fa43fc4c4c3968b8b5ee14e611d2f3626835b Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 15 Apr 2009 16:39:58 +0200 Subject: [PATCH] Link day headers of week view. --- kronolith/js/src/kronolith.js | 7 +++++++ kronolith/templates/index/week.inc | 12 ++++++++---- kronolith/themes/screen.css | 3 +++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index ef3f5662b..99863ebba 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -262,13 +262,16 @@ KronolithCore = { this.dayGroups = []; this.allDayEvents = []; var div = $('kronolithEventsWeek').down('div'), + th = $('kronolithViewWeekHead').down('.kronolithWeekDay'), td = $('kronolithViewWeekBody').down('td').next('td'), dates = this.viewDates(date, view), day = dates[0].clone(); 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')); td.down('div').writeAttribute('id', 'kronolithAllDay' + day.dateString()); div = div.next('div'); + th = th.next('td'); td = td.next('td'); day.next().day(); } @@ -1176,6 +1179,10 @@ KronolithCore = { this.editEvent(null, null, elt.readAttribute('date')); e.stop(); return; + } else if (elt.hasClassName('kronolithWeekDay')) { + this.go('day:' + elt.readAttribute('date')); + e.stop(); + return; } else if (elt.hasClassName('kronolithEventTag')) { $('kronolithTagACTrigger').kronolithTagger.addNewTagNode(elt.getText()); e.stop(); diff --git a/kronolith/templates/index/week.inc b/kronolith/templates/index/week.inc index c0d0c508b..0dd79ba17 100644 --- a/kronolith/templates/index/week.inc +++ b/kronolith/templates/index/week.inc @@ -9,11 +9,15 @@
- + - getValue('week_start_monday'), $i = $w, $c = $i + 7; $i < $c; $i++): ?> - - + + + + + + + diff --git a/kronolith/themes/screen.css b/kronolith/themes/screen.css index 66de3d80a..e21f0c425 100644 --- a/kronolith/themes/screen.css +++ b/kronolith/themes/screen.css @@ -959,6 +959,9 @@ div.kronolithView div.kronolithViewBody div.kronolithRow { #kronolithViewWeek div.kronolithViewBody div.kronolithRow div { height: 41px; } +.kronolithWeekDay { + cursor: pointer; +} /* Main view day */ .kronolithViewDay div.kronolithViewBody div.kronolithRow div.kronolithFirstCol { -- 2.11.0