summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveLinkButton.php
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-07-24 12:22:49 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-07-24 12:22:49 +0200
commit0f332e6564ed67ef7eb4d715ce3bcb5ff54c50cf (patch)
tree00cecb80224872c25e712a59b417c5f1dff240cb /framework/Web/UI/ActiveControls/TActiveLinkButton.php
parent3c208455c7775838e795909923536a7de13d9c5c (diff)
Upgrade to newly released 3.2.23.2.2
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveLinkButton.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveLinkButton.php37
1 files changed, 32 insertions, 5 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveLinkButton.php b/framework/Web/UI/ActiveControls/TActiveLinkButton.php
index b95dad88..d8a8ffcb 100644
--- a/framework/Web/UI/ActiveControls/TActiveLinkButton.php
+++ b/framework/Web/UI/ActiveControls/TActiveLinkButton.php
@@ -6,7 +6,7 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2013 PradoSoft
* @license http://www.pradosoft.com/license/
- * @version $Id: TActiveLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $
+ * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $
* @package System.Web.UI.ActiveControls
*/
@@ -29,7 +29,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
* will update the link text upon callback response completion.
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @version $Id: TActiveLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $
+ * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $
* @package System.Web.UI.ActiveControls
* @since 3.1
*/
@@ -118,9 +118,36 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback
{
parent::addAttributesToRender($writer);
$writer->addAttribute('id',$this->getClientID());
- $this->renderLinkButtonHref($writer);
- $this->getActiveControl()->registerCallbackClientScript(
- $this->getClientClassName(), $this->getPostBackOptions());
+
+ if($this->getEnabled(true))
+ {
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
+ }
+ }
+
+ /**
+ * Ensures that the anchor is rendered correctly when its Enabled property
+ * changes in a callback
+ * @param bool enabled
+ */
+ public function setEnabled($value)
+ {
+ parent::setEnabled($value);
+ if($this->getActiveControl()->canUpdateClientSide())
+ {
+ if($this->getEnabled(true))
+ {
+ $nop = "javascript:;//".$this->getClientID();
+ $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop);
+
+ $this->getActiveControl()->registerCallbackClientScript(
+ $this->getClientClassName(), $this->getPostBackOptions());
+
+ } else {
+ $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false);
+ }
+ }
}
/**