From a3f64a4214fe0ae29ecea298542a15c6a0071a45 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sun, 25 Mar 2012 20:51:49 +0000 Subject: Reworked the patch for #391; now a TComponent-based controls can contain methods prefixed by "js" to indicate that those methods can receive raw javascript. Such methods can be called both in a xss-safe, javascript-encoded way: $xxx->Property="yyy" and in a raw-javascript way: $xxx->jsProperty="zzz". Patch by gabor, documentation is on the way --- framework/Web/UI/WebControls/TTabPanel.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'framework/Web/UI/WebControls/TTabPanel.php') 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; } -- cgit v1.2.3