widgets-procs.tcl

UI widgets for use in forms, etc.

Location:
packages/acs-tcl/tcl/widgets-procs.tcl
CVS Identification:
$Id: widgets-procs.tcl,v 1.23.2.12 2023/03/28 09:35:12 antoniop Exp $

Procedures in this file

Detailed information

ad_color_to_hex (public)

 ad_color_to_hex triplet

Converts a string of the form 0,192,255 to a string of the form #00C0FF.

Parameters:
triplet

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_color_to_hex ad_color_to_hex (test acs-tcl) ad_color_to_hex ad_color_to_hex test_ad_color_to_hex->ad_color_to_hex

Testcases:
ad_color_to_hex

ad_color_widget (public, deprecated)

 ad_color_widget name default [ use_js ]
Deprecated. Invoking this procedure generates a warning.

Returns a color selection widget, optionally using JavaScript. Default is a string of the form '0,192,255'. DEPRECATED: HTML now has a native color widget that requires no custom implementation.

Parameters:
name
default
use_js (defaults to "0")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_generic_optionlist ad_generic_optionlist (public) ad_html_colors ad_html_colors (public, deprecated) ad_log_deprecated ad_log_deprecated (public) template::add_event_listener template::add_event_listener (public) ad_color_widget ad_color_widget ad_color_widget->ad_generic_optionlist ad_color_widget->ad_html_colors ad_color_widget->ad_log_deprecated ad_color_widget->template::add_event_listener

Testcases:
No testcase defined.

ad_color_widget_js (public, deprecated)

 ad_color_widget_js
Deprecated. Invoking this procedure generates a warning.

Returns JavaScript code necessary to use color widgets. DEPRECATED: HTML now has a native color widget that requires no custom implementation.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) ad_color_widget_js ad_color_widget_js ad_color_widget_js->ad_log_deprecated

Testcases:
No testcase defined.

ad_dateentrywidget (public, deprecated)

 ad_dateentrywidget column [ value ]
Deprecated. Invoking this procedure generates a warning.

Returns form pieces for a date entry widget. A null date may be selected. DEPRECATED: better alternatives exist for date-entry widgets, which would also support localization.

Parameters:
column
value (defaults to "0")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 download_metadata_widget download_metadata_widget (public) ad_dateentrywidget ad_dateentrywidget download_metadata_widget->ad_dateentrywidget ad_log_deprecated ad_log_deprecated (public) ad_dateentrywidget->ad_log_deprecated

Testcases:
No testcase defined.

ad_db_select_widget (public, deprecated)

 ad_db_select_widget [ -size size ] [ -multiple multiple ] \
    [ -default default ] [ -option_list option_list ] \
    [ -blank_if_no_db blank_if_no_db ] \
    [ -hidden_if_one_db hidden_if_one_db ] [ -bind bind ] \
    statement_name sql_qry name
Deprecated. Invoking this procedure generates a warning.

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. The first selected column should contain the optionlist items. The second selected column should contain the optionlist values.

option_list is a list in the same format (i.e. {{str val} {str2 val2}...}) which is prepended to the list

if sql_qry is null then the list is constructed from option_list only.

if there is only one item the select is not generated and the value is passed in hidden form variable.

if -multiple is given then a multi select is returned.

if -blank_if_no_db is true, then do not return a select widget unless there are rows from the database DEPRECATED: the template system offers better ways to produce markup from a query nowadays.

Switches:
-size
(defaults to "0") (optional)
-multiple
(defaults to "0") (optional)
-default
(optional)
-option_list
(optional)
-blank_if_no_db
(defaults to "0") (optional)
-hidden_if_one_db
(defaults to "0") (optional)
-bind
(optional)
Parameters:
statement_name
sql_qry
name
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/download/www/download-verify.tcl packages/download/ www/download-verify.tcl ad_db_select_widget ad_db_select_widget packages/download/www/download-verify.tcl->ad_db_select_widget ad_log_deprecated ad_log_deprecated (public) ad_db_select_widget->ad_log_deprecated db_foreach db_foreach (public) ad_db_select_widget->db_foreach

Testcases:
No testcase defined.

ad_future_years_list (public)

 ad_future_years_list [ num_year ]

Returns a list containing the next num_year years in the future.

Parameters:
num_year (defaults to "10")

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_future_years_list ad_future_years_list (test acs-tcl) ad_future_years_list ad_future_years_list test_ad_future_years_list->ad_future_years_list future_years_list future_years_list (public, deprecated) future_years_list->ad_future_years_list

Testcases:
ad_future_years_list

ad_generic_optionlist (public)

 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.

