Index: openacs-4/packages/calendar/calendar.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/calendar.info,v diff -u -r1.37 -r1.38 --- openacs-4/packages/calendar/calendar.info 24 Jul 2008 07:19:21 -0000 1.37 +++ openacs-4/packages/calendar/calendar.info 30 Aug 2008 19:51:23 -0000 1.38 @@ -7,22 +7,22 @@ f f - + Dirk Gomez Personal and shared event calendars. - 2007-06-15 + 2008-06-12 OpenACS Manage group and shared calendars with download. 0 #calendar.Calendar# - + - - - + + + Index: openacs-4/packages/calendar/catalog/calendar.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/catalog/calendar.en_US.ISO-8859-1.xml,v diff -u -r1.30 -r1.31 --- openacs-4/packages/calendar/catalog/calendar.en_US.ISO-8859-1.xml 10 Dec 2007 09:12:28 -0000 1.30 +++ openacs-4/packages/calendar/catalog/calendar.en_US.ISO-8859-1.xml 30 Aug 2008 19:51:23 -0000 1.31 @@ -57,6 +57,7 @@ edit End Time Event + Events Display events for today Display events for the next 7 days Display events for the next 14 days @@ -72,14 +73,17 @@ Go to year %prev_year% Go to %cal_item.pretty_short_start_date% Go to day %items.day_number% + Go to %items.pretty_date% Go to day %days.day_number% + Go to %days.pretty_date% Go to %items.event_name% Go to %items_without_time.event_name% Go to %months.name% Go to today Go to %days_of_week.day_short% %days_of_week.monthday% Grant Grant Permissions + Hours Item is recurring. Item last week Index: openacs-4/packages/calendar/catalog/calendar.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/catalog/calendar.es_ES.ISO-8859-1.xml,v diff -u -r1.17 -r1.18 --- openacs-4/packages/calendar/catalog/calendar.es_ES.ISO-8859-1.xml 10 Dec 2007 09:12:28 -0000 1.17 +++ openacs-4/packages/calendar/catalog/calendar.es_ES.ISO-8859-1.xml 30 Aug 2008 19:51:23 -0000 1.18 @@ -47,6 +47,7 @@ editar Fin Evento + Eventos Mostrar les eventos para hoy Mostrar los eventos de los pr�ximos 7 d�as Mostrar los eventos de los pr�ximos 14 d�as @@ -62,14 +63,17 @@ Ir al a�o %prev_year% Ir a %cal_item.pretty_short_start_date% Ir al d�a %items.day_number% + Ir a %items.pretty_date% Ir al d�a %days.day_number% + Ir a %days.pretty_date% Ir a %items.event_name% Ir a %items_without_time.event_name% Ir a %months.name% Ir a hoy Ir a %days_of_week.day_short% %days_of_week.monthday% Otorgar Autorizar + Horas El evento se repite Evento semana anterior @@ -90,26 +94,26 @@ todo el mundo tiene permisos de lectura y puede ver los eventos, tanto los usuarios registrados como los no registrados. Ir al %days.day_number% de %month_name% del %year% Ir a %months.name% del %curr_year% - Ir a %months.name% %curr_year%>%months.name%</a></td> - </else> - </multiple> - </if> - - <else> - <tr class="days"> - <multiple name="days_of_week"> - <td>%days_of_week.day_short%</td> - </multiple> - </tr> - - <multiple name="days"> - <if %days.beginning_of_week_p% true> - <tr> - </if> - - <if %days.active_p% true> - <if %days.today_p% true> - <td class="today" onclick="javascript:location.href='%days.url%';"> + Ir a %months.name% %curr_year%>%months.name%</a></td> + </else> + </multiple> + </if> + + <else> + <tr class="days"> + <multiple name="days_of_week"> + <td>%days_of_week.day_short%</td> + </multiple> + </tr> + + <multiple name="days"> + <if %days.beginning_of_week_p% true> + <tr> + </if> + + <if %days.active_p% true> + <if %days.today_p% true> + <td class="today" onclick="javascript:location.href='%days.url%';"> <a href="%days.url%" title="<#_ Go to %month_name% %days.day_number%, %year% Ocultar los calendarios seleccionados Administrar las Audiencias del Calendario Index: openacs-4/packages/calendar/tcl/cal-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/calendar/tcl/cal-item-procs.tcl 16 Aug 2006 17:52:14 -0000 1.22 +++ openacs-4/packages/calendar/tcl/cal-item-procs.tcl 30 Aug 2008 19:51:23 -0000 1.23 @@ -45,9 +45,15 @@ set activity_id [db_exec_plsql insert_activity {} ] # Convert from user timezone to system timezone - set start_date [lc_time_conn_to_system $start_date] - set end_date [lc_time_conn_to_system $end_date] - + if { $start_date ne $end_date } { + + # Convert to server timezone only if it's not an all-day event + # otherwise, keep the start and end time as 00:00 + + set start_date [lc_time_conn_to_system $start_date] + set end_date [lc_time_conn_to_system $end_date] + } + set timespan_id [db_exec_plsql insert_timespan {}] # create the cal_item @@ -109,7 +115,7 @@ set row(end_date_ansi) [lc_time_system_to_conn $row(end_date_ansi)] } - if { $row(start_date_ansi) == $row(end_date_ansi) && [string equal [lc_time_fmt $row(start_date_ansi) "%T"] "00:00:00"]} { + if { $row(start_date_ansi) eq $row(end_date_ansi) } { set row(time_p) 0 } else { set row(time_p) 1 @@ -187,9 +193,15 @@ } # Convert from user timezone to system timezone - set start_date [lc_time_conn_to_system $start_date] - set end_date [lc_time_conn_to_system $end_date] + if { $start_date ne $end_date } { + # Convert to server timezone only if it's not an all-day event + # otherwise, keep the start and end time as 00:00 + + set start_date [lc_time_conn_to_system $start_date] + set end_date [lc_time_conn_to_system $end_date] + } + db_dml update_event {} # update the time interval based on the timespan id Index: openacs-4/packages/calendar/tcl/calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/calendar/tcl/calendar-procs.tcl 7 Oct 2007 22:36:55 -0000 1.31 +++ openacs-4/packages/calendar/tcl/calendar-procs.tcl 30 Aug 2008 19:51:23 -0000 1.32 @@ -224,7 +224,8 @@ return [list day_number $day_number \ today_p $today_p \ beginning_of_week_p $beginning_of_week_p \ - end_of_week_p $end_of_week_p] + end_of_week_p $end_of_week_p \ + weekday $weekday] } ad_proc -public calendar::from_sql_datetime { Index: openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 8 Aug 2006 21:26:18 -0000 1.7 +++ openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 30 Aug 2008 19:51:23 -0000 1.8 @@ -28,7 +28,7 @@ set checked_html "" } - set dow_string "$dow_string [lindex $dow 0]  \n" + set dow_string "$dow_string [lindex $dow 0]  \n" } set recurrance_options [list \ @@ -56,11 +56,10 @@ {recur_until:date {label "[_ calendar.lt_Repeat_this_event_unt]"} - {format "YYYY MM DD"} - {html {id sel1}} - {after_html { \[[_ calendar.y-m-d]\] - } } - + {format "YYYY MM DD"} + {after_html { \[[_ calendar.y-m-d]\]} + } + } {submit:text(submit) {label "[_ calendar.Add_Recurrence]"}} Index: openacs-4/packages/calendar/www/cal-item-delete-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-delete-confirm.adp,v diff -u -r1.14 -r1.15 --- openacs-4/packages/calendar/www/cal-item-delete-confirm.adp 17 Dec 2007 14:10:37 -0000 1.14 +++ openacs-4/packages/calendar/www/cal-item-delete-confirm.adp 30 Aug 2008 19:51:23 -0000 1.15 @@ -2,53 +2,57 @@ #calendar.Calendar_Item_Delete#: @cal_item.name;noquote@ #calendar.Delete# - +
+ +
- - +
-
- -
- - - - - - - - - - - - - - - - - - - - - -
#calendar.Title#@cal_item.name@
#calendar.Type#@cal_item.item_type@
- #calendar.Date_1# #calendar.and_Time#: - - @cal_item.pretty_short_start_date@ - , #calendar.from# @cal_item.start_time@ #calendar.to# @cal_item.end_time@ -
#calendar.Description#@cal_item.description@
- -

