summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TImageButton.php
diff options
context:
space:
mode:
authorxue <>2007-03-22 01:28:20 +0000
committerxue <>2007-03-22 01:28:20 +0000
commit0ecff0ea662177835b4e641d70af77ec3270a2e5 (patch)
tree5ed4e5fa632c8bd99b72936fe1a06d704a5c139b /framework/Web/UI/WebControls/TImageButton.php
parent5885bd12735637430e093c896499c3f26832fceb (diff)
added back setPostBackEventTarget.
Diffstat (limited to 'framework/Web/UI/WebControls/TImageButton.php')
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index 842a78ea..5ac0493c 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -105,7 +105,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
$writer->addAttribute('name',$uniqueID);
if($this->getEnabled(true))
{
- if($this->getEnableClientScript()) //remove $this->canCauseValidation() ?
+ if($this->getEnableClientScript() && $this->canCauseValidation())
$this->renderClientControlScript($writer);
}
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
@@ -176,6 +176,8 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
{
$this->_x=intval($values["{$uid}_x"]);
$this->_y=intval($values["{$uid}_y"]);
+ if($this->getPage()->getPostBackEventTarget()===null)
+ $this->getPage()->setPostBackEventTarget($this);
}
return false;
}