diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-19 09:39:21 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-19 09:39:21 +0000 |
| commit | d1753b085f29b50b97083480a8584718ca75cb51 (patch) | |
| tree | bc7a102054c0f3b10c986327fb5e8e5e542e5735 /frontends/php/include/classes/ctable.inc.php | |
| parent | 55258ec574e3e9a0984b13cf119d725dd8ae1791 (diff) | |
| download | zabbix-d1753b085f29b50b97083480a8584718ca75cb51.tar.gz zabbix-d1753b085f29b50b97083480a8584718ca75cb51.tar.xz zabbix-d1753b085f29b50b97083480a8584718ca75cb51.zip | |
- Removed row "..." from history, and other screens .... (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2860 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/ctable.inc.php')
| -rw-r--r-- | frontends/php/include/classes/ctable.inc.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/frontends/php/include/classes/ctable.inc.php b/frontends/php/include/classes/ctable.inc.php index 5b7b2060..a0ab239c 100644 --- a/frontends/php/include/classes/ctable.inc.php +++ b/frontends/php/include/classes/ctable.inc.php @@ -88,9 +88,9 @@ var $header; var $headerClass; var $colnum; + var $rownum; var $footer; var $footerClass; - var $curr_row_class; var $message; /* public */ function CTable($message=NULL,$class=NULL) @@ -98,10 +98,10 @@ parent::CTag("table","yes"); $this->SetClass($class); + $this->rownum = 0; $this->oddRowClass = NULL; $this->evenRowClass = NULL; - $this->curr_row_class = NULL; $this->header = ''; $this->headerClass = NULL; @@ -154,10 +154,9 @@ } if(!isset($item->options['class'])) { - $this->curr_row_class = ($this->curr_row_class == $this->evenRowClass) ? - $this->oddRowClass: - $this->evenRowClass; - $item->options['class'] = $this->curr_row_class; + $item->options['class'] = ($this->rownum % 2) ? + $this->evenRowClass: + $this->oddRowClass; }/**/ return $item->ToString(); } @@ -182,16 +181,18 @@ } function AddRow($item,$rowClass=NULL) { + ++$this->rownum; return $this->AddItem($this->PrepareRow($item,$rowClass)); } function ShowRow($item,$rowClass=NULL) { + ++$this->rownum; echo $this->PrepareRow($item,$rowClass); } /* protected */ function GetNumRows() { - return $this->ItemsCount(); + return $this->rownum; } function StartToString() @@ -203,8 +204,9 @@ function EndToString() { $ret = ""; - if(count($this->items)==0 && isset($this->message)) + if($this->rownum == 0 && isset($this->message)) { + ++$this->rownum; $ret = $this->PrepareRow(new CCol($this->message,'message')); } $ret .= $this->footer; |
