From 0ecff0ea662177835b4e641d70af77ec3270a2e5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 22 Mar 2007 01:28:20 +0000 Subject: added back setPostBackEventTarget. --- framework/Web/UI/WebControls/TImageButton.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI') 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; } -- cgit v1.2.3