Index: openacs-4/packages/calendar/www/mini-calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/mini-calendar.adp,v diff -u -r1.21.2.2 -r1.21.2.3 --- openacs-4/packages/calendar/www/mini-calendar.adp 23 May 2008 10:48:35 -0000 1.21.2.2 +++ openacs-4/packages/calendar/www/mini-calendar.adp 23 May 2008 20:45:47 -0000 1.21.2.3 @@ -32,7 +32,7 @@ - @days_of_week.day_short@ + @days_of_week.day_short@ @@ -44,18 +44,18 @@ - + @days.day_number@ - + @days.day_number@ - + @days.day_number@ Index: openacs-4/packages/calendar/www/mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/mini-calendar.tcl,v diff -u -r1.18.2.2 -r1.18.2.3 --- openacs-4/packages/calendar/www/mini-calendar.tcl 23 May 2008 10:48:35 -0000 1.18.2.2 +++ openacs-4/packages/calendar/www/mini-calendar.tcl 23 May 2008 20:45:47 -0000 1.18.2.3 @@ -128,14 +128,14 @@ set first_day_of_week [lc_get firstdayofweek] set week_days [lc_get abday] set long_weekdays [lc_get day] - multirow create days_of_week day_short day_long + multirow create days_of_week day_short day_num for {set i 0} {$i < 7} {incr i} { multirow append days_of_week \ [lindex $week_days [expr [expr $i + $first_day_of_week] % 7]] \ - [lindex $long_weekdays [expr [expr $i + $first_day_of_week] % 7]] + $i } - multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url weekday + multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url weekday day_num set day_of_week 1 @@ -170,6 +170,7 @@ set today_p t } + set day_num [expr { $day_of_week - 1 }] if { $day_of_week == 1} { set beginning_of_week_p t } else { @@ -187,7 +188,8 @@ multirow append days $day_number $beginning_of_week_p $end_of_week_p $today_p $active_p \ "[export_vars -base $base_url {{date $ansi_date} view}]${page_num}${url_stub_period_days}" \ - $weekday + $weekday \ + $day_num incr day_number incr day_of_week Index: openacs-4/packages/calendar/www/view-month-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-month-display.adp,v diff -u -r1.22.2.1 -r1.22.2.2 --- openacs-4/packages/calendar/www/view-month-display.adp 23 May 2008 19:36:03 -0000 1.22.2.1 +++ openacs-4/packages/calendar/www/view-month-display.adp 23 May 2008 20:45:47 -0000 1.22.2.2 @@ -9,7 +9,7 @@ - + @weekday_names.weekday_long@ @@ -29,10 +29,10 @@ - + - +  [@items.day_number@ ] Index: openacs-4/packages/calendar/www/view-month-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-month-display.tcl,v diff -u -r1.22.2.1 -r1.22.2.2 --- openacs-4/packages/calendar/www/view-month-display.tcl 23 May 2008 19:36:03 -0000 1.22.2.1 +++ openacs-4/packages/calendar/www/view-month-display.tcl 23 May 2008 20:45:47 -0000 1.22.2.2 @@ -82,12 +82,11 @@ set first_day_of_week [lc_get firstdayofweek] set last_day_of_week [expr [expr $first_day_of_week + 6] % 7] -set week_days_short [lc_get abday] set week_days [lc_get day] -multirow create weekday_names weekday_short weekday_long +multirow create weekday_names weekday_num weekday_long for {set i 0} {$i < 7} {incr i} { set i_day [expr {[expr {$i + $first_day_of_week}] % 7}] - multirow append weekday_names [lindex $week_days_short $i_day] [lindex $week_days $i_day] + multirow append weekday_names $i_day [lindex $week_days $i_day] } @@ -124,7 +123,8 @@ add_url \ day_url \ style_class \ - num_attachments + num_attachments \ + weekday_num # Calculate number of greyed days and then add them to the calendar mulitrow set greyed_days_before_month [expr [expr [dt_first_day_of_month $this_year $this_month]] -1 ] @@ -159,7 +159,8 @@ "" \ "" \ "" \ - "" + "" \ + "" } } @@ -204,7 +205,7 @@ "" \ "" \ "" \ - [lindex $week_days_short $display_information(weekday)] \ + [lindex $week_days $display_information(weekday)] \ "" \ "" \ "" \ @@ -219,7 +220,8 @@ "${base_url}cal-item-new?date=[dt_julian_to_ansi $current_day]&start_time=&end_time" \ "?view=day&date=[dt_julian_to_ansi $current_day]&$page_num_urlvar" \ "calendar-${system_type}Item" \ - $num_attachments + $num_attachments \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %w] } } @@ -247,7 +249,7 @@ [subst $item_template] \ $description \ $calendar_name \ - [lindex $week_days_short $display_information(weekday)] \ + [lindex $week_days $display_information(weekday)] \ $pretty_start_date \ $pretty_end_date \ $pretty_start_time \ @@ -262,7 +264,8 @@ "${base_url}cal-item-new?date=[dt_julian_to_ansi $current_day]&start_time=&end_time" \ "?view=day&date=[dt_julian_to_ansi $current_day]&$page_num_urlvar" \ "calendar-${system_type}Item" \ - $num_attachments + $num_attachments \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %w] } if { !$exporting_p } { @@ -282,7 +285,7 @@ "" \ "" \ "" \ - [lindex $week_days_short $display_information(weekday)] \ + [lindex $week_days $display_information(weekday)] \ "" \ "" \ "" \ @@ -297,7 +300,8 @@ "${base_url}cal-item-new?date=[dt_julian_to_ansi $current_day]&start_time=&end_time" \ "?view=day&date=[dt_julian_to_ansi $current_day]&$page_num_urlvar" \ "" \ - "" + "" \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %w] } # Add cells for remaining days outside the month @@ -325,7 +329,8 @@ "" \ "" \ "" \ - "" + "" \ + "" } } } Index: openacs-4/packages/calendar/www/view-week-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.adp,v diff -u -r1.18.2.3 -r1.18.2.4 --- openacs-4/packages/calendar/www/view-week-display.adp 23 May 2008 19:36:03 -0000 1.18.2.3 +++ openacs-4/packages/calendar/www/view-week-display.adp 23 May 2008 20:45:47 -0000 1.18.2.4 @@ -9,7 +9,7 @@ #calendar.Hours# - + @days_of_week.day_short@ @days_of_week.monthday@ @@ -19,7 +19,7 @@

@grid_first_hour@

- +
@@ -28,25 +28,25 @@
-   -   -   -   -   -   +   +   +   +   +   +  

@grid.hour@

- +

@grid.hour@

- +
Index: openacs-4/packages/calendar/www/view-week-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.tcl,v diff -u -r1.20 -r1.20.2.1 --- openacs-4/packages/calendar/www/view-week-display.tcl 7 Oct 2007 22:36:55 -0000 1.20 +++ openacs-4/packages/calendar/www/view-week-display.tcl 23 May 2008 20:45:47 -0000 1.20.2.1 @@ -325,7 +325,7 @@ set next_week [clock format [expr $first_weekday_date_secs + (7*86400)] -format "%Y-%m-%d"] set last_week [clock format [expr $first_weekday_date_secs - (7*86400)] -format "%Y-%m-%d"] -multirow create days_of_week width day_short monthday weekday_date weekday_url +multirow create days_of_week width day_short monthday weekday_date weekday_url day_num set nav_url_base [ad_conn url]?[export_vars -url -entire_form -exclude {date view}] @@ -339,7 +339,8 @@ set weekday_url [export_vars -base [ad_conn url] -url -entire_form {{view day} {date $weekday_date}}] #TODO: localize_me set weekday_monthday "$trimmed_month/$trimmed_day" - multirow append days_of_week [set day_width_$i] [lindex $week_days [expr [expr $i + $first_day_of_week] % 7]] $weekday_monthday $weekday_date $weekday_url + set i_day [expr { [expr { $i + $first_day_of_week }] % 7 }] + multirow append days_of_week [set day_width_$i] [lindex $week_days $i_day] $weekday_monthday $weekday_date $weekday_url $i } set week_width $time_of_day_width