]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/framework/Web/UI/ActiveControls/TActiveLinkButton.php
baculum: New Baculum API and Baculum Web
[bacula/bacula] / gui / baculum / framework / Web / UI / ActiveControls / TActiveLinkButton.php
index d8a8ffcbf986be747f07293c78d846db14e48b58..7c2159a7de9ecb7eaf92067c14045b1080c09f20 100644 (file)
@@ -3,10 +3,9 @@
  * TActiveLinkButton class file.
  *
  * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
- * @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
- * @license http://www.pradosoft.com/license/
- * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $
+ * @link https://github.com/pradosoft/prado
+ * @copyright Copyright &copy; 2005-2016 The PRADO Group
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
  * @package System.Web.UI.ActiveControls
  */
 
@@ -29,7 +28,6 @@ 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 3292 2013-05-31 08:51:42Z ctrlaltca $
  * @package System.Web.UI.ActiveControls
  * @since 3.1
  */
@@ -97,6 +95,9 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback
         */
        public function setText($value)
        {
+               if(parent::getText() === $value)
+                       return;
+
                parent::setText($value);
                if($this->getActiveControl()->canUpdateClientSide())
                        $this->getPage()->getCallbackClient()->update($this, $value);
@@ -133,6 +134,9 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback
         */
        public function setEnabled($value)
        {
+               if(parent::getEnabled() === $value)
+                       return;
+
                parent::setEnabled($value);
                if($this->getActiveControl()->canUpdateClientSide())
                {
@@ -145,7 +149,7 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback
                                        $this->getClientClassName(), $this->getPostBackOptions());
 
                        } else {
-                               $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false);                              
+                               $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false);
                        }
                }
        }