From c9c31d6edb91e22c56ffab3772ce8a29b1480537 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 25 Mar 2007 07:04:08 +0000 Subject: Update TinyMCE to 2.1, Js prototype to 1.5.1rc, effects to 1.7 --- framework/Web/UI/WebControls/TImageButton.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'framework/Web/UI/WebControls/TImageButton.php') diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index bd974c64..156c328d 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -89,8 +89,11 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven $writer->addAttribute('name',$uniqueID); if($this->getEnabled(true)) { + if($this->canCauseValidation()) + { $writer->addAttribute('id',$this->getClientID()); $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TImageButton',$this->getPostBackOptions()); + } } else if($this->getEnabled()) // in this case, parent will not render 'disabled' $writer->addAttribute('disabled','disabled'); @@ -140,6 +143,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