Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.tcl,v diff -u -r1.27.2.2 -r1.27.2.3 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 20 May 2004 17:30:05 -0000 1.27.2.2 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 20 May 2004 17:35:19 -0000 1.27.2.3 @@ -60,13 +60,9 @@ task_item_id:array,optional task_title:array,optional {process_id:integer ""} -<<<<<<< task-add-edit.tcl description:html,array,optional -======= - description:html,array,optional {old_description ""} comment:html,array,optional ->>>>>>> 1.33 name:array,optional end_date:array,optional percent_complete:array,optional @@ -126,20 +122,6 @@ # --------------------------------------------------------------- # -<<<<<<< task-add-edit.tcl -if {![exists_and_not_null project_id]} { - set project_id [db_string get_project_id { }] -} - - - -# ns_log Notice "return_url: $return_url" - - - - -======= ->>>>>>> 1.33 # -------------------------------------------------------------------- # If we are using a process, then we need to get the information on # the process now. This is necessary because we need to do things like @@ -274,7 +256,6 @@ for {set i 1} {$i <= $number} {incr i} { # set up date variable names set end_date_$i [list $end_date_year($i) $end_date_month($i) $end_date_day($i) {} {} {}] -<<<<<<< task-add-edit.tcl # ns_log Notice "end_date_$i: [set end_date_$i]" } } @@ -321,55 +302,8 @@ # ns_log notice "set description_[set element_type] to $keyvalu" -======= - # ns_log Notice "end_date_$i: [set end_date_$i]" } -} -# ------------------------------------------------------- # -# The second evilest hack of all time. -# ------------------------------------------------------- -# This is a workaround the fact that using multiple richtext items -# with ad_form is extremely difficult. The description field -# will come in like an array, with values like -# description.1 = 1234 bold -# description.1.format = text/enhanced -# description.1.spellcheck = :nospell: -# The problem is we want -# to have multiple descriptions. -# -# What this loop does is go through the array, and rename the -# values into other variables. We then feed these variables into -# the SQL function that creates the new tasks. This works. I'm -# sure there must be a better way to do it. -# ------------------------------------------------------- # - -if {[info exists description] && ![exists_and_not_null process_id]} { - - set searchToken [array startsearch description] - - while {[array anymore description $searchToken]} { - - # these next two lines are important - set element_num "" - set element_type "" - - set keyname [array nextelement description $searchToken] - set keyvalu $description($keyname) - - # ns_log Notice "keyname: $keyname keyvalu: $keyvalu" - - # element_num is 1...n, element_type is format, spellcheck - regexp {(.*)\.(.*)} $keyname match element_num element_type - - # ns_log Notice "element_num: $element_num element_type: $element_type" - - set description_[set element_type]($element_num) $keyvalu - - # ns_log notice "set description_[set element_type] to $keyvalu" - - } - } # ------------------------------------------------------- # @@ -420,12 +354,8 @@ # ns_log notice "set comment_[set element_type] to $keyvalu" ->>>>>>> 1.33 } -<<<<<<< task-add-edit.tcl -======= - } else { for {set i 1} {$i <= $number} {incr i} { @@ -441,19 +371,14 @@ set format $comment_format($i) set richtext_list [list [set comment_$i] $format] lappend comment_list [ad_html_to_text [template::util::richtext::get_property html_value $richtext_list]] ->>>>>>> 1.33 } -<<<<<<< task-add-edit.tcl -======= - # ns_log Notice "comment_list $comment_list" ->>>>>>> 1.33 # --------------------------------------------------------------- # # permissions and title setup, etc # we should update the permissions to not just use package_id, so @@ -504,19 +429,10 @@ {value $edit_p} } -<<<<<<< task-add-edit.tcl {return_url:text(hidden) {value $return_url} } - {project_id:text(hidden) - {value $project_id} -======= - {return_url:text(hidden) - {value $return_url} ->>>>>>> 1.33 - } - {number:text(hidden) {value $number} } @@ -547,14 +463,9 @@ set task_title_arr($i) $my_task_title set description_arr($i) $my_description -<<<<<<< task-add-edit.tcl - set mime_type_arr($i) $my_mime_type - set template_arr($i) [list $my_description $my_mime_type] -======= lappend old_description $my_description set mime_type_arr($i) $my_mime_type set template_arr($i) [list $my_description $my_mime_type] ->>>>>>> 1.33 set estimated_hours_arr($i) $my_estimated_work set estimated_hours_min_arr($i) $my_estimated_work_min set estimated_hours_max_arr($i) $my_estimated_work_max @@ -854,32 +765,13 @@ } -<<<<<<< task-add-edit.tcl - # make sure we're not dependent on ourselves - - if {![string equal $task_item_id_arr($i) $dependency_options($key)]} { - # check for case when there is a quote in the name of - # a task. We have to filter this out, or we get an error. - append dependency_options_full "{{$key} $dependency_options($key)} " - } - } - } else { - foreach key $dependency_keys { - - # check for case when there is a quote in the name of - # a task. We have to filter this out, or we get an error. - append dependency_options_full "{{$key} $dependency_options($key)} " - } - } -======= set dependency_options_full [pm::task::dependency_options \ -edit_p $edit_p \ -task_item_id $task_item_id_arr($i) \ -project_item_id $project_item_id_arr($i) \ -dependency_task_ids "$my_dependencies" \ -number $number \ -current_number $i] ->>>>>>> 1.33 # ns_log Notice "end_date.$i : $end_date_arr($i)" @@ -1020,14 +912,10 @@ set p_parent_task_id $dependency_task_id($i) set p_skip_p $skip_task_p($i) -<<<<<<< task-add-edit.tcl - # ns_log Notice "end date: $p_end_date" -======= # we don't do anything for the comments field, because they # are not added in for new tasks. # ns_log Notice "end date: $p_end_date" ->>>>>>> 1.33 # add in the new task @@ -1142,16 +1030,11 @@ set p_task_item_id $task_item_id($i) set p_task_title $task_title($i) set p_description $description($i) -<<<<<<< task-add-edit.tcl set p_mime_type $description_format($i) -======= - set p_mime_type $description_format($i) - set p_comment $comment($i) set p_comment_type $comment_format($i) ->>>>>>> 1.33 set p_percent $percent_complete($i) set p_work $estimated_hours_work($i) set p_work_min $estimated_hours_work_min($i) @@ -1290,21 +1173,10 @@ } -<<<<<<< task-add-edit.tcl } -after_submit { - # ns_log Notice "tae: return_url: $return_url" - - ad_returnredirect "task-assign-add-edit?[export_vars -url {project_item_id return_url process_task_id:multiple revisions:multiple task_id:multiple}]" - pm::project::compute_parent_status $project_item_id -======= -} -after_submit { - ad_returnredirect "task-assign-add-edit?[export_vars -url {comment_list edit_p return_url process_task_id:multiple revisions:multiple task_id:multiple old_description}]" ->>>>>>> 1.33 -<<<<<<< task-add-edit.tcl -======= # compile a list of which projects the tasks are assigned to # there is a bug here, because we don't update a project when a # task is edited and changed to another project. @@ -1324,7 +1196,6 @@ } ->>>>>>> 1.33 ad_script_abort }