--- nfo/php/libs/com.newsblob.phphtmllib/examples/widget7.php 2003/09/20 00:20:55 1.3 +++ nfo/php/libs/com.newsblob.phphtmllib/examples/widget7.php 2004/05/06 16:27:17 1.4 @@ -11,7 +11,7 @@ * This page shows the Data coming a CSV * (comma seperated values) file on disk. * - * $Id: widget7.php,v 1.3 2003/09/20 00:20:55 jonen Exp $ + * $Id: widget7.php,v 1.4 2004/05/06 16:27:17 jonen Exp $ * * @author Walter A. Boring IV * @package phpHtmlLib @@ -30,6 +30,7 @@ include_once($phphtmllib."/widgets/data_list/includes.inc"); include_once($phphtmllib."/widgets/data_list/CSVFILEDataListSource.inc"); + /** * This class shows how to use the data coming * from a CSV Formatted file @@ -46,7 +47,31 @@ $this->add_header_item("First Name", "200", "FName", SORTABLE, SEARCHABLE); $this->add_header_item("Last Name", "200", "LName", SORTABLE, SEARCHABLE); $this->add_header_item("Email", "200", "Email", SORTABLE, SEARCHABLE, "center"); + + //turn on the 'collapsable' search block. + //The word 'Search' in the output will be clickable, + //and hide/show the search box. + $this->_collapsable_search = TRUE; + + //lets add an action column of checkboxes, + //and allow us to save the checked items between pages. + $this->add_action_column('checkbox', 'FIRST', 'Email'); + + //we have to be in POST mode, or we could run out + //of space in the http request with the saved + //checkbox items + $this->set_form_method('POST'); + + //set the flag to save the checked items + //between pages. + $this->save_checked_items(TRUE); } + + function actionbar_cell() { + //don't actually do anything. + //just show how to add a button + return $this->action_button('Test',''); + } } @@ -64,7 +89,6 @@ //build the csv file data list object. $csvlist = new csvfilelist("CSV File list", 600, "LName"); -$csvlist->set_align("right"); $page->add( html_span("font10", "View the source ", html_a("test.csv", "test.csv file.")),