summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2005-12-13 14:29:42 +0000
committerxue <>2005-12-13 14:29:42 +0000
commit597dcf809dac8ba80bf754dc5e02f8b7ff370c8b (patch)
treed5a79d2aa055839e0377488366a71f32e0b2c554
parent14c2872a9ce91a7189b3f36a1470e5eadb09de7a (diff)
Restored code about rendering attribute "disabled".
-rw-r--r--framework/Web/UI/WebControls/TButton.php2
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php2
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php4
3 files changed, 4 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php
index c18bcc62..3a92d809 100644
--- a/framework/Web/UI/WebControls/TButton.php
+++ b/framework/Web/UI/WebControls/TButton.php
@@ -74,7 +74,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
if(($uniqueID=$this->getUniqueID())!=='')
$writer->addAttribute('name',$uniqueID);
$writer->addAttribute('value',$this->getText());
- if(!$this->getEnabled()) // in this case, parent will not render 'disabled'
+ if(!$this->getEnabled(true) && $this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
parent::addAttributesToRender($writer);
}
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index 131f7b1c..de3d1056 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -89,7 +89,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
$writer->addAttribute('type','image');
if(($uniqueID=$this->getUniqueID())!=='')
$writer->addAttribute('name',$uniqueID);
- if(!$this->getEnabled()) // in this case, parent will not render 'disabled'
+ if(!$this->getEnabled(true) && $this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
parent::addAttributesToRender($writer);
}
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index 3ddb6f68..121e6213 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -82,14 +82,14 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
// may be overwritten in the following
parent::addAttributesToRender($writer);
- if($this->getEnabled())
+ if($this->getEnabled(true))
{
$url = $this->getPostBackUrl();
//create unique no-op url references
$nop = "javascript:;//{$this->ClientID}";
$writer->addAttribute('href', $url ? $url : $nop);
}
- else// in this case, parent will not render 'disabled'
+ else if($this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
}