34 Fakoli::usingFeature(
"tab_bar");
75 echo
"<div id='{$this->id}'";
77 if ($this->cssClass) echo
" class='{$this->cssClass}'";
80 foreach($this->tabs as $text => $url)
98 if ($url == $this->page)
103 elseif (($this->disabled ||
104 ($future && $this->strict) ||
105 ($future && ($this->queryString ==
"" && $this->useQueryString)) && $count > $this->rootSteps)
106 || $this->states[$url] ==
'disable')
108 $active =
" class='disabled'";
109 $style .=
"disabled";
112 if ($this->showNumber) $text =
"$count. $text";
114 if ($this->useQueryString)
120 $dest = ($url == $this->page || $this->disabled || ($future &&
$this->strict)) ?
"#" : $url;
125 $dest = ($dest !=
"#") ?
"$dest#{$this->anchor}" :
"#{$this->anchor}";
128 if ($this->scriptLinks)
130 $link =
"href=\"#\"";
133 $link .=
" onclick=\"$dest; return false\"";
138 $link =
"href=\"$dest\"";
141 if ($this->showStates)
143 if (array_key_exists($url, $this->flags))
145 $text =
"<img src='{$this->states[$this->flags[$url]]}' style='border: none; display: inline-block;vertical-align: middle'/> $text";
147 else if ($this->defaultStateImage)
149 $text =
"<img src='{$this->defaultStateImage}' style='border: none; display: inline-block;vertical-align: middle'/> $text";
153 echo
"<li class='$style'>$spacer<a {$link}{$active}>{$text}</a></li>";
157 echo
"</ul></div>\n";
The TabBar class is a user-interface control that manages a line of tabs for multi-page dialogs.
$showNumber
True to display the step number, false if not.
$queryString
The query string parameters to append to the navigation links.
$useQueryString
Whether a query string is being used as the navigation key.
appendQueryString($url, $qs)
Appends a query string to the supplied URL.
$tabs
The tab records in this tab bar.
$id
The DOM ID of the TabBar container element.
The WizardBar class is a user-interface control that draws a stepped nav bar for multi-stage workflow...
$spacer
Spacer that appears between wizard steps.
writeHTML()
Writes the HTML for this control to standard output.
$strict
When strict is set to true, navigation to future steps is always disabled.
$rootSteps
The number of steps that can be reached without a query string when useQueryString is true.
WizardBar($id, $tabs=array(), $queryString="", $useQueryString=true, $showNumber=false)
Construct a new WizardBar control.
$scriptLinks
True to specify that destinations are javascript and should be place in onclick attributes.