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 -N -r1.9 -r1.10 --- openacs-4/packages/calendar/www/mini-calendar.adp 3 Feb 2004 14:26:16 -0000 1.9 +++ openacs-4/packages/calendar/www/mini-calendar.adp 14 Feb 2004 18:40:55 -0000 1.10 @@ -1,143 +1,126 @@ - - - - - - - - - - - +
- @views.name@ - - @views.name@ -
+ + + + + + + + + - - - - -
+ @views.name@ + + @views.name@ +
- - - - - - -
- - @prev_year_url;noquote@ - - @curr_year@ - @next_year_url;noquote@ - - - - @prev_month_url;noquote@ - - @curr_month@ - @next_month_url;noquote@ - - + + + + + + + + + + + + + + +
+ + @curr_year@ + + + + @curr_month@ + +
-
- - - - - - - - - - - - - - - - - - + #acs-datetime.is# <%=[dt_ansi_to_pretty]%> +

+ + + + +
#acs-datetime.Date_as_YYYYMMDD# + + @form_vars;noquote@ + @page_num_formvar;noquote@ + + - -
- @months.name@ - - - @months.name@ -
- - - - - - - - - + + + + + + - - - - + + #acs-datetime.Today# + - - - - - - -
@days_of_week.day_short@
- -
+ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@months.name@@months.name@
@days_of_week.day_short@
+ @days.day_number@ + + @days.day_number@ + + @days.day_number@ +
- -
- - @days.day_number@ -
+

+ + #acs-datetime.Today# - -

- @days.day_number@ - - - @days.day_number@ -
- -
- - - - -
- - - - #acs-datetime.Today# - - - #acs-datetime.Today# - - - #acs-datetime.is# <%=[dt_ansi_to_pretty]%>

-
-
#acs-datetime.Date_as_YYYYMMDD# - - @form_vars;noquote@ - @page_num_formvar;noquote@ -
-
-
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 -N -r1.8 -r1.9 --- openacs-4/packages/calendar/www/mini-calendar.tcl 16 Oct 2003 13:20:06 -0000 1.8 +++ openacs-4/packages/calendar/www/mini-calendar.tcl 14 Feb 2004 18:40:55 -0000 1.9 @@ -22,14 +22,15 @@ } # Create row with existing views -multirow create views name text active_p +multirow create views name text active_p url foreach viewname {list day week month} { if { [string equal $viewname $view] } { set active_p t } else { set active_p f } - multirow append views [lang::util::localize $message_key_array($viewname)] $viewname $active_p + multirow append views [lang::util::localize $message_key_array($viewname)] $viewname $active_p \ + "[export_vars -base $base_url {date {view $viewname}}]$page_num" } set list_of_vars [list] @@ -56,12 +57,12 @@ set curr_year [clock format $now -format "%Y"] set prev_year [clock format [clock scan "1 year ago" -base $now] -format "%Y-%m-%d"] set next_year [clock format [clock scan "1 year" -base $now] -format "%Y-%m-%d"] - set prev_year_url "" - set next_year_url "" + set prev_year_url "$base_url?view=$view&date=[ad_urlencode $prev_year]$page_num" + set next_year_url "$base_url?view=$view&date=[ad_urlencode $next_year]$page_num" set now [clock scan $date] - multirow create months name current_month_p new_row_p target_date + multirow create months name current_month_p new_row_p target_date url for {set i 0} {$i < 12} {incr i} { @@ -84,15 +85,16 @@ [clock scan "[expr $i-$curr_month_idx] month" -base $now] -format "%Y-%m-%d"] set encoded_target_date [ad_urlencode $target_date] } - multirow append months $month $current_month_p $new_row_p $encoded_target_date + multirow append months $month $current_month_p $new_row_p $encoded_target_date \ + "[export_vars -base $base_url {{date $target_date} view}]$page_num" } } else { set curr_month [lindex $months_list $curr_month_idx ] set prev_month [clock format [clock scan "1 month ago" -base $now] -format "%Y-%m-%d"] set next_month [clock format [clock scan "1 month" -base $now] -format "%Y-%m-%d"] - set prev_month_url "" - set next_month_url "" + set prev_month_url "$base_url?view=$view&date=[ad_urlencode $prev_month]$page_num" + set next_month_url "$base_url?view=$view&date=[ad_urlencode $next_month]$page_num" set first_day_of_week [lc_get firstdayofweek] set week_days [lc_get abday] @@ -102,29 +104,29 @@ } - multirow create days day_number ansi_date beginning_of_week_p end_of_week_p today_p greyed_p + multirow create days day_number ansi_date beginning_of_week_p end_of_week_p today_p active_p url set day_of_week 1 - # Calculate number of greyed days - set greyed_days_before_month [expr [expr [dt_first_day_of_month $year $month]] -1 ] + # Calculate number of active days + set active_days_before_month [expr [expr [dt_first_day_of_month $year $month]] -1 ] # Adjust for i18n - set greyed_days_before_month [expr [expr $greyed_days_before_month + 7 - $first_day_of_week] % 7] + set active_days_before_month [expr [expr $active_days_before_month + 7 - $first_day_of_week] % 7] - set calendar_starts_with_julian_date [expr $first_julian_date_of_month - $greyed_days_before_month] - set day_number [expr $days_in_last_month - $greyed_days_before_month + 1] + set calendar_starts_with_julian_date [expr $first_julian_date_of_month - $active_days_before_month] + set day_number [expr $days_in_last_month - $active_days_before_month + 1] for {set julian_date $calendar_starts_with_julian_date} {$julian_date <= [expr $last_julian_date + 7]} {incr julian_date} { if {$julian_date > $last_julian_date_in_month && [string equal $end_of_week_p t] } { break } set today_p f - set greyed_p f + set active_p t if {$julian_date < $first_julian_date_of_month} { - set greyed_p t + set active_p f } elseif {$julian_date > $last_julian_date_in_month} { - set greyed_p t + set active_p f } set ansi_date [dt_julian_to_ansi $julian_date] @@ -150,7 +152,9 @@ } else { set end_of_week_p f } - multirow append days $day_number [ad_urlencode $ansi_date] $beginning_of_week_p $end_of_week_p $today_p $greyed_p + + multirow append days $day_number [ad_urlencode $ansi_date] $beginning_of_week_p $end_of_week_p $today_p $active_p \ + "[export_vars -base $base_url {{date $ansi_date} view}]$page_num" incr day_number incr day_of_week } Index: openacs-4/packages/calendar/www/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.adp,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/calendar/www/view.adp 10 Jan 2004 18:59:50 -0000 1.23 +++ openacs-4/packages/calendar/www/view.adp 14 Feb 2004 18:40:55 -0000 1.24 @@ -1,59 +1,50 @@ #calendar.Calendars# + - - - - - - - - -
+
- -

