summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes/cbutton.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-12 14:23:12 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-12 14:23:12 +0000
commit4182bc6afb20b00fa27a54c67056bb98a58a49bb (patch)
tree5cab17d23e387cc3b6e8c92e4c928ac5e1111b76 /frontends/php/include/classes/cbutton.inc.php
parent6a6ac0772b8215bffc5fe8b02fc1033dbf273f41 (diff)
downloadzabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.tar.gz
zabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.tar.xz
zabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.zip
- speed improvement for Overview screens (Eugene)
- developed 'net.if.total[*]' parameter (Eugene) - fixed new map link adding (Eugene) - fixed host group adding (Eugene) - fixed map displaying (Eugene) - fixed 'No permissions' for 'Latest data','Triggers','Alarms' screens (Eugene) - fixed permision deletion (Eugene) - fixed 'get_map_by_sysmapid' function calls(Eugene) - improved php code execution speed (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2825 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/cbutton.inc.php')
-rw-r--r--frontends/php/include/classes/cbutton.inc.php57
1 files changed, 12 insertions, 45 deletions
diff --git a/frontends/php/include/classes/cbutton.inc.php b/frontends/php/include/classes/cbutton.inc.php
index 139d3499..0c33caaf 100644
--- a/frontends/php/include/classes/cbutton.inc.php
+++ b/frontends/php/include/classes/cbutton.inc.php
@@ -24,70 +24,37 @@
/* public */
function CButton($name="button", $caption="", $action=NULL, $accesskey=NULL)
{
- parent::CTag("input","no");
- $this->tag_body_start = "";
- $this->AddOption("type","submit");
-// $this->AddOption("type","button");
- $this->SetClass("button");
+ parent::CTag('input','no');
+ $this->tag_body_start = '';
+ $this->options['type'] = 'submit';
+ $this->options['value'] = $caption;
+// $this->options["type"] = "button";
+ $this->options['class'] = 'button';
$this->SetName($name);
- $this->SetCaption($caption);
$this->SetAction($action);
$this->SetAccessKey($accesskey);
}
function SetAction($value='submit()', $event='onClick')
{
- if(is_null($value))
- return 1;
- if(!is_string($value))
- return $this->error("Incorrect value for SetAction [$value]");
- if(!is_string($event))
- return $this->error("Incorrect event for SetAction [$event]");
- return $this->AddOption($event,$value);
+ $this->options[$event] = $value;
}
function SetTitle($value='button title')
{
- if(!is_string($value))
- {
- return $this->error("Incorrect value for SetTitle [$value]");
- }
- return $this->AddOption("title",$value);
+ $this->options['title'] = $value;
}
function SetAccessKey($value='B')
{
- if(is_null($value))
- return 0;
- elseif(!is_string($value))
- {
- return $this->error("Incorrect value for SetAccessKey [$value]");
- }
-
- if($this->GetOption('title')==NULL)
- $this->SetTitle($this->GetOption('value')." [Alt+$value]");
+ if(!isset($this->options['title']))
+ $this->SetTitle($this->options['value'].' [Alt+$value]');
- return $this->AddOption("accessKey",$value);
- }
- function SetName($value='button')
- {
- if(!is_string($value))
- {
- return $this->error("Incorrect value for SetName [$value]");
- }
- return $this->AddOption("name",$value);
- }
- function SetCaption($value="")
- {
- if(!is_string($value))
- {
- return $this->error("Incorrect value for SetCaption [$value]");
- }
- return $this->AddOption("value",$value);
+ return $this->options['accessKey'] = $value;
}
}
class CButtonCancel extends CButton
{
function CButtonCancel($vars=NULL){
- parent::CButton("cancel",S_CANCEL);
+ parent::CButton('cancel',S_CANCEL);
$this->SetVars($vars);
}
function SetVars($value=NULL){