diff options
author | ctrlaltca@gmail.com <> | 2012-01-11 16:52:08 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2012-01-11 16:52:08 +0000 |
commit | 6031757bc0af6531aff4d33ede11e955b92ae7fa (patch) | |
tree | 51d8488f3d4458568ff430332af4a8ba9147bb23 /framework | |
parent | 2a28a51d2453b66fc59084eec945a0452dc670ba (diff) |
respect visibility state when updating activecontrols during an ajax callback
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/UI/ActiveControls/TActiveControlAdapter.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/ActiveControls/TBaseActiveControl.php | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php index 13f32ddb..fe8b0757 100644 --- a/framework/Web/UI/ActiveControls/TActiveControlAdapter.php +++ b/framework/Web/UI/ActiveControls/TActiveControlAdapter.php @@ -175,7 +175,7 @@ class TActiveControlAdapter extends TControlAdapter public function saveState()
{
if(($this->_stateTracker!==null)
- && $this->getControl()->getActiveControl()->canUpdateClientSide())
+ && $this->getControl()->getActiveControl()->canUpdateClientSide(true))
{
$this->_stateTracker->respondToChanges();
}
diff --git a/framework/Web/UI/ActiveControls/TBaseActiveControl.php b/framework/Web/UI/ActiveControls/TBaseActiveControl.php index 5dbd030c..180092f2 100644 --- a/framework/Web/UI/ActiveControls/TBaseActiveControl.php +++ b/framework/Web/UI/ActiveControls/TBaseActiveControl.php @@ -124,12 +124,13 @@ class TBaseActiveControl extends TComponent * @return boolean true if the callback response is allowed update
* client-side contents.
*/
- public function canUpdateClientSide()
+ public function canUpdateClientSide($bDontRequireVisibility=false)
{
return $this->getControl()->getHasChildInitialized()
&& $this->getPage()->getIsLoadingPostData() == false
&& $this->getPage()->getIsCallback()
- && $this->getEnableUpdate();
+ && $this->getEnableUpdate()
+ && ($bDontRequireVisibility || $this->getControl()->getVisible());
}
}
|