diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-05 06:18:56 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-05 06:18:56 +0000 |
| commit | 1c38a85fbe88e86eee3b9999395871b8eaeb3393 (patch) | |
| tree | dfa2200d9504ae3a40dfb6ef9dcca6bc530d51d9 /frontends/php/include/classes/clink.inc.php | |
| parent | a2be02acf83bc0300d2edbc01afd461a9b294e05 (diff) | |
| download | zabbix-1c38a85fbe88e86eee3b9999395871b8eaeb3393.tar.gz zabbix-1c38a85fbe88e86eee3b9999395871b8eaeb3393.tar.xz zabbix-1c38a85fbe88e86eee3b9999395871b8eaeb3393.zip | |
- fixed action adding (Eugene)
- improved ZABBIX logo, open link in new window (Eugene)
- added option 'target' for CLink class (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2798 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/clink.inc.php')
| -rw-r--r-- | frontends/php/include/classes/clink.inc.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/frontends/php/include/classes/clink.inc.php b/frontends/php/include/classes/clink.inc.php index 354b7579..cc160b45 100644 --- a/frontends/php/include/classes/clink.inc.php +++ b/frontends/php/include/classes/clink.inc.php @@ -31,9 +31,9 @@ $this->tag_body_start = ""; $this->tag_body_end = ""; - $this->SetClass($class); - $this->AddItem($item); - $this->SetUrl($url); + if(!is_null($class)) $this->SetClass($class); + if(!is_null($item)) $this->AddItem($item); + if(!is_null($url)) $this->SetUrl($url); } function SetAction($value=NULL) { @@ -60,5 +60,18 @@ $this->AddOption("href",$value); } + function SetTarget($value=NULL) + { + if(is_null($value)) + { + return $this->DelOption("target"); + } + elseif(!is_string($value)) + { + return $this->error("Incorrect value for SetTarget [$value]"); + } + + $this->AddOption("target",$value); + } } ?> |
