Completed
Push — scrutinizer ( 5826f3...ba0b09 )
by Fabio
11:34
created
framework/Web/UI/WebControls/TTabPanel.php 1 patch
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-     * Returns the index of the active tab view.
85
-     * Note, this property may not return the correct index.
86
-     * To ensure the correctness, call {@link getActiveView()} first.
84
+	 * Returns the index of the active tab view.
85
+	 * Note, this property may not return the correct index.
86
+	 * To ensure the correctness, call {@link getActiveView()} first.
87 87
 	 * @return integer the zero-based index of the active tab view. If -1, it means no active tab view. Default is 0 (the first view is active).
88 88
 	 */
89 89
 	public function getActiveViewIndex()
@@ -100,24 +100,24 @@  discard block
 block discarded – undo
100 100
 		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
101 101
 	}
102 102
 
103
-    /**
104
-     * Returns the ID of the active tab view.
105
-     * Note, this property may not return the correct ID.
106
-     * To ensure the correctness, call {@link getActiveView()} first.
107
-     * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
-     */
109
-    public function getActiveViewID()
110
-    {
103
+	/**
104
+	 * Returns the ID of the active tab view.
105
+	 * Note, this property may not return the correct ID.
106
+	 * To ensure the correctness, call {@link getActiveView()} first.
107
+	 * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
+	 */
109
+	public function getActiveViewID()
110
+	{
111 111
 		return $this->getViewState('ActiveViewID','');
112
-    }
112
+	}
113 113
 
114
-    /**
115
-     * @param string The ID of the active tab view.
116
-     */
117
-    public function setActiveViewID($value)
118
-    {
114
+	/**
115
+	 * @param string The ID of the active tab view.
116
+	 */
117
+	public function setActiveViewID($value)
118
+	{
119 119
 		$this->setViewState('ActiveViewID',$value,'');
120
-    }
120
+	}
121 121
 
122 122
 	/**
123 123
 	 * Returns the currently active view.
@@ -172,63 +172,63 @@  discard block
 block discarded – undo
172 172
 			throw new TInvalidOperationException('tabpanel_view_inexistent');
173 173
 	}
174 174
 
175
-    /**
176
-     * @return bool status of automatic tab switch on hover
177
-     */
178
-    public function getAutoSwitch()
179
-    {
180
-        return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
-    }
182
-
183
-    /**
184
-     * @param bool whether to enable automatic tab switch on hover
185
-     */
186
-    public function setAutoSwitch($value)
187
-    {
188
-        $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
-    }
190
-
191
-
192
-    /**
193
-     * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
-     */
195
-    public function getCssUrl()
196
-    {
197
-        return $this->getViewState('CssUrl','default');
198
-    }
199
-
200
-    /**
201
-     * @param string URL for the CSS file including all relevant CSS class definitions.
202
-     */
203
-    public function setCssUrl($value)
204
-    {
205
-        $this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
-    }
207
-
208
-    /**
209
-     * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
-     */
211
-    public function getCssClass()
212
-    {
213
-    	$cssClass=parent::getCssClass();
214
-    	return $cssClass===''?'tab-panel':$cssClass;
215
-    }
216
-
217
-    /**
218
-     * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
-     */
220
-    public function getViewCssClass()
221
-    {
222
-        return $this->getViewStyle()->getCssClass();
223
-    }
224
-
225
-    /**
226
-     * @param string CSS class for the currently displayed view div.
227
-     */
228
-    public function setViewCssClass($value)
229
-    {
230
-        $this->getViewStyle()->setCssClass($value);
231
-    }
175
+	/**
176
+	 * @return bool status of automatic tab switch on hover
177
+	 */
178
+	public function getAutoSwitch()
179
+	{
180
+		return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
+	}
182
+
183
+	/**
184
+	 * @param bool whether to enable automatic tab switch on hover
185
+	 */
186
+	public function setAutoSwitch($value)
187
+	{
188
+		$this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
+	}
190
+
191
+
192
+	/**
193
+	 * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
+	 */
195
+	public function getCssUrl()
196
+	{
197
+		return $this->getViewState('CssUrl','default');
198
+	}
199
+
200
+	/**
201
+	 * @param string URL for the CSS file including all relevant CSS class definitions.
202
+	 */
203
+	public function setCssUrl($value)
204
+	{
205
+		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
+	}
207
+
208
+	/**
209
+	 * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
+	 */
211
+	public function getCssClass()
212
+	{
213
+		$cssClass=parent::getCssClass();
214
+		return $cssClass===''?'tab-panel':$cssClass;
215
+	}
216
+
217
+	/**
218
+	 * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
+	 */
220
+	public function getViewCssClass()
221
+	{
222
+		return $this->getViewStyle()->getCssClass();
223
+	}
224
+
225
+	/**
226
+	 * @param string CSS class for the currently displayed view div.
227
+	 */
228
+	public function setViewCssClass($value)
229
+	{
230
+		$this->getViewStyle()->setCssClass($value);
231
+	}
232 232
 
