Index: openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl,v diff -u -r1.17.2.5 -r1.17.2.6 --- openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 31 Oct 2013 17:38:02 -0000 1.17.2.5 +++ openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 5 Dec 2013 11:22:33 -0000 1.17.2.6 @@ -4,8 +4,12 @@ @cvs-id $Id$ } -ad_proc state_widget { {default ""} {select_name "usps_abbrev"}} "Returns a state selection box" { - +ad_proc state_widget { + {default ""} + {select_name "usps_abbrev"} +} { + Returns a state selection box +} { set widget_value "\n" if { $default eq "" } { if { [parameter::get -parameter SomeAmericanReadersP] } { @@ -51,7 +60,14 @@ # teadams - It is usually more approprate to use html_select_options or # html_select_value_options. -ad_proc ad_generic_optionlist {items values {default ""}} "Use this to build select form fragments. Given a list of items and a list of values, will return the option tags with default highlighted as appropriate." { +ad_proc ad_generic_optionlist { + items + values + {default ""} +} { + Use this to build select form fragments. Given a list of items and a list of values, + will return the option tags with default highlighted as appropriate. +} { # items is a list of the items you would like the user to select from # values is a list of corresponding option values @@ -74,11 +90,15 @@ return {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31} } -ad_proc month_list {} "Returns list of month abbreviations" { +ad_proc month_list {} { + Returns list of month abbreviations +} { return {Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec} } -ad_proc long_month_list {} "Returns list of months" { +ad_proc long_month_list {} { + Returns list of months +} { return {January February March April May June July August September October November December} } @@ -87,7 +107,11 @@ return {1 2 3 4 5 6 7 8 9 10 11 12} } -ad_proc future_years_list {{num_year 10}} "Returns a list containing the next num_year years in the future." { +ad_proc future_years_list { + {num_year 10} +} { + Returns a list containing the next num_year years in the future. +} { set year [ns_fmttime [ns_time] %Y] set counter 0 while {$counter < $num_year } { @@ -103,7 +127,16 @@ # if pad_to_two_p is 1, the option values will be # padded to 2 digites with a leading 0 -ad_proc ad_integer_optionlist {start_value end_value {default ""} { pad_to_two_p 0} } "Produces an optionlist for a range of integers from start_value to end_value. If default matches one of the options, it is selection. If pad_to_two_p is 1, the option values will be padded to 2 digites with a leading 0." { +ad_proc ad_integer_optionlist { + start_value + end_value + {default ""} + { pad_to_two_p 0} +} { + Produces an optionlist for a range of integers from start_value to end_value. + If default matches one of the options, it is selection. If pad_to_two_p is 1, + the option values will be padded to 2 digites with a leading 0. +} { # items is a list of the items you would like the user to select from # values is a list of corresponding option values # default is the value of the item to be selected @@ -171,16 +204,16 @@ } ad_proc ad_db_select_widget { - { - -size 0 - -multiple 0 - -default {} - -option_list {} - -blank_if_no_db 0 - -hidden_if_one_db 0 - -bind {} - } - statement_name sql_qry name + {-size 0} + {-multiple 0} + {-default {}} + {-option_list {}} + {-blank_if_no_db 0} + {-hidden_if_one_db 0} + {-bind {}} + statement_name + sql_qry + name } { given a sql query this generates a select group. If there is only one value it returns the text and a hidden variable setting that value. @@ -342,7 +375,13 @@ } } -ad_proc ad_color_widget { name default { use_js 0 } } "Returns a color selection widget, optionally using JavaScript. Default is a string of the form '0,192,255'." { +ad_proc ad_color_widget { + name + default + { use_js 0 } +} { + Returns a color selection widget, optionally using JavaScript. Default is a string of the form '0,192,255'. +} { set out "