#calendar.lt_This_is_a_repeating_e##calendar._You_may_choose_to#

- -
- -

#calendar.lt_Are_you_sure_you_want_1#

-

- #calendar.yes_delete_it# - #calendar.no_keep_it# -

-
-
+
+
#calendar.Title#
+
@cal_item.name@
+
+ + +
+
#calendar.Type#
+
@cal_item.item_type@
+
+
+ +
+
+ + #calendar.Date_1# + #calendar.and_Time#: + +
+
+ @cal_item.pretty_short_start_date@ + , #calendar.from# @cal_item.start_time@ #calendar.to# @cal_item.end_time@ +
+
+
+
#calendar.Description#
+
@cal_item.description@
+
+ +
+ +

+ #calendar.lt_This_is_a_repeating_e# + #calendar._You_may_choose_to# +

+

+ #calendar.lt_delete_only_this_inst# + #calendar.lt_delete_all_occurrence# + + +

#calendar.lt_Are_you_sure_you_want_1#

+

+ #calendar.yes_delete_it# + #calendar.no_keep_it# +

+ +
+ Index: openacs-4/packages/calendar/www/cal-item-delete-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-delete-confirm.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/calendar/www/cal-item-delete-confirm.tcl 17 Dec 2007 14:10:37 -0000 1.10 +++ openacs-4/packages/calendar/www/cal-item-delete-confirm.tcl 30 Aug 2008 19:51:23 -0000 1.11 @@ -18,11 +18,23 @@ calendar::item::get -cal_item_id $cal_item_id -array cal_item # no time? -set cal_item(no_time_p) [dt_no_time_p -start_time $cal_item(start_time) -end_time $cal_item(end_time)] +set cal_item(no_time_p) [expr {!$cal_item(time_p)}] set date $cal_item(start_date) # Header stuff template::head::add_css -href "/resources/calendar/calendar.css" -media all +template::head::add_css -alternate -href "/resources/calendar/calendar-hc.css" -title "highContrast" + +set view_url [export_vars -base "view" {{view day} {date $cal_item(start_date)}}] + +if { $cal_item(recurrence_id) ne "" } { + set delete_one [export_vars -base "cal-item-delete" {cal_item_id {confirm_p 1}}] + set delete_all [export_vars -base "cal-item-delete-all-occurrences" {{recurrence_id $cal_item(recurrence_id)}}] +} else { + set delete_confirm [export_vars -base "cal-item-delete" {cal_item_id {confirm_p 1}}] + set delete_cancel [export_vars -base "cal-item-view" {cal_item_id}] +} + ad_return_template Index: openacs-4/packages/calendar/www/cal-item-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-new.adp,v diff -u -r1.21 -r1.22 --- openacs-4/packages/calendar/www/cal-item-new.adp 4 Jan 2008 15:47:48 -0000 1.21 +++ openacs-4/packages/calendar/www/cal-item-new.adp 30 Aug 2008 19:51:23 -0000 1.22 @@ -40,7 +40,7 @@ -
+
Index: openacs-4/packages/calendar/www/cal-item-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-new.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/packages/calendar/www/cal-item-new.tcl 17 Dec 2007 14:10:37 -0000 1.35 +++ openacs-4/packages/calendar/www/cal-item-new.tcl 30 Aug 2008 19:51:23 -0000 1.36 @@ -14,7 +14,7 @@ {julian_date ""} {start_time ""} {end_time ""} - {view "month"} + {view "day"} {return_url "./"} } auth::require_login @@ -34,6 +34,7 @@ # Header stuff template::add_body_handler -event "onload" -script "TimePChanged()" template::head::add_css -href "/resources/calendar/calendar.css" -media all +template::head::add_css -alternate -href "/resources/calendar/calendar-hc.css" -title "highContrast" # TODO: Move into ad_form if { ![ad_form_new_p -key cal_item_id] } { Index: openacs-4/packages/calendar/www/cal-item-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-view.adp,v diff -u -r1.32 -r1.33 --- openacs-4/packages/calendar/www/cal-item-view.adp 4 Jan 2008 15:47:48 -0000 1.32 +++ openacs-4/packages/calendar/www/cal-item-view.adp 30 Aug 2008 19:51:23 -0000 1.33 @@ -6,17 +6,11 @@ - - - - - + -
+
-
- -
+