233 233
 	/**
234 234
 	 * @return TStyle the style for all the view div
@@ -244,21 +244,21 @@  discard block
 block discarded – undo
244 244
 		return $style;
245 245
 	}
246 246
 
247
-    /**
248
-     * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
-     */
250
-    public function getTabCssClass()
251
-    {
252
-        return $this->getTabStyle()->getCssClass();
253
-    }
247
+	/**
248
+	 * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
+	 */
250
+	public function getTabCssClass()
251
+	{
252
+		return $this->getTabStyle()->getCssClass();
253
+	}
254 254
 
255
-    /**
256
-     * @param string CSS class for non-active tabs.
257
-     */
258
-    public function setTabCssClass($value)
259
-    {
260
-        $this->getTabStyle()->setCssClass($value);
261
-    }
255
+	/**
256
+	 * @param string CSS class for non-active tabs.
257
+	 */
258
+	public function setTabCssClass($value)
259
+	{
260
+		$this->getTabStyle()->setCssClass($value);
261
+	}
262 262
 
263 263
 	/**
264 264
 	 * @return TStyle the style for all the inactive tab div
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
 		return $style;
275 275
 	}
276 276
 
277
-    /**
278
-     * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
-     */
280
-    public function getActiveTabCssClass()
281
-    {
282
-        return $this->getActiveTabStyle()->getCssClass();
283
-    }
284
-
285
-    /**
286
-     * @param string CSS class for the active tab.
287
-     */
288
-    public function setActiveTabCssClass($value)
289
-    {
290
-        $this->getActiveTabStyle()->setCssClass($value);
291
-    }
277
+	/**
278
+	 * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
+	 */
280
+	public function getActiveTabCssClass()
281
+	{
282
+		return $this->getActiveTabStyle()->getCssClass();
283
+	}
284
+
285
+	/**
286
+	 * @param string CSS class for the active tab.
287
+	 */
288
+	public function setActiveTabCssClass($value)
289
+	{
290
+		$this->getActiveTabStyle()->setCssClass($value);
291
+	}
292 292
 
293 293
 	/**
294 294
 	 * @return TStyle the style for the active tab div
Please login to merge, or discard this patch.
framework/Web/UI/TPage.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -303,15 +303,15 @@
 block discarded – undo
303 303
 
304 304
 		$this->setAdapter(new TActivePageAdapter($this));
305 305
 
306
-        $callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
307
-        if(strlen($callbackEventParameter) > 0)
308
-            $this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
309
-
310
-        // Decode Callback postData from UTF-8 to current Charset
311
-        if (($g=$this->getApplication()->getGlobalization(false))!==null &&
312
-            strtoupper($enc=$g->getCharset())!='UTF-8')
313
-                foreach ($this->_postData as $k=>$v)
314
-                	$this->_postData[$k]=self::decodeUTF8($v, $enc);
306
+		$callbackEventParameter = $this->getRequest()->itemAt(TPage::FIELD_CALLBACK_PARAMETER);
307
+		if(strlen($callbackEventParameter) > 0)
308
+			$this->_postData[TPage::FIELD_CALLBACK_PARAMETER]=TJavaScript::jsonDecode((string)$callbackEventParameter);
309
+
310
+		// Decode Callback postData from UTF-8 to current Charset
311
+		if (($g=$this->getApplication()->getGlobalization(false))!==null &&
312
+			strtoupper($enc=$g->getCharset())!='UTF-8')
313
+				foreach ($this->_postData as $k=>$v)
314
+					$this->_postData[$k]=self::decodeUTF8($v, $enc);
315 315
 
316 316
 		Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
317 317
 		$this->onPreInit(null);
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiResizable.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiResizable class file.
4
- *
5
- * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiResizable class file.
4
+	 *
5
+	 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
13 13
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDroppable.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiDroppable class file.
4
- *
5
- * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiDroppable class file.
4
+	 *
5
+	 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
13 13
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiControlAdapter.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiControlAdapter class file.
4
- *
5
- * @author Fabio Bas <[email protected]>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiControlAdapter class file.
4
+	 *
5
+	 * @author Fabio Bas <[email protected]>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
13 13
 Prado::using('System.Web.UI.JuiControls.TJuiControlOptions');
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function loadState() {
98 98
 	  parent::loadState();
99
-    $this->getControl()->getOptions()->setControl($this->getControl());
99
+	$this->getControl()->getOptions()->setControl($this->getControl());
100 100
 	}
101 101
 
102 102
 }
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
 class TJuiEventParameter extends TCallbackEventParameter
131 131
 {
132 132
  	/**
133
-	 * getControl
134
-	 *
135
-	 * Compatibility method to get a control from its clientside id
136
-	 * @return TControl control, or null if not found
133
+ 	 * getControl
134
+ 	 *
135
+ 	 * Compatibility method to get a control from its clientside id
136
+ 	 * @return TControl control, or null if not found
137 137
  	 */
