Added attribute $linkedwhenselected to tabobject class. Basically defines
whether the tab should be linked even if it is selected.
This commit is contained in:
+4
-2
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user