select type, item_type_id from cal_item_types
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/calendar/tcl/calendar-outlook-procs-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/calendar/tcl/calendar-outlook-procs-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/calendar/tcl/calendar-outlook-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-outlook-procs.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/calendar/tcl/calendar-outlook-procs.tcl 17 May 2003 10:20:50 -0000 1.9
+++ openacs-4/packages/calendar/tcl/calendar-outlook-procs.tcl 11 Aug 2003 12:14:15 -0000 1.10
@@ -22,15 +22,6 @@
namespace eval calendar::outlook {
- ad_proc -private adjust_timezone {
- {-timestamp:required}
- {-server_tz:required}
- {-user_tz:required}
- {-format "YYYY-MM-DD HH24:MI:SS"}
- } {
- return [db_string adjust_timezone {}]
- }
-
ad_proc ics_timestamp_format {
{-timestamp:required}
} {
@@ -75,13 +66,6 @@
calendar::item::get -cal_item_id $cal_item_id -array cal_item
# If necessary, select recurrence information
- # Convert some dates for timezone
- set server_tz [parameter::get_from_package_key -package_key acs-lang -parameter SystemTimezone]
- set cal_item(full_start_date) \
- [adjust_timezone -timestamp $cal_item(full_start_date) -format $date_format -user_tz "Universal" -server_tz $server_tz]
- set cal_item(full_end_date) \
- [adjust_timezone -timestamp $cal_item(full_end_date) -format $date_format -user_tz "Universal" -server_tz $server_tz]
-
# Here we have some fields
# start_time end_time title description
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-item-delete-confirm-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/calendar/www/cal-item-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item-edit.adp,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/calendar/www/cal-item-edit.adp 21 Jul 2003 19:21:36 -0000 1.7
+++ openacs-4/packages/calendar/www/cal-item-edit.adp 11 Aug 2003 12:14:16 -0000 1.8
@@ -11,7 +11,7 @@
-
+
Index: openacs-4/packages/calendar/www/cal-item-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item-edit.tcl,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/calendar/www/cal-item-edit.tcl 21 Jul 2003 19:21:36 -0000 1.18
+++ openacs-4/packages/calendar/www/cal-item-edit.tcl 11 Aug 2003 12:14:16 -0000 1.19
@@ -15,6 +15,8 @@
# Permissions
# FIXME: we need to add a permissions check here!
+set calendar_list [calendar::calendar_list]
+
# Create the form
form create cal_item
@@ -89,8 +91,8 @@
element set_properties cal_item cal_item_id -value $cal_item(cal_item_id)
element set_properties cal_item title -value $cal_item(name)
element set_properties cal_item date -value [template::util::date::from_ansi $cal_item(start_date)]
- element set_properties cal_item start_time -value [template::util::date::from_ansi $cal_item(ansi_start_date) [lc_get formbuilder_time_format]]
- element set_properties cal_item end_time -value [template::util::date::from_ansi $cal_item(ansi_end_date) [lc_get formbuilder_time_format]]
+ element set_properties cal_item start_time -value [template::util::date::from_ansi $cal_item(start_date_ansi) [lc_get formbuilder_time_format]]
+ element set_properties cal_item end_time -value [template::util::date::from_ansi $cal_item(end_date_ansi) [lc_get formbuilder_time_format]]
element set_properties cal_item description -value $cal_item(description)
element set_properties cal_item item_type_id -value $cal_item(item_type_id)
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.9 -r1.10
--- openacs-4/packages/calendar/www/cal-item-new.adp 26 Jul 2003 20:55:11 -0000 1.9
+++ openacs-4/packages/calendar/www/cal-item-new.adp 11 Aug 2003 12:14:16 -0000 1.10
@@ -2,9 +2,37 @@
#calendar.Calendar_Add_Item#
#calendar.Add#
cal_item.title
+TimePChanged()
+
+
+
+
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.10 -r1.11
--- openacs-4/packages/calendar/www/cal-item-new.tcl 26 Jul 2003 20:55:11 -0000 1.10
+++ openacs-4/packages/calendar/www/cal-item-new.tcl 11 Aug 2003 12:14:16 -0000 1.11
@@ -27,10 +27,9 @@
ad_script_abort
}
- set calendar_id [lindex $calendar_list 0]
+ set calendar_id [lindex [lindex $calendar_list 0] 1]
}
-
# Create the form
form create cal_item
@@ -44,7 +43,7 @@
-label "[_ calendar.Date_1]" -datatype date -widget date
element create cal_item time_p \
- -label " " -datatype text -widget radio -options [list [list "[_ calendar.All_Day_Event]" 0] [list "[_ calendar.Use_Hours_Below]" 1]]
+ -label " " -datatype text -widget radio -html {onchange "javascript:TimePChanged();"} -options [list [list "[_ calendar.All_Day_Event]" 0] [list "[_ calendar.Use_Hours_Below]" 1]]
element create cal_item start_time \
-label "[_ calendar.Start_Time]" -datatype date -widget date \
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-item-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-item-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.16 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-item.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.16 refers to a dead (removed) revision in file `openacs-4/packages/calendar/www/cal-item.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/calendar/www/cal-options.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-options.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/calendar/www/cal-options.tcl 26 Jul 2003 21:24:36 -0000 1.8
+++ openacs-4/packages/calendar/www/cal-options.tcl 11 Aug 2003 12:14:16 -0000 1.9
@@ -1,7 +1,6 @@
ad_page_contract {
- List all the calendars for which the user has the read privilege
- the user has read privilege
+ List all the calendars for which the user has the read privilege.
@author Dirk Gomez (openacs@dirkgomez.de)
@authorr Gary Jin (gjin@arsdigita.com)
Index: openacs-4/packages/calendar/www/view-list-display-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-list-display-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/view-list-display-oracle.xql 26 Jul 2003 21:58:28 -0000 1.1
+++ openacs-4/packages/calendar/www/view-list-display-oracle.xql 11 Aug 2003 12:14:16 -0000 1.2
@@ -5,11 +5,9 @@
-
-
- select to_char(start_date, 'HH24') as start_hour,
- to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
+ to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as ansi_today,
nvl(e.name, a.name) as name,
nvl(e.status_summary, a.status_summary) as status_summary,
e.event_id as item_id,
Index: openacs-4/packages/calendar/www/view-list-display-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-list-display-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/www/view-list-display-postgresql.xql 26 Jul 2003 21:22:27 -0000 1.3
+++ openacs-4/packages/calendar/www/view-list-display-postgresql.xql 11 Aug 2003 12:14:16 -0000 1.4
@@ -2,44 +2,38 @@
postgresql7.1
-
-
-
- select
- to_char(start_date, 'J') as julian_start_date,
- to_char(start_date, 'HH24') as start_hour,
- to_char(start_date, 'YYYY-MM-DD') as pretty_start_date,
- to_char(start_date, 'HH24:MI:SS') as start_time,
- to_char(end_date, 'YYYY-MM-DD') as pretty_end_date,
- to_char(start_date, 'HH24:MI') as pretty_start_time,
- to_char(end_date, 'HH24:MI') as pretty_end_time,
+
+
+
+ select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
+ to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as ansi_today,
coalesce(e.name, a.name) as name,
+ coalesce(e.status_summary, a.status_summary) as status_summary,
e.event_id as item_id,
- (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type,
- to_char(start_date, 'Day') as pretty_weekday,
- cals.calendar_id,
- cals.calendar_name
+ recurrence_id,
+ (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type
from acs_activities a,
acs_events e,
timespans s,
time_intervals t,
- cal_items ci,
- calendars cals
+ cal_items
where e.timespan_id = s.timespan_id
and s.interval_id = t.interval_id
and e.activity_id = a.activity_id
and cal_items.cal_item_id= e.event_id
-and (start_date >= to_date(:start_date,:date_format) or :start_date is null)
-and (start_date <= to_date(:end_date,:date_format) or :end_date is null)
-and cals.package_id= :package_id
-and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id))
-and cals.calendar_id = ci.on_which_calendar
-and e.event_id = ci.cal_item_id
+and (start_date > to_date(:start_date,:date_format) or :start_date is null) and
+ (start_date < to_date(:end_date,:date_format) or :end_date is null)
+and e.event_id
+in (
+ select cal_item_id
+ from cal_items
+ where on_which_calendar = :calendar_id
+ )
order by $sort_by
-
-
-
+
+
-
+
Index: openacs-4/packages/calendar/www/view-list-display.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-list-display.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/www/view-list-display.tcl 26 Jul 2003 21:22:49 -0000 1.3
+++ openacs-4/packages/calendar/www/view-list-display.tcl 11 Aug 2003 12:14:16 -0000 1.4
@@ -1,3 +1,11 @@
+if { ![exists_and_not_null calendar_id]} {
+ set calendar_list [calendar::calendar_list]
+
+ set calendar_id [lindex [lindex $calendar_list 0] 1]
+}
+
+set calendar_name [calendar_get_name $calendar_id]
+
set package_id [ad_conn package_id]
set user_id [ad_conn user_id]
# sort by cannot be empty
@@ -41,6 +49,22 @@
# Loop through the events, and add them
db_foreach select_list_items {} {
+ # Timezonize
+ set ansi_start_date [lc_time_utc_to_local $ansi_start_date]
+ set ansi_end_date [lc_time_utc_to_local $ansi_end_date]
+ set ansi_today [lc_time_utc_to_local $ansi_today]
+
+ # 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"]
+ set pretty_today [lc_time_fmt $ansi_today "%x"]
+
+ set start_date_seconds [clock scan $pretty_start_date]
+ set today_seconds [clock scan $pretty_today]
+
# Adjust the display of no-time items
if {[dt_no_time_p -start_time $pretty_start_date -end_time $pretty_end_date]} {
set pretty_start_time "--"
@@ -60,9 +84,10 @@
incr flip
}
- if {$julian_start_date == $today_julian_date} {
+ # Give the row different appearance depending on whether it's before today, today, or after today
+ if {$start_date_seconds == $today_seconds} {
set today row-hi
- } elseif {$julian_start_date < $today_julian_date} {
+ } elseif {$start_date_seconds < $today_seconds} {
set today row-lo
} else {
set today ""
@@ -71,4 +96,3 @@
multirow append calendar_items $calendar_name $item_id $name $item_type $pretty_weekday $pretty_start_date $pretty_end_date $pretty_start_time $pretty_end_time $flip $today
}
-
Index: openacs-4/packages/calendar/www/view-one-day-display-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-one-day-display-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/calendar/www/view-one-day-display-oracle.xql 26 Jul 2003 21:58:27 -0000 1.1
+++ openacs-4/packages/calendar/www/view-one-day-display-oracle.xql 11 Aug 2003 12:14:16 -0000 1.2
@@ -5,7 +5,7 @@
- select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
nvl(e.name, a.name) as name,
nvl(e.status_summary, a.status_summary) as status_summary,
@@ -14,9 +14,7 @@
on_which_calendar as calendar_id,
(select calendar_name from calendars
where calendar_id = on_which_calendar)
- as calendar_name,
- to_char(timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format)),'YYYY-MM-DD HH24:MI:SS') as start_interval,
- to_char(timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format) + (24 - 1/3600)/24),'YYYY-MM-DD HH24:MI:SS') as end_interval
+ as calendar_name
from acs_activities a,
acs_events e,
timespans s,
@@ -26,8 +24,8 @@
and s.interval_id = t.interval_id
and e.activity_id = a.activity_id
and start_date between
- timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format)) and
- timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format) + (24 - 1/3600)/24)
+ to_date(:current_date,:date_format) and
+ (to_date(:current_date,:date_format) + (24 - 1/3600)/24)
and cal_items.cal_item_id= e.event_id
and e.event_id
in (
Index: openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-one-day-display-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 26 Jul 2003 21:22:27 -0000 1.4
+++ openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 11 Aug 2003 12:14:16 -0000 1.5
@@ -5,10 +5,8 @@
- select to_char(start_date, 'HH24') as start_hour,
- to_char(start_date, 'HH24:MI') as start_time,
- to_char(end_date, 'HH24') as end_hour,
- to_char(end_date, 'HH24:MI') as end_time,
+ select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
coalesce(e.name, a.name) as name,
coalesce(e.status_summary, a.status_summary) as status_summary,
e.event_id as item_id,
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.4 -r1.5
--- openacs-4/packages/calendar/www/view-one-day-display.tcl 26 Jul 2003 21:22:49 -0000 1.4
+++ openacs-4/packages/calendar/www/view-one-day-display.tcl 11 Aug 2003 12:14:16 -0000 1.5
@@ -10,6 +10,9 @@
set package_id [ad_conn package_id]
set user_id [ad_conn user_id]
+# LARS: ERROR:
+# calendar_id_list now contains {Personal 1961 t}
+
# Loop through the calendars
multirow create day_items_without_time name status_summary item_id calendar_name
Index: openacs-4/packages/calendar/www/view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/calendar/www/view.tcl 26 Jul 2003 20:55:11 -0000 1.14
+++ openacs-4/packages/calendar/www/view.tcl 11 Aug 2003 12:14:16 -0000 1.15
@@ -23,8 +23,6 @@
}
}
-
-
set package_id [ad_conn package_id]
set user_id [ad_conn user_id]
|