--- nfo/php/libs/com.newsblob.phphtmllib/widgets/TreeNav.inc 2003/01/31 08:48:45 1.2
+++ nfo/php/libs/com.newsblob.phphtmllib/widgets/TreeNav.inc 2004/05/06 16:27:42 1.6
@@ -2,7 +2,7 @@
/**
* This contains the TreeNav widget
*
- * $Id: TreeNav.inc,v 1.2 2003/01/31 08:48:45 jonen Exp $
+ * $Id: TreeNav.inc,v 1.6 2004/05/06 16:27:42 jonen Exp $
*
* @author Walter A. Boring IV
* @package phpHtmlLib
@@ -49,15 +49,8 @@
}
function push_text( $text, $selected=FALSE ) {
- if (is_array($text)) {
- foreach($text as $value) {
- $this->push_text($value);
- }
- }
- else {
array_push($this->data, array( "type"=>"text", "text"=>$text,
"selected" => $selected ));
- }
}
/**
@@ -78,7 +71,7 @@
$td = new TDtag;
$td->newline_after_opentag = FALSE;
- $img = html_img("img/widgets/arrow.gif", 9, 9);
+ $img = html_img("/phphtmllib/widgets/images/arrow.gif", 9, 9);
$img->set_tag_attributes( array("vspace"=>5, "hspace"=>3));
$img->indent_flag = FALSE;
$img->newline_after_opentag = FALSE;
@@ -113,7 +106,7 @@
"class" => "treenavspacer");
$td = new TDtag( $attributes );
$td->newline_after_opentag = FALSE;
- $img = html_img("img/widgets/spacer.gif", 1, 1);
+ $img = html_img("/phphtmllib/widgets/images/spacer.gif", 1, 1);
$img->indent_flag = FALSE;
$img->newline_after_opentag = FALSE;
$td->push( $img );
@@ -134,19 +127,7 @@
"class" => "treenavinnertable");
$table = new TABLEtag( $attributes );
- $this->build_entries($this->data, $table);
-
- return $table;
- }
-
- function build_entries($entries = '', &$table) {
- if(!is_array($entries)) { $entries = $this->data; }
- foreach( $entries as $nav) {
- if(is_array($nav)) {
- $this->build_entries($nav, $table);
- }
- else {
- print $nav;
+ foreach( $this->data as $nav) {
$img_td = $this->build_img_td();
$link_td = $this->build_link_td( $nav );
@@ -154,11 +135,13 @@
$spacer_td = $this->build_spacer_td();
$table->push_row( $spacer_td );
- }
}
+
+ return $table;
}
+
/**
* function that will render the widget.
*