diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/WebControls/TImageButton.php | 4 |
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;
}
|