diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TAccordion.php | 20 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TTabPanel.php | 18 |
2 files changed, 16 insertions, 22 deletions
diff --git a/framework/Web/UI/WebControls/TAccordion.php b/framework/Web/UI/WebControls/TAccordion.php index 4e1cd325..8fd53e29 100644 --- a/framework/Web/UI/WebControls/TAccordion.php +++ b/framework/Web/UI/WebControls/TAccordion.php @@ -477,23 +477,17 @@ class TAccordion extends TWebControl implements IPostBackDataHandler */
protected function getClientOptions()
{
- $options['ID']=$this->getClientID();
- $options['ActiveHeaderCssClass']=$this->getActiveHeaderCssClass();
- $options['HeaderCssClass']=$this->getHeaderCssClass();
- $options['Duration']=$this->getAnimationDuration();
+ $options['ID'] = $this->getClientID();
+ $options['ActiveHeaderCssClass'] = $this->getActiveHeaderCssClass();
+ $options['HeaderCssClass'] = $this->getHeaderCssClass();
+ $options['Duration'] = $this->getAnimationDuration();
if (($viewheight = $this->getViewHeight())>0)
$options['maxHeight'] = $viewheight;
- $views='';
+ $views = array();
foreach($this->getViews() as $view)
- {
- if($views!='')
- $views.=', ';
- $views.= TJavaScript::encode($view->getClientID()).':'.($view->getVisible() ? '1': '0' );
- }
-
- $options['Views']=TJavaScript::quoteJsLiteral('{'.$views.='}');
- $viewIDs=array();
+ $views[$view->getClientID()] = $view->getVisible() ? '1': '0';
+ $options['Views'] = $views;
return $options;
}
diff --git a/framework/Web/UI/WebControls/TTabPanel.php b/framework/Web/UI/WebControls/TTabPanel.php index 558ead4e..7f0c2d36 100644 --- a/framework/Web/UI/WebControls/TTabPanel.php +++ b/framework/Web/UI/WebControls/TTabPanel.php @@ -436,18 +436,18 @@ class TTabPanel extends TWebControl implements IPostBackDataHandler */
protected function getClientOptions()
{
- $options['ID']=$this->getClientID();
- $options['ActiveCssClass']=$this->getActiveTabCssClass();
- $options['NormalCssClass']=$this->getTabCssClass();
- $viewIDs=array();
- $viewVis=array();
+ $options['ID'] = $this->getClientID();
+ $options['ActiveCssClass'] = $this->getActiveTabCssClass();
+ $options['NormalCssClass'] = $this->getTabCssClass();
+ $viewIDs = array();
+ $viewVis = array();
foreach($this->getViews() as $view)
{
- $viewIDs[]=TJavaScript::encode($view->getClientID());
- $viewVis[]=TJavaScript::encode($view->getVisible());
+ $viewIDs[] = $view->getClientID();
+ $viewVis[] = $view->getVisible();
}
- $options['Views']=TJavaScript::quoteJsLiteral('['.implode(',',$viewIDs).']');
- $options['ViewsVis']=TJavaScript::quoteJsLiteral('['.implode(',',$viewVis).']');
+ $options['Views'] = $viewIDs;
+ $options['ViewsVis'] = $viewVis;
return $options;
}
|