summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TImageButton.php
diff options
context:
space:
mode:
authorwei <>2005-12-13 07:08:30 +0000
committerwei <>2005-12-13 07:08:30 +0000
commit35c7ff28cbc311fba5e394b11fb756a4dc1edcb9 (patch)
tree1ee39944b4cdba1ecc6aeb2a952139b5a3165f67 /framework/Web/UI/WebControls/TImageButton.php
parent2c383b6050b3d8cc6ac7a9442c999cb903af43ab (diff)
Removed inline javascript from components. Adding TJavascriptLogger and logger.js
Diffstat (limited to 'framework/Web/UI/WebControls/TImageButton.php')
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php33
1 files changed, 1 insertions, 32 deletions
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index 96fbff67..131f7b1c 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -51,10 +51,6 @@ Prado::using('System.Web.UI.WebControls.TImage');
* You can change the postback target by setting the {@link setPostBackUrl PostBackUrl}
* property.
*
- * To set the client-side javascript associated with the user's click action,
- * use the {@link setOnClientClick OnClientClick} property. The value will be rendered
- * as the <b>onclick</b> attribute of the button.
- *
* TImageButton displays the {@link setText Text} property as the hint text to the displayed image.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -93,19 +89,8 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
$writer->addAttribute('type','image');
if(($uniqueID=$this->getUniqueID())!=='')
$writer->addAttribute('name',$uniqueID);
-
- if($this->getEnabled(true))
- {
- $onclick=$this->removeAttribute('onclick');
- $onclick=THttpUtility::trimJavaScriptString($onclick).THttpUtility::trimJavaScriptString($this->getOnClientClick());
- $onclick.=$page->getClientScript()->getPostBackEventReference($this,'',$this->getPostBackOptions(),false);
- if(!empty($onclick))
- $writer->addAttribute('onclick','javascript:'.$onclick);
- }
- else if($this->getEnabled()) // in this case, parent will not render 'disabled'
+ if(!$this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
- if($onclick!=='')
- $writer->addAttribute('onclick','javascript:'.$onclick);
parent::addAttributesToRender($writer);
}
@@ -280,22 +265,6 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * @return string the javascript to be executed when the button is clicked.
- */
- public function getOnClientClick()
- {
- return $this->getViewState('OnClientClick','');
- }
-
- /**
- * @param string the javascript to be executed when the button is clicked.
- */
- public function setOnClientClick($value)
- {
- $this->setViewState('OnClientClick',$value,'');
- }
-
- /**
* @return string caption of the button
*/
public function getText()