From 42b7633575bc0bfce8cd96dc7778183c8edaeace Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 22 May 2008 05:10:27 +0000 Subject: [PATCH] New api for columns --- ui-lib.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ui-lib.pl b/ui-lib.pl index 8be77bb12..9504e694a 100644 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -72,6 +72,20 @@ $rv .= "\n"; return $rv; } +# ui_checked_columns_start(&headings, [width-percent], [noborder], [&tdtags], +# [heading]) +# Returns HTML for a multi-column table whose first column will contain +# checkboxes or radio buttons +sub ui_checked_columns_start +{ +return &theme_ui_checked_columns_start(@_) + if (defined(&theme_ui_checked_columns_start)); +local ($heads, $width, $noborder, $tdtags, $heading) = @_; +local @cheads = ( " ", @$heads ); +local @ctdtags = ( "width=5", $tdtags ? @$tdtags : ( ) ); +return &ui_columns_start(\@cheads, $width, $noborder, \@ctdtags, $heading); +} + # ui_columns_row(&columns, &tdtags) # Returns HTML for a row in a multi-column table sub ui_columns_row @@ -172,6 +186,17 @@ return &theme_ui_columns_end(@_) if (defined(&theme_ui_columns_end)); return "\n"; } +# ui_checked_columns_end() +# Returns HTML to end a table started by ui_checked_columns_start +sub ui_checked_columns_end +{ +return &theme_ui_checked_columns_end(@_) + if (defined(&theme_ui_checked_columns_end)); +return "\n"; +} + + + ####################### form generation functions # ui_form_start(script, method, [target], [tags])