Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 10 Sep 2002 22:22:07 -0000 1.31 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 18 Sep 2002 21:03:59 -0000 1.32 @@ -15,8 +15,8 @@ -calendar_details "" -date "" -large_calendar_p 1 - -master_bgcolor "black" - -header_bgcolor "black" + -master_bgcolor "" + -header_bgcolor "" -header_text_color "white" -header_text_size "+2" -day_template {$day} @@ -65,12 +65,12 @@ # Loop through the days of the week set julian $sunday_julian - set return_html "\n" + set return_html "
\n" # Navigation Bar append return_html "
- - +
+
[subst $prev_week_template] @@ -86,7 +86,7 @@ append return_html "
- " +
" set days_of_week {Sunday Monday Tuesday Wednesday Thursday Friday Saturday} foreach day $days_of_week { @@ -103,12 +103,12 @@ set bgcolor $day_bgcolor } - append return_html " -
$day_html   + append return_html "
$day_html  
- " +
+ " # Go through events while {1} { @@ -119,7 +119,7 @@ append return_html " - +
+ [ns_set value $calendar_details $index] @@ -183,7 +183,7 @@ } # Collect some statistics about the events (for overlap) - for {set hour $start_hour} {$hour <= $end_hour} {incr hour} { + for {set hour $start_hour} {$hour <= 23} {incr hour} { set n_events($hour) 0 set n_starting_events($hour) 0 } @@ -237,20 +237,22 @@ if {$show_nav} { set prev_nav [subst $prev_nav_template] set next_nav [subst $next_nav_template] - append return_html "
$prev_nav     $day_of_the_week $next_nav    

\n" + append return_html " +
$prev_nav     $day_of_the_week $next_nav    
" } # Loop through the hours of the day - append return_html "
- \n" + append return_html "
+" # The items that have no hour set hour "" set next_hour "" set start_time "" - set display_hour "No Time" - append return_html "" - append return_html "" + append return_html "" + append return_html " + " for {set hour $start_hour} {$hour <= $end_hour} {incr hour} { @@ -294,7 +297,7 @@ } if {$ampm_hour < 10} { - set display_hour "0$ampm_hour" + set display_hour "$ampm_hour" } else { set display_hour "$ampm_hour" } @@ -307,8 +310,16 @@ append display_hour "am" } + if { $odd_row_p } { + set class "z_light" + set odd_row_p 0 + } else { + set class "z_dark" + set odd_row_p 1 + } + set display_hour [subst $hour_template] - append return_html "" + append return_html "\n" set n_processed_events 0 @@ -348,7 +359,7 @@ set colspan 1 } - append return_html "" + append return_html "" } else { append return_html "[ns_set value $calendar_details $index]
\n" } @@ -358,10 +369,10 @@ if {$n_processed_events == 0 || ($n_events($hour) < $max_n_events && $must_complete_p)} { if {$n_events($hour) == 0 || $n_events($hour) == $n_processed_events} { - append return_html "" + append return_html "" } else { for {set i 0} {$i < [expr "$max_n_events - $n_events($hour)"]} {incr i} { - append return_html "" + append return_html "" } } @@ -371,7 +382,9 @@ append return_html "\n" } - append return_html "
 [subst $hour_template] " + set odd_row_p 0 + set display_hour "\"No" + append return_html "
[subst $hour_template]" # Go through events while {1} { @@ -268,7 +270,8 @@ ns_set delete $calendar_details $index } - append return_html "
 $display_hour 
$display_hour[lindex $one_item_val 2][lindex $one_item_val 2]    
" + append return_html "
+

" return $return_html } @@ -400,7 +413,8 @@ # The title if {[empty_string_p $start_date] && [empty_string_p $end_date]} { - set title "All Items" + #This used to be All Items but that was just taking up space and not adding value so now we assume All Items and only give a title if its something else. - Caroline@meekshome.com + set title "" } if {[empty_string_p $start_date] && ![empty_string_p $end_date]} { @@ -426,10 +440,8 @@ # Create the header append return_html " - -
- - " +
Day of WeekDateStart TimeEnd Time
+ " if {$real_order_by != "item_type"} { append return_html "" @@ -466,20 +478,20 @@ } else { set item_type_for_title $item_type } - append return_html "\n" + append return_html "\n" set flip 0 } set old_item_type $item_type if {[expr $flip % 2] == 0} { - set bgcolor white + set z_class z_light } else { - set bgcolor #dddddd + set z_class z_dark } append return_html " - " + " if {$real_order_by != "item_type"} { append return_html "" @@ -489,7 +501,8 @@ incr flip } - append return_html "
Day of WeekDateStart TimeEnd TimeType
$item_type_for_title
$item_type_for_title
$weekday$date$start_time$end_time
$weekday$date$start_time$end_time$item_type
\n" + append return_html "
+" return $return_html } @@ -516,6 +529,13 @@ return 1 } + if {[regexp {[0-9]+-[0-9]+[0-9]+ (0?)0:0(0?)} $time the_match]} { + return 1 + } + + if {[regexp {[0-9]+-[0-9]+ (0?)0:0(0?)} $time the_match]} { + return 1 + } return 0 }