- #calendar.Add_Item##calendar.Add_Item# +

+ + #calendar.Add_Item##calendar.Add_Item# +

+ +

+ @notification_chunk;noquote@ +

+

+ + #calendar.lt_Calendar_Administrati# + +

+ +

+ +

+
-

-@notification_chunk;noquote@ - -

- - #calendar.lt_Calendar_Administrati# - - - -

+
+ + + - - - + + + + + + + + + + + + + +
- - - - - - - - - - - - -
Index: openacs-4/packages/calendar/www/resources/calendar.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/resources/calendar.css,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/calendar/www/resources/calendar.css 30 Dec 2003 23:30:10 -0000 1.2 +++ openacs-4/packages/calendar/www/resources/calendar.css 14 Feb 2004 18:40:56 -0000 1.3 @@ -87,28 +87,10 @@ BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; } -.cal-navbar a { - color: #999999; -} - -.cal-navbar a:visited { +.mini-calendar .view-list { COLOR: #999999; -} - -.cal-navbar a:hover { - COLOR: #000000; TEXT-DECORATION: none; -} - -.cal-navbar { - COLOR: #999999; - TEXT-DECORATION: none; - padding-top: 4px; - padding-bottom:4px; - text-align: center; FONT-SIZE: 8pt; - padding-right: 8px; - padding-left: 8px; white-space: nowrap; font-weight: bold; border-top: 0px solid #99CCFF; @@ -117,32 +99,46 @@ border-left: 0px solid #99CCFF; } -.cal-navbar-selected { - FONT-SIZE: 8pt; - COLOR: #004080; - TEXT-DECORATION: none; - text-align: center; - font-weight: bold; - padding-top: 4px; - padding-bottom:4px; +.mini-calendar .view-list td { padding-right: 8px; padding-left: 8px; - white-space: nowrap; + padding-top: 4px; + padding-bottom:4px; + text-align: center; +} + +.mini-calendar .view-list .selected { background-color: #CEE6FF; - border-top: 0px solid #99CCFF; - border-right: 0px solid #99CCFF; - border-bottom: 1px solid #99CCFF; - border-left: 0px solid #99CCFF; } -.cal-table-display { - width: 100%; - border: 0px none; - margin: 0px; - padding: 0px; +.mini-calendar .view-list a { + color: #999999; +} +.mini-calendar .view-list .selected a { + color: #000000; } +.mini-calendar .view-list .selected a:visited { + color: #000000; +} + +.mini-calendar .view-list a:visited { + COLOR: #999999; +} + +.mini-calendar .view-list a:hover { + COLOR: #000000; + TEXT-DECORATION: none; +} + + + + +.mini-calendar a { + text-decoration: none; +} + .cal-field { font-size: 8pt; color: #000000; @@ -314,49 +310,110 @@ border: 0px solid #7D7DFF; } -.cal-day { - font-weight: bold; +#at-a-glance { + font-weight: normal; + border: 0px solid; + line-height: 140%; +} + +#at-a-glance td { + margin: 3px; + padding: 1px; + width: 30px; + border: 1px solid #ffffff; background-color: #DDEEFF; - text-align: right; } -.cal-day-today { - font-weight: bold; - background-color: #003366; - text-align: right; - color: #FFFFFF; +#at-a-glance td.months { + width: 80px; +} +#at-a-glance td.selected { + background-color: darkgray; + color: #ffffff; } -.cal-day-inactive { +#at-a-glance td.selected a { + color: #ffffff; +} + +#at-a-glance td.selected a:link { + color: #ffffff; +} + +#at-a-glance td.selected a:visited { + color: #ffffff; +} + +#at-a-glance td.selected a:hover { + color: #ffffff; +} + +#at-a-glance td.selected a:active { + color: #ffffff; +} + +#at-a-glance tr.days td { font-weight: bold; + background-color: #FFFFFF; + text-align: right; + color: #000000; + border: 0px solid #002C5A; +} + +#at-a-glance td.inactive { background-color: #DDEEFF; text-align: right; - color: #999999; } -.cal-day-inactive a { +#at-a-glance td.inactive a { color: #999999; } -.cal-day-title { +#at-a-glance td.active { + background-color: #DDEEFF; + text-align: right; +} +#at-a-glance td.active:hover { + background-color: #cccccc; + text-align: right; +} + +#at-a-glance td.today { font-weight: bold; - background-color: #FFFFFF; text-align: right; - color: #000000; - border: 0px solid #002C5A; + background-color: #CC3300; } -.cal-day-table { - font-weight: normal; - background-color: #FFFFFF; - width: 100%; +#at-a-glance td.today a { + color: #FFFFFF; +} + +#jump { + BACKGROUND: #99CCFF; + color: #000000; margin: 0px; padding: 0px; - border: 0px solid; - line-height: 140%; } +#jump a { + color: #0055AA; +} + +#jump a:hover { + TEXT-DECORATION: underline; +} + +#jump tr { + text-align: center; +} + +#jump td { + padding-left: 1em; + font-size: smaller; +} + + .cal-spacer { line-height: 1px; font-size: 0px; @@ -367,23 +424,41 @@ border-bottom: 1px solid #003366; border-left: 0px solid #003366; } -.cal-month-title { + +.mini-calendar .header { + width: 100%; + border: 0px none; + margin: 0px; + padding: 0px; + +} + +.mini-calendar .header td.back { background-color: #003366; vertical-align: middle; + text-align: left; } -.cal-month-title-text { + +.mini-calendar .header td.forward { + background-color: #003366; + vertical-align: middle; + text-align: right; +} + +.mini-calendar .header td.current_view { font-size: 140%; font-weight: bold; background-color: #003366; text-align: center; color: #FFFFFF; } -.cal-table { +.mini-calendar { border: 1px solid #99CCFF; font-size: 90%; - + width: 240px; } + .cal-month { font-weight: bold; background-color: #DDEEFF; @@ -516,3 +591,16 @@ padding: 2px; font-size: 95%; } + + +/* view.adp styles */ +#viewadp-mini-calendar { + width: 240px; + float: left; +} + +#events { + margin-left: 250px; + margin-bottom: 0px; +} +