diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2016-03-06 19:39:56 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2016-03-06 19:39:56 +0100 |
commit | cc53959ac5ba3e786f3d6ad3403919b82c52fa42 (patch) | |
tree | 77e0b29f387cde1b380813f93a73a2c4aa16390e /framework/Web/UI/ActiveControls/TInPlaceTextBox.php | |
parent | c7ab73d6448aad8aa630878fc83298b762505194 (diff) |
Activecontrols: avoid updating client side if the value didn't change
Fix #399
Diffstat (limited to 'framework/Web/UI/ActiveControls/TInPlaceTextBox.php')
-rw-r--r-- | framework/Web/UI/ActiveControls/TInPlaceTextBox.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php index d267729d..7c4bbd9b 100644 --- a/framework/Web/UI/ActiveControls/TInPlaceTextBox.php +++ b/framework/Web/UI/ActiveControls/TInPlaceTextBox.php @@ -13,7 +13,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveTextBox'); /** * TInPlaceTextBox Class - * * + * * TInPlaceTextBox is a component rendered as a label and allows its * contents to be edited by changing the label to a textbox when * the label is clicked or when another control or html element with @@ -135,6 +135,9 @@ class TInPlaceTextBox extends TActiveTextBox */ public function setText($value) { + if(TTextBox::getText() === $value) + return; + TTextBox::setText($value); if($this->getActiveControl()->canUpdateClientSide()) { @@ -152,6 +155,9 @@ class TInPlaceTextBox extends TActiveTextBox public function setReadOnly ($value) { $value=TPropertyValue::ensureBoolean($value); + if(TTextBox::getReadOnly() === $value) + return; + TTextBox::setReadOnly($value); if ($this->getActiveControl()->canUpdateClientSide()) { |