#calendar.calendar_event_details#

@@ -94,7 +88,4 @@
- - -
-
+
Index: openacs-4/packages/calendar/www/cal-item-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-view.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/calendar/www/cal-item-view.tcl 17 Dec 2007 14:10:37 -0000 1.21 +++ openacs-4/packages/calendar/www/cal-item-view.tcl 30 Aug 2008 19:51:23 -0000 1.22 @@ -26,7 +26,7 @@ } # no time? -set cal_item(no_time_p) [dt_no_time_p -start_time $cal_item(start_time) -end_time $cal_item(end_time)] +set cal_item(no_time_p) [expr {!$cal_item(time_p)}] # Attachment URLs if {[calendar::attachments_enabled_p]} { @@ -46,6 +46,7 @@ # Header stuff template::head::add_css -href "/resources/calendar/calendar.css" -media all +template::head::add_css -alternate -href "/resources/calendar/calendar-hc.css" -title "highContrast" ad_return_template Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-nav.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-nav.tcl'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.22 --- openacs-4/packages/calendar/www/mini-calendar.adp 3 Jan 2008 18:15:23 -0000 1.21 +++ openacs-4/packages/calendar/www/mini-calendar.adp 30 Aug 2008 19:51:23 -0000 1.22 @@ -1,32 +1,20 @@ - - +
+ - - + #calendar.prev_year# + @curr_month@ @curr_day@ @curr_year@ + #calendar.next_year# - - - + #calendar.prev_month# + @curr_month@ @curr_day@ @curr_year@ + #calendar.next_month# - -
-
- #calendar.prev_year# - @curr_month@ @curr_day@ @curr_year@ - #calendar.next_year# - - #calendar.prev_month# - @curr_month@ @curr_day@ @curr_year@ - #calendar.next_month# -
- - + + - - - + - + + - + - + + - - - +
- - + + @@ -38,51 +26,45 @@ -
-
@days_of_week.day_short@@days_of_week.day_short@
- - + - - - - -
- @days.day_number@ + + @days.day_number@ - @days.day_number@ + + @days.day_number@ - @days.day_number@ + + @days.day_number@
-
@@ -98,4 +80,3 @@ - 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 -r1.19 --- openacs-4/packages/calendar/www/mini-calendar.tcl 13 Aug 2007 06:06:33 -0000 1.18 +++ openacs-4/packages/calendar/www/mini-calendar.tcl 30 Aug 2008 19:51:23 -0000 1.19 @@ -8,16 +8,15 @@ ad_form -name go-to-date -method get -has_submit 1 -action $base_url -export [lappend list_of_vars page_num] -html {class inline-form} -form { {date:text,nospell,optional - {label ""} - {html {size 10}} - {after-html "
[_ acs-datetime.Date_as_YYYYMMDD]"} + {label "[_ acs-datetime.Date]"} + {html {size 10}} } {btn_ok:text(submit) {label "[_ calendar.Go_to_date]"} } {view:text(hidden) - {label ""} - {value "day"} + {label ""} + {value "day"} } } -on_submit { } @@ -127,16 +126,17 @@ set next_month_url "$base_url?view=$view&date=[ad_urlencode $next_month]${page_num}${url_stub_period_days}" set first_day_of_week [lc_get firstdayofweek] - #set week_days [list S M T W T F Sa] set week_days [lc_get abday] - multirow create days_of_week day_short + set long_weekdays [lc_get day] + 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]] + multirow append days_of_week \ + [lindex $week_days [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 day_num pretty_date - multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url - set day_of_week 1 # Calculate number of active days @@ -159,6 +159,7 @@ set active_p f } set ansi_date [dt_julian_to_ansi $julian_date] + set pretty_date [lc_time_fmt $ansi_date %Q] if {$julian_date == $first_julian_date_of_month} { set day_number 1 @@ -170,6 +171,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 { @@ -183,8 +185,14 @@ set end_of_week_p f } + set weekday [lindex $long_weekdays $day_of_week] + 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}" + "[export_vars -base $base_url {{date $ansi_date} view}]${page_num}${url_stub_period_days}" \ + $weekday \ + $day_num \ + $pretty_date + incr day_number incr day_of_week } Index: openacs-4/packages/calendar/www/navbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/navbar.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/www/navbar.adp 13 Aug 2007 06:37:57 -0000 1.3 +++ openacs-4/packages/calendar/www/navbar.adp 30 Aug 2008 19:51:23 -0000 1.4 @@ -4,10 +4,7 @@ class="active"> - onclick="@views.onclick@"> - - #calendar.view# - + onclick="@views.onclick@"> @views.name;noquote@@views.spacer;noquote@ Index: openacs-4/packages/calendar/www/navbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/navbar.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/navbar.tcl 15 May 2007 20:14:21 -0000 1.2 +++ openacs-4/packages/calendar/www/navbar.tcl 30 Aug 2008 19:51:23 -0000 1.3 @@ -34,13 +34,12 @@ set link "[export_vars -base $base_url {date {view day}}]&export=print" } -multirow create views name text url icon spacer selected_p onclick +multirow create views name text url spacer selected_p onclick multirow append views \ "Day" \ "day" \ "[export_vars -base $base_url {date {view day}}]${page_num}\#calendar" \ - "/resources/calendar/images/calendar_view_day.gif" \ "   |   " \ $day_selected_p \ "" @@ -49,7 +48,6 @@ "Week" \ "week" \ "[export_vars -base $base_url {date {view week}}]${page_num}\#calendar" \ - "/resources/calendar/images/calendar_view_week.gif" \ "   |   " \ $week_selected_p \ "" @@ -58,7 +56,6 @@ "Month" \ "month" \ "[export_vars -base $base_url {date {view month}}]${page_num}\#calendar" \ - "/resources/calendar/images/calendar_view_month.gif" \ "   |      " \ $month_selected_p \ "" @@ -67,7 +64,6 @@ " Calendar" \ "calendar" \ "[export_vars -base $base_url {date {view month}}]${page_num}\#calendar" \ - "/resources/calendar/images/calendar-icon.gif" \ "    |    " \ $calendar_selected_p \ "" @@ -76,7 +72,6 @@ " List" \ "list" \ "[export_vars -base $base_url {date {view list}}]${page_num}${url_stub_period_days}\#calendar" \ - "/resources/calendar/images/list-icon.gif" \ "    |    " \ $list_selected_p \ "" @@ -85,7 +80,6 @@ " Print" \ "print" \ "[export_vars -url -base $base_url -entire_form -exclude {export}]&export=print" \ - "/resources/calendar/images/print-icon.gif" \ "" \ f \ "return calOpenPrintView('[export_vars -url -base $base_url -entire_form -exclude {export}]&export=print');" 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 -r1.23 --- openacs-4/packages/calendar/www/view-month-display.adp 3 Jan 2008 18:15:23 -0000 1.22 +++ openacs-4/packages/calendar/www/view-month-display.adp 30 Aug 2008 19:51:23 -0000 1.23 @@ -1,89 +1,64 @@ -<% ns_log notice "DAVEB 103 view-month-display.adp" %> + -

- #calendar.prev_month# +

-
+ #calendar.prev_month#  @month_string@ @year@  - #calendar.next_month# - + #calendar.next_month# +
- - - - - + + + + + + + - - -
- @weekday_names.weekday_short@ -
+ @weekday_names.weekday_long@ +
+
+ - + + + - + + + + + + - + + - - - - - - + - - - - - + - - - - - - - - - - - - -
  + + + + +  [@items.day_number@ ] - + + + + + - -
  - - - - -  [@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 -r1.23 --- openacs-4/packages/calendar/www/view-month-display.tcl 7 Oct 2007 22:36:55 -0000 1.22 +++ openacs-4/packages/calendar/www/view-month-display.tcl 30 Aug 2008 19:51:23 -0000 1.23 @@ -83,18 +83,20 @@ set last_day_of_week [expr [expr $first_day_of_week + 6] % 7] set week_days [lc_get day] -multirow create weekday_names weekday_short +multirow create weekday_names weekday_num weekday_long for {set i 0} {$i < 7} {incr i} { - multirow append weekday_names [lindex $week_days [expr [expr $i + $first_day_of_week] % 7]] + set i_day [expr {[expr {$i + $first_day_of_week}] % 7}] + multirow append weekday_names $i_day [lindex $week_days $i_day] } # Get the beginning and end of the month in the system timezone set first_date_of_month [dt_julian_to_ansi $first_julian_date_of_month] -set first_date_of_month_system [lc_time_conn_to_system "$first_date_of_month 00:00:00"] set last_date_in_month [dt_julian_to_ansi $last_julian_date_in_month] -set last_date_in_month_system [lc_time_conn_to_system "$last_date_in_month 23:59:59"] +set first_date_of_month_system "$first_date_of_month 00:00:00" +set last_date_in_month_system "$last_date_in_month 23:59:59" + set day_number $first_day set today_ansi_list [dt_ansi_to_list $today_date] @@ -107,7 +109,7 @@ event_url \ description \ calendar_name \ - weekday \ + pretty_date \ start_date \ end_date \ start_time \ @@ -122,7 +124,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 ] @@ -157,7 +160,8 @@ "" \ "" \ "" \ - "" + "" \ + "" } } @@ -169,24 +173,23 @@ set interval_limitation_clause [db_map dbqd.calendar.www.views.month_interval_limitation] db_foreach dbqd.calendar.www.views.select_items {} { - # Convert from system timezone to user timezone - set ansi_start_date [lc_time_system_to_conn $ansi_start_date] - set ansi_end_date [lc_time_system_to_conn $ansi_end_date] + if { $ansi_start_date eq $ansi_end_date } { + set time_p 0 + } else { + set time_p 1 + # Convert from system timezone to user timezone + set ansi_start_date [lc_time_system_to_conn $ansi_start_date] + set ansi_end_date [lc_time_system_to_conn $ansi_end_date] + } + # Localize set pretty_weekday [lc_time_fmt $ansi_start_date "%A"] set pretty_start_date [lc_time_fmt $ansi_start_date "%x"] set pretty_end_date [lc_time_fmt $ansi_end_date "%x"] set pretty_start_time [lc_time_fmt $ansi_start_date "%X"] set pretty_end_time [lc_time_fmt $ansi_end_date "%X"] - if { [string equal $ansi_start_date $ansi_end_date] && \ - [string equal [lc_time_fmt $ansi_start_date "%T"] "00:00:00"] } { - set time_p 0 - } else { - set time_p 1 - } - set julian_start_date [dt_ansi_to_julian_single_arg $ansi_start_date] if {!$exporting_p && $current_day < $julian_start_date} { @@ -196,17 +199,18 @@ -current_day $current_day \ -today_julian_date $today_julian_date \ -first_julian_date_of_month $first_julian_date_of_month] + multirow append items \ "" \ "" \ "" \ "" \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %Q] \ "" \ "" \ "" \ "" \ "" \ - "" \ $display_information(day_number) \ $display_information(beginning_of_week_p) \ $display_information(end_of_week_p) \ @@ -216,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] } } @@ -244,7 +249,7 @@ [subst $item_template] \ $description \ $calendar_name \ - $pretty_weekday \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %Q] \ $pretty_start_date \ $pretty_end_date \ $pretty_start_time \ @@ -259,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 } { @@ -279,12 +285,12 @@ "" \ "" \ "" \ + [lc_time_fmt [dt_julian_to_ansi $current_day] %Q] \ "" \ "" \ "" \ "" \ "" \ - "" \ $display_information(day_number) \ $display_information(beginning_of_week_p) \ $display_information(end_of_week_p) \ @@ -294,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 @@ -322,7 +329,8 @@ "" \ "" \ "" \ - "" + "" \ + "" } } } Index: openacs-4/packages/calendar/www/view-one-day-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.adp,v diff -u -r1.24 -r1.25 --- openacs-4/packages/calendar/www/view-one-day-display.adp 7 May 2008 23:07:32 -0000 1.24 +++ openacs-4/packages/calendar/www/view-one-day-display.adp 30 Aug 2008 19:51:23 -0000 1.25 @@ -1,35 +1,34 @@ - - - - - - +
-

@curr_day_name@ @curr_month@ @curr_day@ @curr_year@

-
- - - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - -
@pretty_date@
#calendar.Hours##calendar.Events#
+
-

@items.event_name@

+

@items.event_name@

-
+ +
-
-
+ +
Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 7 Oct 2007 22:36:55 -0000 1.36 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 30 Aug 2008 19:51:23 -0000 1.37 @@ -29,6 +29,7 @@ } set current_date $date +set pretty_date [lc_time_fmt $current_date %Q] if {[info exists portlet_mode_p] && $portlet_mode_p} { set event_url_template "\${url_stub}cal-item-view?show_cal_nav=0&return_url=[ad_urlencode "../"]&action=edit&cal_item_id=\$item_id" @@ -90,7 +91,7 @@ # Loop through the items without time -set additional_limitations_clause " and to_char(start_date, 'HH24:MI') = '00:00' and to_char(end_date, 'HH24:MI') = '00:00'" +set additional_limitations_clause " and to_char(start_date, 'HH24:MI') = to_char(end_date, 'HH24:MI')" if { [exists_and_not_null cal_system_type] } { append additional_limitations_clause " and system_type = :cal_system_type " } @@ -141,11 +142,11 @@ incr bump_right_base $bump_right_delta } -set additional_limitations_clause " and (to_char(start_date, 'HH24:MI') <> '00:00' or to_char(end_date, 'HH24:MI') <> '00:00')" +set additional_limitations_clause " and to_char(start_date, 'HH24:MI') <> to_char(end_date, 'HH24:MI')" if { [exists_and_not_null cal_system_type] } { append additional_limitations_clause " and system_type = :cal_system_type " } -set order_by_clause " order by to_char(start_date,'HH24')" +set order_by_clause " order by to_char(start_date,'HH24:MI')" set day_items_per_hour {} set adjusted_start_display_hour $start_display_hour @@ -167,6 +168,9 @@ set start_time [lc_time_fmt $ansi_start_date "%X"] set end_time [lc_time_fmt $ansi_end_date "%X"] + set start_hour [format %.0f [lc_time_fmt $ansi_start_date "%H"]] + set end_hour [format %.0f [lc_time_fmt $ansi_end_date "%H"]] + if { $start_hour < $adjusted_start_display_hour && \ [string equal \ [string range $ansi_start_date 0 9] \ 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.19 -r1.20 --- openacs-4/packages/calendar/www/view-week-display.adp 7 May 2008 23:07:32 -0000 1.19 +++ openacs-4/packages/calendar/www/view-week-display.adp 30 Aug 2008 19:51:23 -0000 1.20 @@ -1,88 +1,55 @@ - - - - - - - - - - - - - -
- - - - -
-

- #calendar.prev_week# -  #calendar.Week_of# @week_start_month@ @week_start_day@ @week_start_year@ – @week_end_month@ @week_end_day@ @week_end_year@  - #calendar.next_week# -

-
-
- +
+ + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + -
+ #calendar.prev_week# +  #calendar.Week_of# @dates@  + #calendar.next_week# +
#calendar.Hours# + @days_of_week.day_short@ @days_of_week.monthday@ +

@grid_first_hour@

+
+ +
+

@items.event_name@

+
+
+
+
      

 

@days_of_week.day_short@ @days_of_week.monthday@

@grid.hour@

@grid.hour@

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@grid_first_hour@

-
- -
-

@items.event_name@

-
-
-
-
      

@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.21 -r1.22 --- openacs-4/packages/calendar/www/view-week-display.tcl 26 Aug 2008 22:35:12 -0000 1.21 +++ openacs-4/packages/calendar/www/view-week-display.tcl 30 Aug 2008 19:51:23 -0000 1.22 @@ -133,8 +133,12 @@ set start_time [lc_time_fmt $ansi_start_date "%X"] set end_time [lc_time_fmt $ansi_end_date "%X"] + set start_hour [format %.0f [lc_time_fmt $ansi_start_date "%H"]] + set end_hour [format %.0f [lc_time_fmt $ansi_end_date "%H"]] + set ansi_this_date [dt_julian_to_ansi [expr $first_weekday_julian + $current_weekday]] - if {[string equal $start_time "12:00 AM"] && [string equal $end_time "12:00 AM"]} { + + if { $start_time eq $end_time } { set no_time_p t } else { set no_time_p f @@ -162,7 +166,7 @@ set previous_intervals [list] } - if {[string equal $no_time_p t]} { + if { $no_time_p } { #All day event set top_hour 0 set top_minutes 0 @@ -189,29 +193,6 @@ set adjusted_end_display_hour $end_hour } - -# if { $start_hour < 9 } { -# set top_hour 9 -# set top_minutes 0 -# } elseif { $start_hour > 21 } { -# set top_hour 22 -# set top_minutes 0 -# } else { -# set top_hour $start_hour -# set top_minutes $start_minutes -# } - -# if { $end_hour < 9 } { -# set bottom_hour 9 -# set bottom_minutes 0 -# } elseif { $end_hour > 21 } { -# set bottom_hour 22 -# set bottom_minutes 0 -# } else { -# set bottom_hour $end_hour -# set bottom_minutes $end_minutes -# } - } set top [expr ($top_hour * ($hour_height_inside+$hour_height_sep)) \ @@ -228,12 +209,13 @@ #Assumption: for any given day we will loop through all-day events #before looping through regular events. set bumps 0 - if {$start_hour == 0 && $start_minutes == 0 && $end_hour == 0 && $end_minutes == 0} { + if { $no_time_p } { #All-day event. incr event_left_base $event_bump_delta incr all_day_events } else { #Regular event. + set name "$name ($start_time - $end_time)" foreach {previous_start previous_end} $previous_intervals { if { ($start_seconds >= $previous_start && $start_seconds < $previous_end) || ($previous_start >= $start_seconds && $previous_start < $end_seconds) } { incr bumps @@ -325,7 +307,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 +321,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 Index: openacs-4/packages/calendar/www/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.adp,v diff -u -r1.33 -r1.34 --- openacs-4/packages/calendar/www/view.adp 3 Jan 2008 18:15:23 -0000 1.33 +++ openacs-4/packages/calendar/www/view.adp 30 Aug 2008 19:51:23 -0000 1.34 @@ -11,35 +11,36 @@

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

@notification_chunk;noquote@

-

- - #calendar.lt_Calendar_Administrati# - -

-
+
- + Index: openacs-4/packages/calendar/www/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/calendar/www/view.tcl 17 Dec 2007 14:10:37 -0000 1.26 +++ openacs-4/packages/calendar/www/view.tcl 30 Aug 2008 19:51:23 -0000 1.27 @@ -64,5 +64,6 @@ # Header stuff template::head::add_css -href "/resources/calendar/calendar.css" -media all +template::head::add_css -alternate -href "/resources/calendar/calendar-hc.css" -title "highContrast" ad_return_template Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/resources/calendar-hc.css'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.12 -r1.13 --- openacs-4/packages/calendar/www/resources/calendar.css 15 May 2007 20:14:21 -0000 1.12 +++ openacs-4/packages/calendar/www/resources/calendar.css 30 Aug 2008 19:51:23 -0000 1.13 @@ -33,29 +33,30 @@ font-weight: normal; overflow: hidden; border:1px #ffffff solid; - -moz-opacity:.9; - filter:alpha(opacity=90); + opacity:.9; } .cal-month-event a { font-weight: normal; } .cal-month-table { - border: 0px none; margin: 0px; padding: 0px; border-top: 1px #89A2B3 solid; border-left: 1px #89A2B3 solid; } -.cal-month-table td { +.cal-month-table th { + background-color: #ffffff; +} + +.cal-month-table td, .cal-month-table th { border-right: 1px #89A2B3 solid; border-bottom: 1px #89A2B3 solid; padding: 2px; } - /* END Month View ---------------------------------------------------*/ .cal-input-field { @@ -67,6 +68,18 @@ } +.cal-table-caption { + font-size: 1.2em; + font-weight: bold; + color: #646c61; + margin: 1em; +} + +.cal-table-caption img { + border: 0; + vertical-align: middle; +} + /* at-a-glance ---------------------------------------------------*/ /* This is the small cal that appears in month/week/day views on the left hand side*/ @@ -75,11 +88,17 @@ margin-right: 5px; } -.at-a-glance-head-current_view { - text-align: center; +#at-a-glance { + border-top: 1px solid #B8B8B8; + border-left: 1px solid #B8B8B8; } -#at-a-glance td { +#at-a-glance caption img { + border: 0; + vertical-align: middle; +} + +#at-a-glance th, #at-a-glance td { width: 25px; height:25px; border-right: 1px solid #B8B8B8; @@ -89,7 +108,7 @@ } #at-a-glance td.months { - width: 80px; + width: 70px; } #at-a-glance td.selected { @@ -136,36 +155,27 @@ /* cal-item-view, cal-item-new ---------------------------------------------------*/ #viewadp-mini-calendar { - width: 240px; + width: 25%; float: left; + margin-bottom: 1em; } -#events { - /* margin-left: 250px; */ - margin-bottom: 0px; +#viewadp-cal-table { + float: right; + width: 75%; + margin-bottom: 1em; } -/* Navigation at the bottom of Month/Week views */ - -.calendar-back-forward { - padding-top:6px; -} - -.calendar-back-forward img { - vertical-align:middle; - padding-bottom:2px; - border:0px; -} -/* /Navigation at the bottom of Month/Week views */ - - - /* Week/Day View Common Styles ---------------------------------------------------*/ #cal-table-day, #cal-table-week { background-color:#89A2B3; } +#cal-table-day th, #cal-table-week th { + background-color: #ffffff; +} + .day-time-1 { border:1px #ffffff solid; background-color:#D8E0E6; @@ -203,6 +213,7 @@ width:100%; top:0px; z-index:3; + font-size: 90%; } .week-entry-box a { @@ -215,10 +226,9 @@ width:65px; border:1px #ffffff solid; height:28px; - -moz-opacity:.9; - filter:alpha(opacity=90); + opacity:.9; overflow:hidden; - cursor: hand; + cursor: pointer; right:0px; } @@ -251,8 +261,7 @@ height:43px; overflow: hidden; border:1px #ffffff solid; - -moz-opacity:.9; - filter:alpha(opacity=90); + opacity:.9; font-size: 90%; } @@ -310,18 +319,44 @@ border:0px; } +a.cal-icons { + background-color: inherit; + background-position : left bottom; + background-repeat : no-repeat; + padding-left : 20px; +} +a.day-view { + background-image: url("/resources/calendar/images/calendar_view_day.gif"); +} +a.week-view { + background-image: url("/resources/calendar/images/calendar_view_week.gif"); +} +a.month-view { + background-image: url("/resources/calendar/images/calendar_view_month.gif"); +} +a.calendar-view { + background-image: url("/resources/calendar/images/calendar-icon.gif"); +} +a.list-view { + background-image: url("/resources/calendar/images/list-icon.gif"); +} +a.print-view { + background-image: url("/resources/calendar/images/print-icon.gif"); +} + + /* UNUSED?*/ @@ -348,8 +383,7 @@ .calendar-Item { background-color:#FFFFFF; border: 1px solid #89A2B3; - -moz-opacity:.9; - filter:alpha(opacity=90); + opacity:.9; } .calendar-classItem {