Parameters:
items
values
default (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_generic_optionlist ad_generic_optionlist (test acs-tcl) ad_generic_optionlist ad_generic_optionlist test_ad_generic_optionlist->ad_generic_optionlist ad_color_widget ad_color_widget (public, deprecated) ad_color_widget->ad_generic_optionlist packages/acs-admin/www/apm/parameter-add.tcl packages/acs-admin/ www/apm/parameter-add.tcl packages/acs-admin/www/apm/parameter-add.tcl->ad_generic_optionlist packages/acs-admin/www/apm/parameter-edit.tcl packages/acs-admin/ www/apm/parameter-edit.tcl packages/acs-admin/www/apm/parameter-edit.tcl->ad_generic_optionlist

Testcases:
ad_generic_optionlist

ad_html_colors (public, deprecated)

 ad_html_colors
Deprecated. Invoking this procedure generates a warning.

Returns an array of HTML colors and names.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_color_widget ad_color_widget (public, deprecated) ad_html_colors ad_html_colors ad_color_widget->ad_html_colors ad_log_deprecated ad_log_deprecated (public) ad_html_colors->ad_log_deprecated

Testcases:
No testcase defined.

ad_integer_optionlist (public)

 ad_integer_optionlist start_value end_value [ default ] \
    [ pad_to_two_p ]

Produces an optionlist for a range of integers from start_value to end_value. If default matches one of the options, it is selected. If pad_to_two_p is 1, the option values will be padded to 2 digits with a leading 0.

Parameters:
start_value
end_value
default (optional)
pad_to_two_p (defaults to "0")

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_integer_optionlist ad_integer_optionlist (test acs-tcl) ad_integer_optionlist ad_integer_optionlist test_ad_integer_optionlist->ad_integer_optionlist

Testcases:
ad_integer_optionlist

ad_process_color_widgets (public, deprecated)

 ad_process_color_widgets [ args... ]
Deprecated. Invoking this procedure generates a warning.

Sets variables corresponding to the color widgets named in $args. DEPRECATED: HTML now has a native color widget that requires no custom implementation.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) ad_process_color_widgets ad_process_color_widgets ad_process_color_widgets->ad_log_deprecated

Testcases:
No testcase defined.

country_widget (public, deprecated)

 country_widget [ default ] [ select_name ] [ size_subtag ]
Deprecated. Invoking this procedure generates a warning.

Returns a country selection box. This widget depends on the ref-countries package. DEPRECATED for various reasons: doesn't comply with OpenACS naming convention, difficult to style, no good separation of Tcl and HTML, 'size_subtag' is just implemented code injection and furthermore, default value might depend on a parameter designed just for "american readers". A better alternative would be e.g. implementing this using the templating system.

Parameters:
default (optional)
select_name (defaults to "country_code")
size_subtag (defaults to "size='4'")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) ad_log_deprecated ad_log_deprecated (public) db_foreach db_foreach (public) parameter::get parameter::get (public) country_widget country_widget country_widget->ad_conn country_widget->ad_log_deprecated country_widget->db_foreach country_widget->parameter::get

Testcases:
No testcase defined.

day_list (public, deprecated)

 day_list
Deprecated. Invoking this procedure generates a warning.

DEPRECATED: this proc does not comply with OpenACS naming convention and does not provide much value. One can e.g. use 'clock' based idioms to compute the number of days that are in a specific month.

See Also:
  • clock

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) day_list day_list day_list->ad_log_deprecated

Testcases:
No testcase defined.

future_years_list (public, deprecated)

 future_years_list [ args... ]
Deprecated. Invoking this procedure generates a warning.

Returns a list containing the next num_year years in the future. DEPRECATED: use the version complying with naming convention

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_future_years_list ad_future_years_list (public) ad_log_deprecated ad_log_deprecated (public) future_years_list future_years_list future_years_list->ad_future_years_list future_years_list->ad_log_deprecated

Testcases:
No testcase defined.

long_month_list (public, deprecated)

 long_month_list
Deprecated. Invoking this procedure generates a warning.

Returns list of months DEPRECATED: this proc does not comply with OpenACS naming convention and is not localized. 'clock' based idioms can provide a localized list of months and/or message keys can be used.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) long_month_list long_month_list long_month_list->ad_log_deprecated

Testcases:
No testcase defined.

month_list (public, deprecated)

 month_list
Deprecated. Invoking this procedure generates a warning.

Returns list of month abbreviations DEPRECATED: this proc does not comply with OpenACS naming convention and is not localized. 'clock' based idioms can provide a localized list of months and/or message keys can be used.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) month_list month_list month_list->ad_log_deprecated

Testcases:
No testcase defined.

month_value_list (public, deprecated)

 month_value_list
Deprecated. Invoking this procedure generates a warning.

DEPRECATED: this proc does not comply with OpenACS naming convention and does not provide much value.

See Also:
  • clock

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) month_value_list month_value_list month_value_list->ad_log_deprecated

Testcases:
No testcase defined.

us_state_widget (public, deprecated)

 us_state_widget [ default ] [ select_name ]
Deprecated. Invoking this procedure generates a warning.

Returns a state selection box. This widget depends on the ref-us-states package. DEPRECATED for various reasons: doesn't comply with OpenACS naming convention, difficult to style, no good separation of Tcl and HTML, 'select_name' is prone to code injection and the proc depends on an external package. A better alternative would be e.g. implementing this using the templating system.

Parameters:
default (optional)
select_name (defaults to "usps_abbrev")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) db_foreach db_foreach (public) us_state_widget us_state_widget us_state_widget->ad_log_deprecated us_state_widget->db_foreach

Testcases:
No testcase defined.
[ show source ]