Index: openacs-4/packages/calendar/tcl/cal-item-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs.xql,v diff -u -r1.7 -r1.7.6.1 --- openacs-4/packages/calendar/tcl/cal-item-procs.xql 9 Jan 2004 22:55:52 -0000 1.7 +++ openacs-4/packages/calendar/tcl/cal-item-procs.xql 28 Jun 2005 12:41:25 -0000 1.7.6.1 @@ -12,11 +12,14 @@ insert into cal_items -(cal_item_id, on_which_calendar) +(cal_item_id, on_which_calendar, item_type_id) select event_id, (select on_which_calendar as calendar_id from cal_items +where cal_item_id = :cal_item_id), +(select item_type_id +as item_type from cal_items where cal_item_id = :cal_item_id) from acs_events where recurrence_id= :recurrence_id and event_id <> :cal_item_id 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.6 -r1.6.2.1 --- openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 13 Jan 2005 13:56:28 -0000 1.6 +++ openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 28 Jun 2005 12:41:26 -0000 1.6.2.1 @@ -54,11 +54,12 @@ {options $recurrance_options} } - {recur_until:text,text + {recur_until:date {label "[_ calendar.lt_Repeat_this_event_unt]"} + {format "YYYY MM DD"} {html {id sel1}} - {after_html { \[y-m-d \] - }} + {after_html { \[y-m-d\] + } } } @@ -67,32 +68,35 @@ } -validate { {recur_until { - [calendar::item::dates_valid_p -start_date $cal_item(start_date) -end_date $recur_until] + [calendar::item::dates_valid_p -start_date $cal_item(start_date) -end_date [calendar::to_sql_datetime -date $recur_until -time "" -time_p 0]] } {[_ calendar.start_time_before_end_time]} } } -edit_data { # To support green calendar - set recur_until [split $recur_until "-"] - lappend recur_until "" - lappend recur_until "" - lappend recur_until "" - lappend recur_until "DD MONTH YYYY" - + #set recur_until [split $recur_until "-"] + #lappend recur_until "" + #lappend recur_until "" + #lappend recur_until "" + #lappend recur_until "DD MONTH YYYY" + + set recur_until "[template::util::date::get_property day $recur_until] [template::util::date::get_property long_month_name $recur_until] [template::util::date::get_property year $recur_until]" + calendar::item::add_recurrence \ -cal_item_id $cal_item_id \ -interval_type $interval_type \ -every_n $every_n \ -days_of_week $days_of_week \ -recur_until [calendar::to_sql_datetime -date $recur_until -time "" -time_p 0] } -edit_request { - set aux [template::util::date::from_ansi $cal_item(start_date)] - set recur_until [lindex $aux 0] - append recur_until "-" - append recur_until [lindex $aux 1] - append recur_until "-" - append recur_until [lindex $aux 2] + #set aux [template::util::date::from_ansi $cal_item(start_date)] + #set recur_until [lindex $aux 0] + #append recur_until "-" + #append recur_until [lindex $aux 1] + #append recur_until "-" + #append recur_until [lindex $aux 2] + set recur_until [calendar::from_sql_datetime -sql_date $cal_item(start_date) -format "YYY-MM-DD"] set interval_type week } -after_submit { ad_returnredirect $return_url 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.26.2.3 -r1.26.2.4 --- openacs-4/packages/calendar/www/cal-item-new.tcl 23 Jun 2005 16:42:15 -0000 1.26.2.3 +++ openacs-4/packages/calendar/www/cal-item-new.tcl 28 Jun 2005 12:41:26 -0000 1.26.2.4 @@ -60,9 +60,9 @@ } {date:date {label "[_ calendar.Date_1]"} - {format "Month DD YYYY"} + {format "YYYY MM DD"} {html {id date} } - {after_html {} } } + {after_html { \[y-m-d\]} } } {time_p:text(radio) {label " "} {html {onClick "javascript:TimePChanged(this);"}} @@ -217,13 +217,15 @@ set start_time [template::util::date::from_ansi $ansi_start_date [lc_get formbuilder_time_format]] set end_time [template::util::date::from_ansi $ansi_end_date [lc_get formbuilder_time_format]] } -new_data { + # To support green calendar # set date [split $date "-"] # lappend date "" # lappend date "" # lappend date "" # lappend date "YYYY MM DD" # set date [calendar::to_sql_datetime -date $date -time ""] + set date "[template::util::date::get_property year $date] [template::util::date::get_property month $date] [template::util::date::get_property day $date]" set start_date [calendar::to_sql_datetime -date $date -time $start_time -time_p $time_p]