diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-06 13:45:26 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-03-06 13:45:26 +0000 |
| commit | 4b79250425757d15a3803d74f3fbe9c8cfe749eb (patch) | |
| tree | 08f6e7a47ca0ea68d561ba982a77cece83a745b4 /frontends/php/include/classes | |
| parent | bc87e8b5844d32a4b6367ca7ecc6aec56a1adf28 (diff) | |
| download | zabbix-4b79250425757d15a3803d74f3fbe9c8cfe749eb.tar.gz zabbix-4b79250425757d15a3803d74f3fbe9c8cfe749eb.tar.xz zabbix-4b79250425757d15a3803d74f3fbe9c8cfe749eb.zip | |
- [DEV-127] improved system status widget in dashboard screen (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5456 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
| -rw-r--r-- | frontends/php/include/classes/cformtable.inc.php | 33 | ||||
| -rw-r--r-- | frontends/php/include/classes/cspan.inc.php | 8 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctable.inc.php | 3 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctag.inc.php | 4 |
4 files changed, 28 insertions, 20 deletions
diff --git a/frontends/php/include/classes/cformtable.inc.php b/frontends/php/include/classes/cformtable.inc.php index b704ab13..449c6675 100644 --- a/frontends/php/include/classes/cformtable.inc.php +++ b/frontends/php/include/classes/cformtable.inc.php @@ -126,13 +126,15 @@ function AddRow($item1, $item2=NULL, $class=NULL){ if(strtolower(get_class($item1)) == 'crow'){ - } elseif(strtolower(get_class($item1)) == 'ctable'){ + } + else if(strtolower(get_class($item1)) == 'ctable'){ $td = new CCol($item1,'form_row_c'); $td->SetColSpan(2); $item1 = new CRow($td); - - } else{ + } + else{ + $tmp = $item1; if(is_string($item1)){ $item1=nbsp($item1); } @@ -140,12 +142,14 @@ if(empty($item1)) $item1 = SPACE; if(empty($item2)) $item2 = SPACE; - $item1 = new CRow(array( - new CCol($item1,'form_row_l'), - new CCol($item2,'form_row_r') - ), - $class); + $item1 = new CRow( + array( + new CCol($item1,'form_row_l'), + new CCol($item2,'form_row_r') + ), + $class); } + array_push($this->center_items, $item1); } @@ -190,14 +194,15 @@ if(isset($this->help)) $col->AddItem($this->help); if(isset($this->title)) $col->AddItem($this->title); foreach($this->top_items as $item) $col->AddItem($item); - $tbl->SetHeader($col); + + $tbl->SetHeader($col); # add last row - $tbl->SetFooter($this->bottom_items); + $tbl->SetFooter($this->bottom_items); # add center rows - foreach($this->center_items as $item) - $tbl->AddRow($item); - - return $tbl->ToString(); + foreach($this->center_items as $item){ + $tbl->AddRow($item); + } + return $tbl->ToString(); } } ?> diff --git a/frontends/php/include/classes/cspan.inc.php b/frontends/php/include/classes/cspan.inc.php index 9ef2e068..7242fa8d 100644 --- a/frontends/php/include/classes/cspan.inc.php +++ b/frontends/php/include/classes/cspan.inc.php @@ -27,12 +27,12 @@ parent::CTag("span","yes"); $this->SetClass($class); $this->AddItem($items); - $this->tag_body_start = ""; - + + $this->tag_body_start = ""; $this->tag_start= ""; $this->tag_end = ""; $this->tag_body_start = ""; - $this->tag_body_end = ""; + $this->tag_body_end = ""; } } @@ -44,8 +44,8 @@ parent::CTag("div","yes"); $this->SetClass($class); $this->AddItem($items); - $this->tag_body_start = ""; + $this->tag_body_start = ""; $this->tag_start= ""; $this->tag_end = ""; $this->tag_body_start = ""; diff --git a/frontends/php/include/classes/ctable.inc.php b/frontends/php/include/classes/ctable.inc.php index 39013bdb..72dc2718 100644 --- a/frontends/php/include/classes/ctable.inc.php +++ b/frontends/php/include/classes/ctable.inc.php @@ -65,7 +65,8 @@ foreach($item as $el){ if(strtolower(get_class($el))=='ccol') { parent::AddItem($el); - } elseif(!is_null($el)) { + } + else if(!is_null($el)){ parent::AddItem(new CCol($el)); } } diff --git a/frontends/php/include/classes/ctag.inc.php b/frontends/php/include/classes/ctag.inc.php index 44cc5050..9f9e9cbf 100644 --- a/frontends/php/include/classes/ctag.inc.php +++ b/frontends/php/include/classes/ctag.inc.php @@ -79,7 +79,9 @@ return $res; } - function Show($destroy=true) { echo $this->ToString($destroy); } + function Show($destroy=true){ + echo $this->ToString($destroy); + } function Destroy() { |