138 138
 	public function getControl($id)
139 139
 	{
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
    */
185 185
   protected function addStatesToTrack()
186 186
   {
187
-    parent::addStatesToTrack();
188
-    $states = $this->getStatesToTrack();
189
-    $states['JuiOptions'] = array('TMapCollectionDiff', array($this, 'updateJuiOptions'));
187
+	parent::addStatesToTrack();
188
+	$states = $this->getStatesToTrack();
189
+	$states['JuiOptions'] = array('TMapCollectionDiff', array($this, 'updateJuiOptions'));
190 190
   }
191 191
 
192 192
 	/**
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 	 */
196 196
   protected function updateJuiOptions($options)
197 197
   {
198
-    foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value));
199
-    $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });";
200
-    $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code);
198
+	foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value));
199
+	$code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });";
200
+	$this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code);
201 201
   }
202 202
 
203 203
 }
204 204
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDatePicker.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@
 block discarded – undo
90 90
 	{
91 91
 		return array('altField', 'altFormat', 'appendText', 'autoSize', 'buttonImage', 'buttonImageOnly', 'buttonText', 'calculateWeek',
92 92
 								 'changeMonth', 'changeYear', 'closeText', 'constrainInput', 'currentText', 'dateFormat', 'dayNames', 'dayNamesMin',
93
-				         'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate',
93
+						 'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate',
94 94
 								 'minDate', 'monthNames', 'monthNamesShort', 'navigationAsDateFormat', 'nextText', 'numberOfMonths', 'prevText',
95 95
 								 'selectOtherMonths', 'shortYearCutoff', 'showAnim', 'showButtonPanel', 'showCurrentAtPos', 'showMonthAfterYear',
96
-				         'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix',
96
+						 'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix',
97 97
 								 'beforeShow', 'beforeShowDay', 'onChangeMonthYear', 'onClose', 'onSelect');
98 98
 	}
99 99
 
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDialog.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiDialog class file.
4
- *
5
- * @author  David Otto <ottodavid[at]gmx[dot]net>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiDialog class file.
4
+	 *
5
+	 * @author  David Otto <ottodavid[at]gmx[dot]net>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
13 13
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiControlOptions.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiControlOptions class file.
4
- *
5
- * @author Fabio Bas <[email protected]>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiControlOptions class file.
4
+	 *
5
+	 * @author Fabio Bas <[email protected]>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 /**
13 13
  * IJuiOptions interface
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function __construct($control)
63 63
 	{
64
-    $this->setControl($control);
64
+	$this->setControl($control);
65 65
 	}
66 66
 
67 67
 	/**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function setControl($control)
73 73
 	{
74 74
 	  if(!$control instanceof IJuiOptions)
75
-	    throw new THttpException(500,'juioptions_control_invalid',$control->ID);
75
+		throw new THttpException(500,'juioptions_control_invalid',$control->ID);
76 76
 	  $this->_control=$control;
77 77
 	}
78 78
 
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDraggable.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiDraggable class file.
4
- *
5
- * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiDraggable class file.
4
+	 *
5
+	 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
13 13
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
Please login to merge, or discard this patch.