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 | |
| 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')
| -rw-r--r-- | frontends/php/include/classes/clink.inc.php | 19 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctable.inc.php | 9 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctableinfo.inc.php | 4 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctag.inc.php | 22 |
4 files changed, 32 insertions, 22 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); + } } ?> diff --git a/frontends/php/include/classes/ctable.inc.php b/frontends/php/include/classes/ctable.inc.php index 46a18fff..69b10f71 100644 --- a/frontends/php/include/classes/ctable.inc.php +++ b/frontends/php/include/classes/ctable.inc.php @@ -110,10 +110,11 @@ parent::CTag("table","yes"); $this->SetClass($class); $this->message = $message; - $this->SetOddRowClass(); - $this->SetEvenRowClass(); - $this->SetHeader(); - $this->SetFooter(); + + $this->oddRowClass = NULL; + $this->evenRowClass = NULL; + $this->header = NULL; + $this->footer = NULL;; } function SetHeader($value=NULL,$class=NULL) { diff --git a/frontends/php/include/classes/ctableinfo.inc.php b/frontends/php/include/classes/ctableinfo.inc.php index cbf43365..4826eeba 100644 --- a/frontends/php/include/classes/ctableinfo.inc.php +++ b/frontends/php/include/classes/ctableinfo.inc.php @@ -31,8 +31,8 @@ $this->SetEvenRowClass('even_row'); $this->SetCellSpacing(1); $this->SetCellPadding(3); - $this->SetHeader(); - $this->SortBy(); + + $this->sortby = null; } function SetHeader($value=NULL,$class='header') { diff --git a/frontends/php/include/classes/ctag.inc.php b/frontends/php/include/classes/ctag.inc.php index 4d58626f..a6e2ce3b 100644 --- a/frontends/php/include/classes/ctag.inc.php +++ b/frontends/php/include/classes/ctag.inc.php @@ -19,14 +19,6 @@ **/ ?> <?php - function fnc($c) - { - $ret = '<tr>'; - foreach($c as $cc) - $ret .= '<td>'.$cc.'</td>'; - $ret .= '</tr>'; - return $ret; - } class CTag { /* private */ @@ -56,14 +48,18 @@ { $this->SetTagName($name); $this->SetPaired($paired); - $this->SetMaxLength(0); - $this->tag_start=$this->tag_end=$this->tag_body_start=$this->tag_body_end= ""; + $this->items_max_count = 0; - if(is_null($body)) $this->tag_end = "\n"; - if(is_null($body)) $this->tag_body_start = "\n"; + $this->tag_start=$this->tag_end=$this->tag_body_start=$this->tag_body_end= ""; - CTag::AddItem($body); + if(is_null($body)) + { + $this->tag_end = "\n"; + $this->tag_body_start = "\n"; + } else { + CTag::AddItem($body); + } } function SetMaxLength($value) |
