57 if (count($this->items))
59 $this->primary_key = $this->items[0]->getPrimaryKey();
81 $url .= (strstr($url,
"?") !==
false) ?
"&$qs" :
"?$qs";
88 $script = <<<ENDSCRIPT
89 <script type=
'text/javascript'>
90 window.addEvent(
'load',
function()
92 new ScrollingTabs(
'{$this->id}');
105 if (array_key_exists($this->primary_key, $_GET))
111 $key = $this->items[0]->get($this->primary_key);
117 if ($this->anchor) echo
"<a name='<?echo $this->anchor?>'></a>";
119 echo
"<div id='{$this->id}'";
121 if ($this->cssClass) echo
" class='{$this->cssClass}'";
127 foreach ($this->items as $item)
133 $pk = $item->get($this->primary_key);
135 $url = $this->uri .
"?" . $this->primary_key .
"=" . urlencode($pk);
137 $text = $item->format($this->format);
150 $style =
" class='current'";
153 if ($this->showNumber) $text =
"$count. $text";
155 $dest = ($this->queryString!=
"") ? $this->
appendQueryString($url, $this->queryString) : $url;
159 $dest = ($dest !=
"#") ?
"$dest#{$this->anchor}" :
"#{$this->anchor}";
162 if ($this->showStates)
164 if (array_key_exists($url, $this->flags))
166 $text =
"<img src='{$this->states[$this->flags[$pk]]}' style='border: none; display: inline-block;vertical-align: middle'/> $text";
168 else if ($this->defaultStateImage)
170 $text =
"<img src='{$this->defaultStateImage}' style='border: none; display: inline-block;vertical-align: middle'/> $text";
173 echo
"<li$style><a href=\"$dest\"$active>$text</a></li>";
176 echo
"</ul></div>\n";
The DataItemTabBar class is a user-interface control that manages a line of tabs for multi-page dialo...
$id
The DOM ID of the DataItemTabBar container element.
appendQueryString($url, $qs)
Appends a query string to the supplied URL.
writeHTML()
Writes the HTML for this control to standard output.
DataItemTabBar($id, $items, $format=null, $uri="")