diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TLinkButton.php')
-rw-r--r-- | framework/Web/UI/WebControls/TLinkButton.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php index bca4a8f6..7f9baab8 100644 --- a/framework/Web/UI/WebControls/TLinkButton.php +++ b/framework/Web/UI/WebControls/TLinkButton.php @@ -81,15 +81,22 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler, IButtonC parent::addAttributesToRender($writer);
if($this->getEnabled(true))
- {
- //create unique no-op url references
- $nop = "#".$this->getClientID();
- $writer->addAttribute('href', $nop);
- $this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TLinkButton',$this->getPostBackOptions());
- }
+ $this->renderClientControlScript($writer);
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
}
+
+ /**
+ * Renders the client-script code.
+ */
+ protected function renderClientControlScript($writer)
+ {
+ //create unique no-op url references
+ $nop = "#".$this->getClientID();
+ $writer->addAttribute('href', $nop);
+ $cs = $this->getPage()->getClientScript();
+ $cs->registerPostBackControl(get_class($this),$this->getPostBackOptions());
+ }
/**
* Returns postback specifications for the button.
|