Completed
Push — master ( 5eb10d...ce39e1 )
by Fabio
17:57
created
framework/Web/UI/JuiControls/TJuiDialog.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function getOptions()
70 70
 	{
71
-		if (($options=$this->getViewState('JuiOptions'))===null)
71
+		if(($options=$this->getViewState('JuiOptions'))===null)
72 72
 		{
73 73
 		  $options=new TJuiControlOptions($this);
74 74
 		  $this->setViewState('JuiOptions', $options);
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	protected function getPostBackOptions()
101 101
 	{
102
-		$options = $this->getOptions()->toArray();
102
+		$options=$this->getOptions()->toArray();
103 103
 		// always make the dialog a child of the form, or its inner inputs won't be collected
104 104
 		if(!isset($options['appendTo']))
105
-			$options['appendTo'] = 'form:first';
105
+			$options['appendTo']='form:first';
106 106
 
107 107
 		foreach($this->getControls() as $control)
108 108
 			if($control instanceof TJuiDialogButton)
109
-				$options['buttons'][] = $control->getPostBackOptions();
109
+				$options['buttons'][]=$control->getPostBackOptions();
110 110
 
111 111
 		return $options;
112 112
 	}
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		parent::addAttributesToRender($writer);
121 121
 
122
-		$writer->addAttribute('id',$this->getClientID());
122
+		$writer->addAttribute('id', $this->getClientID());
123 123
 		$options=TJavascript::encode($this->getPostBackOptions());
124 124
 		$cs=$this->getPage()->getClientScript();
125 125
 		$code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");";
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * Raises the OnCreate event
141 141
 	 * @param object $params event parameters
142 142
 	 */
143
-	public function onOpen ($params)
143
+	public function onOpen($params)
144 144
 	{
145 145
 		$this->raiseEvent('OnOpen', $this, $params);
146 146
 	}
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
 	private function triggerClientMethod($method)
165 165
 	{
166
-		$cs = $this->getPage()->getClientScript();
167
-		$code = "jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })";
166
+		$cs=$this->getPage()->getClientScript();
167
+		$code="jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })";
168 168
 		$cs->registerEndScript(sprintf('%08X', crc32($code)), $code);
169 169
 	}
170 170
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 		return array(
245 245
 			'text' => $this->getText(),
246 246
 			'click' => new TJavaScriptLiteral("function(){new Prado.Callback('".$this->getUniqueID()."', 'onClick');}"
247
-			)) ;
247
+			));
248 248
 	}
249 249
 
250 250
 	/**
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	 */
253 253
 	public function getText()
254 254
 	{
255
-		return $this->getViewState('Text','');
255
+		return $this->getViewState('Text', '');
256 256
 	}
257 257
 
258 258
 	/**
@@ -260,14 +260,14 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	public function setText($value)
262 262
 	{
263
-		$this->setViewState('Text',$value,'');
263
+		$this->setViewState('Text', $value, '');
264 264
 	}
265 265
 
266 266
 	/**
267 267
 	 * Raises the OnClick event
268 268
 	 * @param object $params event parameters
269 269
 	 */
270
-	public function onClick ($params)
270
+	public function onClick($params)
271 271
 	{
272 272
 		$this->raiseEvent('OnClick', $this, $params);
273 273
 	}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function raiseCallbackEvent($param)
281 281
 	{
282
-		if($param->CallbackParameter === 'onClick')
282
+		if($param->CallbackParameter==='onClick')
283 283
 			$this->onClick($param);
284 284
 	}
285 285
 
Please login to merge, or discard this patch.