summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TLinkButton.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TLinkButton.php')
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index 121e6213..d3518ee4 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -81,35 +81,22 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
// We call parent implementation here because some attributes
// may be overwritten in the following
parent::addAttributesToRender($writer);
-
+
if($this->getEnabled(true))
{
$url = $this->getPostBackUrl();
//create unique no-op url references
$nop = "javascript:;//{$this->ClientID}";
$writer->addAttribute('href', $url ? $url : $nop);
- }
- else if($this->getEnabled()) // in this case, parent will not render 'disabled'
- $writer->addAttribute('disabled','disabled');
- }
- /**
- * Registers the postback javascript code.
- * If you override this method, be sure to call the parent implementation
- * so that the event handlers can be invoked.
- * @param TEventParameter event parameter to be passed to the event handlers
- */
- protected function onPreRender($param)
- {
- if($this->getEnabled(true))
- {
$scripts = $this->getPage()->getClientScript();
$options = $this->getPostBackOptions();
$postback = $scripts->getPostBackEventReference($this, '', $options, false);
$code = "{$postback}; Event.stop(e);";
$scripts->registerClientEvent($this, "click", $code);
}
- parent::onPreRender($param);
+ else if($this->getEnabled()) // in this case, parent will not render 'disabled'
+ $writer->addAttribute('disabled','disabled');
}
/**