@@ -66,7 +66,7 @@ |
||
66 | 66 | /** |
67 | 67 | * No client class for this control. |
68 | 68 | * This method overrides the parent implementation. |
69 | - * @return null no javascript class name. |
|
69 | + * @return string no javascript class name. |
|
70 | 70 | */ |
71 | 71 | protected function getClientClassName() |
72 | 72 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | protected function createListItemCollection() |
84 | 84 | { |
85 | - $collection = new TActiveListItemCollection; |
|
85 | + $collection=new TActiveListItemCollection; |
|
86 | 86 | $collection->setControl($this); |
87 | 87 | return $collection; |
88 | 88 | } |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | protected function addAttributesToRender($writer) |
103 | 103 | { |
104 | 104 | parent::addAttributesToRender($writer); |
105 | - $writer->addAttribute('id',$this->getClientID()); |
|
106 | - if ($this->getAutoPostBack()) |
|
105 | + $writer->addAttribute('id', $this->getClientID()); |
|
106 | + if($this->getAutoPostBack()) |
|
107 | 107 | $this->getActiveControl()->registerCallbackClientScript( |
108 | 108 | $this->getClientClassName(), $this->getPostBackOptions()); |
109 | 109 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Javascript client class for this control. |
72 | 72 | * This method overrides the parent implementation. |
73 | - * @return null no javascript class name. |
|
73 | + * @return string no javascript class name. |
|
74 | 74 | */ |
75 | 75 | protected function getClientClassName() |
76 | 76 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | protected function createListItemCollection() |
64 | 64 | { |
65 | - $collection = new TActiveListItemCollection; |
|
65 | + $collection=new TActiveListItemCollection; |
|
66 | 66 | $collection->setControl($this); |
67 | 67 | return $collection; |
68 | 68 | } |
@@ -85,15 +85,15 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function setSelectionMode($value) |
87 | 87 | { |
88 | - if(parent::getSelectionMode() === $value) |
|
88 | + if(parent::getSelectionMode()===$value) |
|
89 | 89 | return; |
90 | 90 | |
91 | 91 | parent::setSelectionMode($value); |
92 | - $multiple = $this->getIsMultiSelect(); |
|
93 | - $id = $this->getUniqueID(); $multi_id = $id.'[]'; |
|
92 | + $multiple=$this->getIsMultiSelect(); |
|
93 | + $id=$this->getUniqueID(); $multi_id=$id.'[]'; |
|
94 | 94 | if($this->getActiveControl()->canUpdateClientSide()) |
95 | 95 | { |
96 | - $client = $this->getPage()->getCallbackClient(); |
|
96 | + $client=$this->getPage()->getCallbackClient(); |
|
97 | 97 | $client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false); |
98 | 98 | $client->setAttribute($this, 'name', $multiple ? $multi_id : $id); |
99 | 99 | } |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | protected function addAttributesToRender($writer) |
147 | 147 | { |
148 | 148 | parent::addAttributesToRender($writer); |
149 | - $writer->addAttribute('id',$this->getClientID()); |
|
150 | - if ($this->getAutoPostBack()) |
|
149 | + $writer->addAttribute('id', $this->getClientID()); |
|
150 | + if($this->getAutoPostBack()) |
|
151 | 151 | $this->getActiveControl()->registerCallbackClientScript( |
152 | 152 | $this->getClientClassName(), $this->getPostBackOptions()); |
153 | 153 | } |
@@ -99,6 +99,7 @@ |
||
99 | 99 | * Calls the client-side static method for this control class. |
100 | 100 | * @param string static method name |
101 | 101 | * @param mixed method parmaeter |
102 | + * @param string $func |
|
102 | 103 | */ |
103 | 104 | protected function callClientFunction($func,$value) |
104 | 105 | { |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function setReadOnly($value) |
82 | 82 | { |
83 | - if(parent::getReadOnly() === $value) |
|
83 | + if(parent::getReadOnly()===$value) |
|
84 | 84 | return; |
85 | 85 | |
86 | 86 | parent::setReadOnly($value); |
87 | - $value = $this->getReadOnly(); |
|
88 | - $this->callClientFunction('setReadOnly',$value); |
|
87 | + $value=$this->getReadOnly(); |
|
88 | + $this->callClientFunction('setReadOnly', $value); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function setRating($value) |
95 | 95 | { |
96 | - if(parent::getRating() === $value) |
|
96 | + if(parent::getRating()===$value) |
|
97 | 97 | return; |
98 | 98 | |
99 | 99 | parent::setRating($value); |
100 | - $value = $this->getRating(); |
|
101 | - $this->callClientFunction('setRating',$value); |
|
100 | + $value=$this->getRating(); |
|
101 | + $this->callClientFunction('setRating', $value); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | * @param string static method name |
107 | 107 | * @param mixed method parmaeter |
108 | 108 | */ |
109 | - protected function callClientFunction($func,$value) |
|
109 | + protected function callClientFunction($func, $value) |
|
110 | 110 | { |
111 | 111 | if($this->getActiveControl()->canUpdateClientSide()) |
112 | 112 | { |
113 | - $client = $this->getPage()->getCallbackClient(); |
|
114 | - $code = 'Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')'; |
|
115 | - $client->evaluateScript($code,array($value)); |
|
113 | + $client=$this->getPage()->getCallbackClient(); |
|
114 | + $code='Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')'; |
|
115 | + $client->evaluateScript($code, array($value)); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function setCaption($value) |
123 | 123 | { |
124 | - if(parent::getCaption() === $value) |
|
124 | + if(parent::getCaption()===$value) |
|
125 | 125 | return; |
126 | 126 | |
127 | 127 | parent::setCaption($value); |
128 | 128 | // if it's an active control, this should not be needed. |
129 | - $this->callClientFunction('setCaption',$value); |
|
129 | + $this->callClientFunction('setCaption', $value); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * o 'True' or 'Revert' : The draggable will revert to it's original position |
54 | 54 | * o 'False' or 'None' : The draggable won't revert to it's original position |
55 | 55 | * o 'Failure' : The draggable will only revert if it's dropped on a non droppable area |
56 | - * @return TDraggableRevertOption true to revert |
|
56 | + * @return string true to revert |
|
57 | 57 | */ |
58 | 58 | public function getRevert() |
59 | 59 | { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Determine if the element should be constrainted in one direction or not |
121 | - * @return CDraggableConstraint |
|
121 | + * @return string |
|
122 | 122 | */ |
123 | 123 | public function getConstraint() |
124 | 124 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * Set the handle id or css class |
42 | 42 | * @param string |
43 | 43 | */ |
44 | - public function setHandle ($value) |
|
44 | + public function setHandle($value) |
|
45 | 45 | { |
46 | 46 | $this->setViewState('DragHandle', TPropertyValue::ensureString($value), null); |
47 | 47 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * Get the handle id or css class |
51 | 51 | * @return string |
52 | 52 | */ |
53 | - public function getHandle () |
|
53 | + public function getHandle() |
|
54 | 54 | { |
55 | 55 | return $this->getViewState('DragHandle', null); |
56 | 56 | } |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function setRevert($value) |
82 | 82 | { |
83 | - if (strcasecmp($value,'true')==0 || $value===true) |
|
83 | + if(strcasecmp($value, 'true')==0 || $value===true) |
|
84 | 84 | $value=TDraggableRevertOptions::Revert; |
85 | - elseif (strcasecmp($value,'false')==0 || $value===false) |
|
85 | + elseif(strcasecmp($value, 'false')==0 || $value===false) |
|
86 | 86 | $value=TDraggableRevertOptions::None; |
87 | 87 | $this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableRevertOptions'), true); |
88 | 88 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @return TDraggableGhostingOption to clone the element |
101 | 101 | */ |
102 | - public function getGhosting () |
|
102 | + public function getGhosting() |
|
103 | 103 | { |
104 | 104 | return $this->getViewState('Ghosting', TDraggableGhostingOptions::None); |
105 | 105 | } |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | * o "False" or "None" means no Ghosting options |
117 | 117 | * |
118 | 118 | */ |
119 | - public function setGhosting ($value) |
|
119 | + public function setGhosting($value) |
|
120 | 120 | { |
121 | - if (strcasecmp($value,'true')==0 || $value===true) |
|
121 | + if(strcasecmp($value, 'true')==0 || $value===true) |
|
122 | 122 | $value=TDraggableGhostingOptions::Ghosting; |
123 | - elseif (strcasecmp($value,'false')==0 || $value===false) |
|
123 | + elseif(strcasecmp($value, 'false')==0 || $value===false) |
|
124 | 124 | $value=TDraggableGhostingOptions::None; |
125 | 125 | $this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableGhostingOptions'), TDraggableGhostingOptions::None); |
126 | 126 | } |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | parent::addAttributesToRender($writer); |
164 | 164 | |
165 | 165 | $cs=$this->getPage()->getClientScript(); |
166 | - if ($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting) |
|
166 | + if($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting) |
|
167 | 167 | $cs->registerPradoScript('dragdropextra'); |
168 | 168 | else |
169 | 169 | $cs->registerPradoScript('dragdrop'); |
170 | - $writer->addAttribute('id',$this->getClientID()); |
|
170 | + $writer->addAttribute('id', $this->getClientID()); |
|
171 | 171 | $options=TJavaScript::encode($this->getPostBackOptions()); |
172 | 172 | $class=$this->getClientClassName(); |
173 | 173 | $code="new {$class}('{$this->getClientId()}', {$options}) "; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * This method overrides the parent implementation. |
180 | 180 | * @return string the javascript class name |
181 | 181 | */ |
182 | - protected function getClientClassName () |
|
182 | + protected function getClientClassName() |
|
183 | 183 | { |
184 | 184 | return 'Draggable'; |
185 | 185 | } |
@@ -190,17 +190,17 @@ discard block |
||
190 | 190 | */ |
191 | 191 | protected function getPostBackOptions() |
192 | 192 | { |
193 | - $options['ID'] = $this->getClientID(); |
|
193 | + $options['ID']=$this->getClientID(); |
|
194 | 194 | |
195 | - if (($handle=$this->getHandle())!== null) $options['handle']=$handle; |
|
196 | - if (($revert=$this->getRevert())===TDraggableRevertOptions::None) |
|
195 | + if(($handle=$this->getHandle())!==null) $options['handle']=$handle; |
|
196 | + if(($revert=$this->getRevert())===TDraggableRevertOptions::None) |
|
197 | 197 | $options['revert']=false; |
198 | - elseif ($revert==TDraggableRevertOptions::Revert) |
|
198 | + elseif($revert==TDraggableRevertOptions::Revert) |
|
199 | 199 | $options['revert']=true; |
200 | 200 | else |
201 | 201 | $options['revert']=strtolower($revert); |
202 | - if (($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint); |
|
203 | - switch ($this->getGhosting()) |
|
202 | + if(($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint); |
|
203 | + switch($this->getGhosting()) |
|
204 | 204 | { |
205 | 205 | case TDraggableGhostingOptions::SuperGhosting: |
206 | 206 | $options['superghosting']=true; |
@@ -92,6 +92,8 @@ discard block |
||
92 | 92 | * Calls the client-side static method for this control class. |
93 | 93 | * @param string static method name |
94 | 94 | * @param mixed method parmaeter |
95 | + * @param string $func |
|
96 | + * @param boolean $value |
|
95 | 97 | */ |
96 | 98 | protected function callClientFunction($func,$value) |
97 | 99 | { |
@@ -239,6 +241,7 @@ discard block |
||
239 | 241 | * Raised when editing the content is requsted to be loaded from the |
240 | 242 | * server side. |
241 | 243 | * @param TCallbackEventParameter event parameter to be passed to the event handlers |
244 | + * @param TCallbackEventParameter $param |
|
242 | 245 | */ |
243 | 246 | public function onLoadingText($param) |
244 | 247 | { |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function setDisplayTextBox($value) |
76 | 76 | { |
77 | - $value = TPropertyValue::ensureBoolean($value); |
|
78 | - $this->setViewState('DisplayTextBox', $value,false); |
|
77 | + $value=TPropertyValue::ensureBoolean($value); |
|
78 | + $this->setViewState('DisplayTextBox', $value, false); |
|
79 | 79 | if($this->getActiveControl()->canUpdateClientSide()) |
80 | - $this->callClientFunction('setDisplayTextBox',$value); |
|
80 | + $this->callClientFunction('setDisplayTextBox', $value); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | * @param string static method name |
94 | 94 | * @param mixed method parmaeter |
95 | 95 | */ |
96 | - protected function callClientFunction($func,$value) |
|
96 | + protected function callClientFunction($func, $value) |
|
97 | 97 | { |
98 | - $client = $this->getPage()->getCallbackClient(); |
|
99 | - $code = $this->getClientClassName().'.'.$func; |
|
100 | - $client->callClientFunction($code,array($this,$value)); |
|
98 | + $client=$this->getPage()->getCallbackClient(); |
|
99 | + $code=$this->getClientClassName().'.'.$func; |
|
100 | + $client->callClientFunction($code, array($this, $value)); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function getExternalControlID() |
123 | 123 | { |
124 | - $extID = $this->getEditTriggerControlID(); |
|
124 | + $extID=$this->getEditTriggerControlID(); |
|
125 | 125 | if($extID===null) return ''; |
126 | - if(($control = $this->findControl($extID))!==null) |
|
126 | + if(($control=$this->findControl($extID))!==null) |
|
127 | 127 | return $control->getClientID(); |
128 | 128 | return $extID; |
129 | 129 | } |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function setText($value) |
137 | 137 | { |
138 | - if(TTextBox::getText() === $value) |
|
138 | + if(TTextBox::getText()===$value) |
|
139 | 139 | return; |
140 | 140 | |
141 | 141 | TTextBox::setText($value); |
142 | 142 | if($this->getActiveControl()->canUpdateClientSide()) |
143 | 143 | { |
144 | - $client = $this->getPage()->getCallbackClient(); |
|
144 | + $client=$this->getPage()->getCallbackClient(); |
|
145 | 145 | $client->update($this->getLabelClientID(), $value); |
146 | 146 | $client->setValue($this, $value); |
147 | 147 | } |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | * @param boolean value |
153 | 153 | * @since 3.1.2 |
154 | 154 | */ |
155 | - public function setReadOnly ($value) |
|
155 | + public function setReadOnly($value) |
|
156 | 156 | { |
157 | 157 | $value=TPropertyValue::ensureBoolean($value); |
158 | - if(TTextBox::getReadOnly() === $value) |
|
158 | + if(TTextBox::getReadOnly()===$value) |
|
159 | 159 | return; |
160 | 160 | |
161 | 161 | TTextBox::setReadOnly($value); |
162 | - if ($this->getActiveControl()->canUpdateClientSide()) |
|
162 | + if($this->getActiveControl()->canUpdateClientSide()) |
|
163 | 163 | { |
164 | 164 | $this->callClientFunction('setReadOnly', $value); |
165 | 165 | } |
@@ -202,10 +202,10 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function onCallback($param) |
204 | 204 | { |
205 | - $action = $param->getCallbackParameter(); |
|
206 | - if(is_array($action) && $action[0] === '__InlineEditor_loadExternalText__') |
|
205 | + $action=$param->getCallbackParameter(); |
|
206 | + if(is_array($action) && $action[0]==='__InlineEditor_loadExternalText__') |
|
207 | 207 | { |
208 | - $parameter = new TCallbackEventParameter($this->getResponse(), $action[1]); |
|
208 | + $parameter=new TCallbackEventParameter($this->getResponse(), $action[1]); |
|
209 | 209 | $this->onLoadingText($parameter); |
210 | 210 | } |
211 | 211 | $this->raiseEvent('OnCallback', $this, $param); |
@@ -216,26 +216,26 @@ discard block |
||
216 | 216 | */ |
217 | 217 | protected function getPostBackOptions() |
218 | 218 | { |
219 | - $options = parent::getPostBackOptions(); |
|
220 | - $options['ID'] = $this->getLabelClientID(); |
|
221 | - $options['TextBoxID'] = $this->getClientID(); |
|
222 | - $options['ExternalControl'] = $this->getExternalControlID(); |
|
223 | - $options['AutoHide'] = $this->getAutoHideTextBox() == false ? '' : true; |
|
224 | - $options['AutoPostBack'] = $this->getAutoPostBack() == false ? '' : true; |
|
225 | - $options['Columns'] = $this->getColumns(); |
|
219 | + $options=parent::getPostBackOptions(); |
|
220 | + $options['ID']=$this->getLabelClientID(); |
|
221 | + $options['TextBoxID']=$this->getClientID(); |
|
222 | + $options['ExternalControl']=$this->getExternalControlID(); |
|
223 | + $options['AutoHide']=$this->getAutoHideTextBox()==false ? '' : true; |
|
224 | + $options['AutoPostBack']=$this->getAutoPostBack()==false ? '' : true; |
|
225 | + $options['Columns']=$this->getColumns(); |
|
226 | 226 | if($this->getTextMode()==='MultiLine') |
227 | 227 | { |
228 | - $options['Rows'] = $this->getRows(); |
|
229 | - $options['Wrap'] = $this->getWrap()== false ? '' : true; |
|
228 | + $options['Rows']=$this->getRows(); |
|
229 | + $options['Wrap']=$this->getWrap()==false ? '' : true; |
|
230 | 230 | } |
231 | 231 | else |
232 | 232 | { |
233 | - $length = $this->getMaxLength(); |
|
234 | - $options['MaxLength'] = $length > 0 ? $length : ''; |
|
233 | + $length=$this->getMaxLength(); |
|
234 | + $options['MaxLength']=$length > 0 ? $length : ''; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | if($this->hasEventHandler('OnLoadingText')) |
238 | - $options['LoadTextOnEdit'] = true; |
|
238 | + $options['LoadTextOnEdit']=true; |
|
239 | 239 | |
240 | 240 | $options['ReadOnly']=$this->getReadOnly(); |
241 | 241 | return $options; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function onLoadingText($param) |
250 | 250 | { |
251 | - $this->raiseEvent('OnLoadingText',$this,$param); |
|
251 | + $this->raiseEvent('OnLoadingText', $this, $param); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | { |
268 | 268 | //calls the TWebControl to avoid rendering other attribute normally render for a textbox. |
269 | 269 | TWebControl::addAttributesToRender($writer); |
270 | - $writer->addAttribute('id',$this->getLabelClientID()); |
|
270 | + $writer->addAttribute('id', $this->getLabelClientID()); |
|
271 | 271 | $this->getActiveControl()->registerCallbackClientScript( |
272 | 272 | $this->getClientClassName(), $this->getPostBackOptions()); |
273 | 273 | } |
@@ -233,8 +233,7 @@ |
||
233 | 233 | { |
234 | 234 | $options['Rows'] = $this->getRows(); |
235 | 235 | $options['Wrap'] = $this->getWrap()== false ? '' : true; |
236 | - } |
|
237 | - else |
|
236 | + } else |
|
238 | 237 | { |
239 | 238 | $length = $this->getMaxLength(); |
240 | 239 | $options['MaxLength'] = $length > 0 ? $length : ''; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * @return array list of trigger callback options. |
|
59 | + * @return string list of trigger callback options. |
|
60 | 60 | */ |
61 | 61 | protected function getTriggerOptions() |
62 | 62 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function getTargetControl() |
46 | 46 | { |
47 | - $id = $this->getControlID(); |
|
47 | + $id=$this->getControlID(); |
|
48 | 48 | if(($control=$this->findControl($id)) instanceof TControl) |
49 | 49 | return $control->getClientID(); |
50 | 50 | if($id==='') |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | */ |
61 | 61 | protected function getTriggerOptions() |
62 | 62 | { |
63 | - $options['ID'] = $this->getClientID(); |
|
64 | - $options['EventTarget'] = $this->getUniqueID(); |
|
65 | - $options['ControlID'] = $this->getTargetControl(); |
|
63 | + $options['ID']=$this->getClientID(); |
|
64 | + $options['EventTarget']=$this->getUniqueID(); |
|
65 | + $options['ControlID']=$this->getTargetControl(); |
|
66 | 66 | return $options; |
67 | 67 | } |
68 | 68 | } |
@@ -158,6 +158,9 @@ |
||
158 | 158 | $this->triggerClientMethod('close'); |
159 | 159 | } |
160 | 160 | |
161 | + /** |
|
162 | + * @param string $method |
|
163 | + */ |
|
161 | 164 | private function triggerClientMethod($method) |
162 | 165 | { |
163 | 166 | $cs = $this->getPage()->getClientScript(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function getOptions() |
74 | 74 | { |
75 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
75 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
76 | 76 | { |
77 | 77 | $options=new TJuiControlOptions($this); |
78 | 78 | $this->setViewState('JuiOptions', $options); |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function getPostBackOptions() |
105 | 105 | { |
106 | - $options = $this->getOptions()->toArray(); |
|
106 | + $options=$this->getOptions()->toArray(); |
|
107 | 107 | // always make the dialog a child of the form, or its inner inputs won't be collected |
108 | 108 | if(!isset($options['appendTo'])) |
109 | - $options['appendTo'] = 'form:first'; |
|
109 | + $options['appendTo']='form:first'; |
|
110 | 110 | |
111 | 111 | foreach($this->getControls() as $control) |
112 | 112 | if($control instanceof TJuiDialogButton) |
113 | - $options['buttons'][] = $control->getPostBackOptions(); |
|
113 | + $options['buttons'][]=$control->getPostBackOptions(); |
|
114 | 114 | |
115 | 115 | return $options; |
116 | 116 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | parent::addAttributesToRender($writer); |
125 | 125 | |
126 | - $writer->addAttribute('id',$this->getClientID()); |
|
126 | + $writer->addAttribute('id', $this->getClientID()); |
|
127 | 127 | $options=TJavaScript::encode($this->getPostBackOptions()); |
128 | 128 | $cs=$this->getPage()->getClientScript(); |
129 | 129 | $code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");"; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * Raises the OnCreate event |
145 | 145 | * @param object $params event parameters |
146 | 146 | */ |
147 | - public function onOpen ($params) |
|
147 | + public function onOpen($params) |
|
148 | 148 | { |
149 | 149 | $this->raiseEvent('OnOpen', $this, $params); |
150 | 150 | } |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | |
168 | 168 | private function triggerClientMethod($method) |
169 | 169 | { |
170 | - $cs = $this->getPage()->getClientScript(); |
|
171 | - $code = "jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })"; |
|
170 | + $cs=$this->getPage()->getClientScript(); |
|
171 | + $code="jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })"; |
|
172 | 172 | $cs->registerEndScript(sprintf('%08X', crc32($code)), $code); |
173 | 173 | } |
174 | 174 |
@@ -193,8 +193,7 @@ |
||
193 | 193 | { |
194 | 194 | parent::renderContents($writer); |
195 | 195 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer, false); |
196 | - } |
|
197 | - else |
|
196 | + } else |
|
198 | 197 | parent::render($writer); |
199 | 198 | } |
200 | 199 | } |
@@ -76,7 +76,7 @@ |
||
76 | 76 | /** |
77 | 77 | * This method creates the template object for the given class |
78 | 78 | * |
79 | - * @param string $p_class The class to create the template from |
|
79 | + * @param string $parentClass |
|
80 | 80 | * @return void |
81 | 81 | * @throws TConfigurationException if a template control directive is invalid |
82 | 82 | */ |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function createChildControls() |
45 | 45 | { |
46 | - if(null === ($_template = $this->getTemplate())) { |
|
46 | + if(null===($_template=$this->getTemplate())) { |
|
47 | 47 | return $this->doCreateChildControlsFor(get_class($this)); |
48 | 48 | } |
49 | 49 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function doCreateChildControlsFor($parentClass) |
68 | 68 | { |
69 | - if(false !== ($_parentClass = get_parent_class($parentClass)) && 'TTemplateControl' != $_parentClass) { |
|
69 | + if(false!==($_parentClass=get_parent_class($parentClass)) && 'TTemplateControl'!=$_parentClass) { |
|
70 | 70 | $this->doCreateChildControlsFor($_parentClass); |
71 | 71 | } |
72 | 72 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function doTemplateForClass($parentClass) |
84 | 84 | { |
85 | - if(null !== ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
85 | + if(null!==($_template=$this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
86 | 86 | foreach($_template->getDirective() as $_name => $_value) { |
87 | 87 | if(!is_string($_value)) { |
88 | 88 | throw new TConfigurationException('templatecontrol_directive_invalid', get_class(this), $_name); |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function getIsSourceTemplateControl() |
107 | 107 | { |
108 | - if(null !== ($_template = $this->getTemplate())) { |
|
108 | + if(null!==($_template=$this->getTemplate())) { |
|
109 | 109 | return $_template->getIsSourceTemplate(); |
110 | 110 | } |
111 | 111 | |
112 | - return ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
112 | + return ($_template=$this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
113 | 113 | ? $_template->getIsSourceTemplate() |
114 | 114 | : false; |
115 | 115 | } |
@@ -166,6 +166,7 @@ |
||
166 | 166 | * Otherwise, an exception will be raised. |
167 | 167 | * @param mixed data item |
168 | 168 | * @param mixed field name |
169 | + * @param string $field |
|
169 | 170 | * @return mixed data value at the specified field |
170 | 171 | * @throws TInvalidDataValueException if the data is invalid |
171 | 172 | */ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function getDataKeyField() |
136 | 136 | { |
137 | - return $this->getViewState('DataKeyField',''); |
|
137 | + return $this->getViewState('DataKeyField', ''); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function setDataKeyField($value) |
144 | 144 | { |
145 | - $this->setViewState('DataKeyField',$value,''); |
|
145 | + $this->setViewState('DataKeyField', $value, ''); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getDataKeys() |
152 | 152 | { |
153 | - if(($dataKeys=$this->getViewState('DataKeys',null))===null) |
|
153 | + if(($dataKeys=$this->getViewState('DataKeys', null))===null) |
|
154 | 154 | { |
155 | 155 | $dataKeys=new TList; |
156 | - $this->setViewState('DataKeys',$dataKeys,null); |
|
156 | + $this->setViewState('DataKeys', $dataKeys, null); |
|
157 | 157 | } |
158 | 158 | return $dataKeys; |
159 | 159 | } |
@@ -169,9 +169,9 @@ discard block |
||
169 | 169 | * @return mixed data value at the specified field |
170 | 170 | * @throws TInvalidDataValueException if the data is invalid |
171 | 171 | */ |
172 | - protected function getDataFieldValue($data,$field) |
|
172 | + protected function getDataFieldValue($data, $field) |
|
173 | 173 | { |
174 | - return TDataFieldAccessor::getDataFieldValue($data,$field); |
|
174 | + return TDataFieldAccessor::getDataFieldValue($data, $field); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function onSelectedIndexChanged($param) |
184 | 184 | { |
185 | - $this->raiseEvent('OnSelectedIndexChanged',$this,$param); |
|
185 | + $this->raiseEvent('OnSelectedIndexChanged', $this, $param); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 |