From cc53959ac5ba3e786f3d6ad3403919b82c52fa42 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 6 Mar 2016 19:39:56 +0100 Subject: Activecontrols: avoid updating client side if the value didn't change Fix #399 --- framework/Web/UI/ActiveControls/TActiveImage.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'framework/Web/UI/ActiveControls/TActiveImage.php') diff --git a/framework/Web/UI/ActiveControls/TActiveImage.php b/framework/Web/UI/ActiveControls/TActiveImage.php index 13d53147..e488a2a8 100644 --- a/framework/Web/UI/ActiveControls/TActiveImage.php +++ b/framework/Web/UI/ActiveControls/TActiveImage.php @@ -48,6 +48,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setAlternateText($value) { + if(parent::getAlternateText() === $value) + return; + parent::setAlternateText($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); @@ -62,6 +65,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setImageAlign($value) { + if(parent::getImageAlign() === $value) + return; + parent::setImageAlign($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); @@ -72,6 +78,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setImageUrl($value) { + if(parent::getImageUrl() === $value) + return; + parent::setImageUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); @@ -82,6 +91,9 @@ class TActiveImage extends TImage implements IActiveControl */ public function setDescriptionUrl($value) { + if(parent::getDescriptionUrl() === $value) + return; + parent::setDescriptionUrl($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); -- cgit v1.2.3