Added attribute $linkedwhenselected to tabobject class. Basically defines

whether the tab should be linked even if it is selected.
This commit is contained in:
vyshane
2006-03-08 04:53:48 +00:00
parent a392a8b22d
commit 748e0925c2
+4 -2
View File
@@ -4584,13 +4584,15 @@ class tabobject {
var $id;
var $link;
var $text;
var $linkedwhenselected;
/// A constructor just because I like constructors
function tabobject ($id, $link='', $text='', $title='') {
function tabobject ($id, $link='', $text='', $title='', $linkedwhenselected=false) {
$this->id = $id;
$this->link = $link;
$this->text = $text;
$this->title = $title ? $title : $text;
$this->linkedwhenselected = $linkedwhenselected;
}
@@ -4602,7 +4604,7 @@ class tabobject {
$cstr = '';
/// The text and anchor for this tab
if ($inactive || $activetwo || $selected) {
if ($inactive || $activetwo || ($selected && !$this->linkedwhenselected)) {
$astr .= $this->text;
} else {
$astr .= '<a href="'.$this->link.'" title="'.$this->title.'">'.$this->text.'</a>';