summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes/cbutton.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-22 15:12:52 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-22 15:12:52 +0000
commit67caec0a308312b19cc85f6c09e482d717c0f252 (patch)
tree5566dedd907341525bfa9f8c595812d69ab67033 /frontends/php/include/classes/cbutton.inc.php
parenteb9c8c4c00ab339b6e105b35d65f3c99dc5cb677 (diff)
downloadzabbix-67caec0a308312b19cc85f6c09e482d717c0f252.tar.gz
zabbix-67caec0a308312b19cc85f6c09e482d717c0f252.tar.xz
zabbix-67caec0a308312b19cc85f6c09e482d717c0f252.zip
- improved JS supporting for IE
git-svn-id: svn://svn.zabbix.com/trunk@3909 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/cbutton.inc.php')
-rw-r--r--frontends/php/include/classes/cbutton.inc.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/frontends/php/include/classes/cbutton.inc.php b/frontends/php/include/classes/cbutton.inc.php
index 42c31afa..50b5a126 100644
--- a/frontends/php/include/classes/cbutton.inc.php
+++ b/frontends/php/include/classes/cbutton.inc.php
@@ -28,15 +28,14 @@
$this->tag_body_start = '';
$this->options['type'] = 'submit';
$this->AddOption('value', $caption);
-// $this->options["type"] = "button";
$this->options['class'] = 'button';
$this->SetName($name);
$this->SetAction($action);
$this->SetAccessKey($accesskey);
}
- function SetAction($value='submit()', $event='onClick')
+ function SetAction($value=null)
{
- $this->AddOption($event, $value);
+ $this->AddAction('onClick', $value);
}
function SetTitle($value='button title')
{
@@ -54,19 +53,21 @@
class CButtonCancel extends CButton
{
- function CButtonCancel($vars=NULL){
+ function CButtonCancel($vars=NULL,$action=NULL){
parent::CButton('cancel',S_CANCEL);
+ $this->options['type'] = 'button';
$this->SetVars($vars);
+ $this->SetAction($action);
}
function SetVars($value=NULL){
global $page;
- $url = $page["file"]."?cancel=1";
+ $url = "?cancel=1";
if(!is_null($value))
$url = $url.$value;
- return $this->SetAction("return Redirect('$url')");
+ return parent::SetAction("return Redirect('$url')");
}
}
@@ -82,19 +83,18 @@
/*
var $vars;
var $msg;
- var $name;
- var $do_redirect;*/
+ var $name;*/
- function CButtonQMessage($name, $caption, $msg=NULL, $vars=NULL, $do_redirect=true){
+ function CButtonQMessage($name, $caption, $msg=NULL, $vars=NULL){
$this->vars = null;
$this->msg = null;
$this->name = $name;
- $this->do_redirect = $do_redirect;
parent::CButton($name,$caption);
$this->SetMessage($msg);
$this->SetVars($vars);
+ $this->SetAction(NULL);
}
function SetVars($value=NULL){
if(!is_string($value) && !is_null($value)){
@@ -113,7 +113,7 @@
$this->msg = $value;
$this->SetAction(NULL);
}
- function SetAction($value=null, $event='onClick'){
+ function SetAction($value=null){
if(!is_null($value))
return parent::SetAction($value);
@@ -121,7 +121,7 @@
$confirmation = "Confirm('".$this->msg."')";
- if($this->do_redirect)
+ if(isset($this->vars))
{
$redirect = "Redirect('".$page["file"]."?".$this->name."=1".$this->vars."')";
}