Skip to content
Browse files

Added support for having a linked tab even if it is currently selected.

  • Loading branch information...
1 parent e7546a2 commit d28d58dc75700fa47f2b9ff7ecdde96663072846 moodler committed Mar 8, 2006
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/weblib.php
View
6 lib/weblib.php
@@ -4340,12 +4340,14 @@ class tabobject {
var $id;
var $link;
var $text;
+ var $linkedwhenselected;
/// A constructor just because I like constructors
- function tabobject ($id, $link='', $text='') {
+ function tabobject ($id, $link='', $text='', $linkedwhenselected=false) {
$this->id = $id;
$this->link = $link;
$this->text = $text;
+ $this->linkedwhenselected = $linkedwhenselected;
}
@@ -4357,7 +4359,7 @@ function createtab ($selected=false, $inactive=false, $activetwo=false, $last=fa
$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->text.'">'.$this->text.'</a>';

0 comments on commit d28d58d

Please sign in to comment.
Something went wrong with that request. Please try again.