Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.39.2.6 -r1.39.2.7 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 22 Feb 2007 09:41:37 -0000 1.39.2.6 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 27 Feb 2007 08:32:39 -0000 1.39.2.7 @@ -39,6 +39,7 @@ {-sub_class ""} {-class ""} {-html ""} + {-caption ""} {-page_size ""} {-page_size_variable_p 0} {-page_groupsize 10} @@ -177,6 +178,8 @@ @param html HTML attributes to be output for the table tag, e.g. { align right style "background-color: yellow;" }. Value should be a Tcl list with { name value name value } + @param caption Caption tag that appears right below the table tag. Required for AA. Added 2/27/2007 + @param page_size The number of rows to display on each page. If specified, the list will be paginated. @param page_size_variable_p Displays a selectbox to let the user change the number of rows to display on each page. If specified, the list will be paginated. @@ -255,6 +258,7 @@ sub_class {} class {} html {} + caption {} actions {} bulk_actions {} bulk_action_export_vars {} @@ -308,6 +312,7 @@ sub_class class html + caption page_size page_groupsize page_query @@ -323,6 +328,10 @@ set list_properties(class) $list_properties(main_class) } + if { [empty_string_p $list_properties(caption)]} { + set list_properties(caption) "" + } + # Default 'multirow' to list name if { [empty_string_p $list_properties(multirow)] } { set list_properties(multirow) $name Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v diff -u -r1.42.2.1 -r1.42.2.2 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 13 Feb 2007 09:45:52 -0000 1.42.2.1 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 27 Feb 2007 08:32:40 -0000 1.42.2.2 @@ -118,9 +118,9 @@ if { [empty_string_p $value] } { if { [string is true $is_optional] } { - return "" + return "" } else { - template::element::set_error $element(form_id) $element_id "Please enter a search string." + template::element::set_error $element(form_id) $element_id "Please enter a search string." return [list] } } @@ -279,7 +279,7 @@ set mode {} } - set attributes(id) $element(name) + set attributes(id) $element(name) set output [textarea_internal $element(name) attributes $value $mode] # Spell-checker @@ -376,7 +376,7 @@ # This can be used in the form template in a tag. set attributes(id) "$element(form_id):elements:$element(name):$element(value)" } elseif { [string equal $type "password"] || [string equal $type "text"] } { - set attributes(id) "$element(name)" + set attributes(id) "$element(name)" } @@ -392,7 +392,7 @@ if { ![string equal $element(mode) "edit"] && [lsearch -exact { hidden submit button clear } $type] == -1 } { append output " disabled" - } + } if { [info exists element(value)] } { append output " value=\"[template::util::quote_html $element(value)]\"" @@ -898,38 +898,38 @@ foreach option $options { if {$count == 0} { # answer descriptions in a list: {{desc1 no_of_answers} {desc2 no_of_answers} ...} - append output "" - foreach answer_desc $option { - set answer_description [lindex $answer_desc 0] - set no_of_answers [lindex $answer_desc 1] - append output "$answer_description" - } - append output "" - } elseif {$count == 1} { - append output "[lindex $option 0]" - foreach answer_set [lindex $option 1] { - append output "required?" - foreach answer $answer_set { - append output "$answer" + append output "" + foreach answer_desc $option { + set answer_description [lindex $answer_desc 0] + set no_of_answers [lindex $answer_desc 1] + append output "$answer_description" } - } - append output "" - } else { - append output "[lindex $option 0]" - foreach question [lindex $option 1] { - set name [lindex $question 0] - set required_p [lindex $question 1] - append output "[ad_decode $required_p "t" "*" " "]" - foreach choice [lindex $question 2] { - if {[lsearch -exact $value $choice]==-1} { - append output "" - } else { - append output "" + append output "" + } elseif {$count == 1} { + append output "[lindex $option 0]" + foreach answer_set [lindex $option 1] { + append output "required?" + foreach answer $answer_set { + append output "$answer" } } + append output "" + } else { + append output "[lindex $option 0]" + foreach question [lindex $option 1] { + set name [lindex $question 0] + set required_p [lindex $question 1] + append output "[ad_decode $required_p "t" "*" " "]" + foreach choice [lindex $question 2] { + if {[lsearch -exact $value $choice]==-1} { + append output "" + } else { + append output "" + } + } + } + append output "" } - append output "" - } incr count }