--- nfo/php/libs/com.newsblob.phphtmllib/examples/widget7.php 2003/01/30 03:29:43 1.1.1.1 +++ 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.1.1.1 2003/01/30 03:29:43 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',''); + } } @@ -55,7 +80,9 @@ XHTML_TRANSITIONAL); //enable output debugging. -$page->set_text_debug( $_GET["debug"] ); +if (isset($_GET['debug'])) { + $page->set_text_debug( TRUE ); +} //add the css $page->add_head_css( new DefaultGUIDataListCSS );