diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TLinkButton.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index 6c318944..bcf43060 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -81,21 +81,33 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC parent::addAttributesToRender($writer);
if($this->getEnabled(true))
+ {
+ $this->renderLinkButtonHref($writer);
$this->renderClientControlScript($writer);
+ }
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
}
/**
* Renders the client-script code.
+ * @param THtmlWriter renderer
*/
protected function renderClientControlScript($writer)
{
+ $cs = $this->getPage()->getClientScript();
+ $cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
+ }
+
+ /**
+ * Renders the Href for link button.
+ * @param THtmlWriter renderer
+ */
+ protected function renderLinkButtonHref($writer)
+ {
//create unique no-op url references
$nop = "javascript:;//".$this->getClientID();
$writer->addAttribute('href', $nop);
- $cs = $this->getPage()->getClientScript();
- $cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
}
/**
|