@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setValue($value) |
57 | 57 | { |
58 | - if(parent::getValue() === $value) |
|
58 | + if(parent::getValue()===$value) |
|
59 | 59 | return; |
60 | 60 | |
61 | 61 | parent::setValue($value); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | protected function addAttributesToRender($writer) |
112 | 112 | { |
113 | 113 | parent::addAttributesToRender($writer); |
114 | - $writer->addAttribute('id',$this->getClientID()); |
|
114 | + $writer->addAttribute('id', $this->getClientID()); |
|
115 | 115 | $this->getActiveControl()->registerCallbackClientScript( |
116 | 116 | $this->getClientClassName(), $this->getPostBackOptions()); |
117 | 117 | } |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function setInterval($value) |
45 | 45 | { |
46 | - $interval = TPropertyValue::ensureFloat($value); |
|
46 | + $interval=TPropertyValue::ensureFloat($value); |
|
47 | 47 | if($interval <= 0) |
48 | 48 | throw new TConfigurationException('callback_interval_be_positive', $this->getID()); |
49 | 49 | |
50 | - if($this->getInterval() === $value) |
|
50 | + if($this->getInterval()===$value) |
|
51 | 51 | return; |
52 | 52 | |
53 | 53 | $this->setViewState('Interval', $interval, 1); |
54 | - if ($this->getActiveControl()->canUpdateClientSide()){ |
|
55 | - $client = $this->getPage()->getCallbackClient(); |
|
54 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
55 | + $client=$this->getPage()->getCallbackClient(); |
|
56 | 56 | $client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.setTimerInterval', array($this, $interval)); |
57 | 57 | } |
58 | 58 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function startTimer() |
64 | 64 | { |
65 | - $client = $this->getPage()->getCallbackClient(); |
|
65 | + $client=$this->getPage()->getCallbackClient(); |
|
66 | 66 | $client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.start', array($this)); |
67 | 67 | } |
68 | 68 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function stopTimer() |
73 | 73 | { |
74 | - $client = $this->getPage()->getCallbackClient(); |
|
74 | + $client=$this->getPage()->getCallbackClient(); |
|
75 | 75 | $client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.stop', array($this)); |
76 | 76 | } |
77 | 77 | |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | */ |
98 | 98 | protected function getTriggerOptions() |
99 | 99 | { |
100 | - $options['ID'] = $this->getClientID(); |
|
101 | - $options['EventTarget']= $this->getUniqueID(); |
|
102 | - $options['Interval'] = $this->getInterval(); |
|
100 | + $options['ID']=$this->getClientID(); |
|
101 | + $options['EventTarget']=$this->getUniqueID(); |
|
102 | + $options['Interval']=$this->getInterval(); |
|
103 | 103 | return $options; |
104 | 104 | } |
105 | 105 | |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | parent::render($writer); |
113 | 113 | $this->getActiveControl()->registerCallbackClientScript( |
114 | 114 | $this->getClientClassName(), $this->getTriggerOptions()); |
115 | - if($this->getStartTimerOnLoad()){ |
|
116 | - $id = $this->getClientID(); |
|
117 | - $code = "Prado.WebUI.TTimeTriggeredCallback.start('{$id}');"; |
|
118 | - $cs = $this->getPage()->getClientScript(); |
|
115 | + if($this->getStartTimerOnLoad()) { |
|
116 | + $id=$this->getClientID(); |
|
117 | + $code="Prado.WebUI.TTimeTriggeredCallback.start('{$id}');"; |
|
118 | + $cs=$this->getPage()->getClientScript(); |
|
119 | 119 | $cs->registerEndScript("{$id}:start", $code); |
120 | 120 | } |
121 | 121 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function setText($value) |
96 | 96 | { |
97 | - if(parent::getText() === $value) |
|
97 | + if(parent::getText()===$value) |
|
98 | 98 | return; |
99 | 99 | |
100 | 100 | parent::setText($value); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | protected function addAttributesToRender($writer) |
118 | 118 | { |
119 | 119 | parent::addAttributesToRender($writer); |
120 | - $writer->addAttribute('id',$this->getClientID()); |
|
120 | + $writer->addAttribute('id', $this->getClientID()); |
|
121 | 121 | $this->getActiveControl()->registerCallbackClientScript( |
122 | 122 | $this->getClientClassName(), $this->getPostBackOptions()); |
123 | 123 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function setAlternateText($value) |
50 | 50 | { |
51 | - if(parent::getAlternateText() === $value) |
|
51 | + if(parent::getAlternateText()===$value) |
|
52 | 52 | return; |
53 | 53 | |
54 | 54 | parent::setAlternateText($value); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function setImageAlign($value) |
67 | 67 | { |
68 | - if(parent::getImageAlign() === $value) |
|
68 | + if(parent::getImageAlign()===$value) |
|
69 | 69 | return; |
70 | 70 | |
71 | 71 | parent::setImageAlign($value); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function setImageUrl($value) |
80 | 80 | { |
81 | - if(parent::getImageUrl() === $value) |
|
81 | + if(parent::getImageUrl()===$value) |
|
82 | 82 | return; |
83 | 83 | |
84 | 84 | parent::setImageUrl($value); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function setDescriptionUrl($value) |
93 | 93 | { |
94 | - if(parent::getDescriptionUrl() === $value) |
|
94 | + if(parent::getDescriptionUrl()===$value) |
|
95 | 95 | return; |
96 | 96 | |
97 | 97 | parent::setDescriptionUrl($value); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function setText($value) |
97 | 97 | { |
98 | - if(parent::getText() === $value) |
|
98 | + if(parent::getText()===$value) |
|
99 | 99 | return; |
100 | 100 | |
101 | 101 | parent::setText($value); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | protected function addAttributesToRender($writer) |
119 | 119 | { |
120 | 120 | parent::addAttributesToRender($writer); |
121 | - $writer->addAttribute('id',$this->getClientID()); |
|
121 | + $writer->addAttribute('id', $this->getClientID()); |
|
122 | 122 | |
123 | 123 | if($this->getEnabled(true)) |
124 | 124 | { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function setEnabled($value) |
136 | 136 | { |
137 | - if(parent::getEnabled() === $value) |
|
137 | + if(parent::getEnabled()===$value) |
|
138 | 138 | return; |
139 | 139 | |
140 | 140 | parent::setEnabled($value); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | { |
143 | 143 | if($this->getEnabled(true)) |
144 | 144 | { |
145 | - $nop = "javascript:;//".$this->getClientID(); |
|
145 | + $nop="javascript:;//".$this->getClientID(); |
|
146 | 146 | $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop); |
147 | 147 | |
148 | 148 | $this->getActiveControl()->registerCallbackClientScript( |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setText($value) |
90 | 90 | { |
91 | - if(parent::getText() === $value) |
|
91 | + if(parent::getText()===$value) |
|
92 | 92 | return; |
93 | 93 | |
94 | 94 | parent::setText($value); |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function setChecked($value) |
107 | 107 | { |
108 | - $value = TPropertyValue::ensureBoolean($value); |
|
109 | - if(parent::getChecked() === $value) |
|
108 | + $value=TPropertyValue::ensureBoolean($value); |
|
109 | + if(parent::getChecked()===$value) |
|
110 | 110 | return; |
111 | 111 | |
112 | 112 | parent::setChecked($value); |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | * @param string checkbox id |
133 | 133 | * @param string onclick js |
134 | 134 | */ |
135 | - protected function renderInputTag($writer,$clientID,$onclick) |
|
135 | + protected function renderInputTag($writer, $clientID, $onclick) |
|
136 | 136 | { |
137 | - parent::renderInputTag($writer,$clientID,$onclick); |
|
138 | - if ($this->getAutoPostBack()) |
|
137 | + parent::renderInputTag($writer, $clientID, $onclick); |
|
138 | + if($this->getAutoPostBack()) |
|
139 | 139 | $this->getActiveControl()->registerCallbackClientScript( |
140 | 140 | $this->getClientClassName(), $this->getPostBackOptions()); |
141 | 141 | } |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function getLabelAttributes() |
156 | 156 | { |
157 | - $attributes = parent::getLabelAttributes(); |
|
158 | - $attributes['id'] = $this->getDefaultLabelID(); |
|
157 | + $attributes=parent::getLabelAttributes(); |
|
158 | + $attributes['id']=$this->getDefaultLabelID(); |
|
159 | 159 | return $attributes; |
160 | 160 | } |
161 | 161 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * @param string checkbox id |
166 | 166 | * @param string label text |
167 | 167 | */ |
168 | - protected function renderLabel($writer,$clientID,$text) |
|
168 | + protected function renderLabel($writer, $clientID, $text) |
|
169 | 169 | { |
170 | 170 | $writer->addAttribute('id', $this->getDefaultLabelID()); |
171 | 171 | parent::renderLabel($writer, $clientID, $text); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | protected function getDefaultLabelID() |
178 | 178 | { |
179 | - if($attributes=$this->getViewState('LabelAttributes',null)) |
|
179 | + if($attributes=$this->getViewState('LabelAttributes', null)) |
|
180 | 180 | return TCheckBox::getLabelAttributes()->itemAt('id'); |
181 | 181 | else |
182 | 182 | return $this->getClientID().'_label'; |
@@ -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 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function setAlternateText($value) |
60 | 60 | { |
61 | - if(parent::getAlternateText() === $value) |
|
61 | + if(parent::getAlternateText()===$value) |
|
62 | 62 | return; |
63 | 63 | |
64 | 64 | parent::setAlternateText($value); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function setImageAlign($value) |
77 | 77 | { |
78 | - if(parent::getImageAlign() === $value) |
|
78 | + if(parent::getImageAlign()===$value) |
|
79 | 79 | return; |
80 | 80 | |
81 | 81 | parent::setImageAlign($value); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setImageUrl($value) |
90 | 90 | { |
91 | - if(parent::getImageUrl() === $value) |
|
91 | + if(parent::getImageUrl()===$value) |
|
92 | 92 | return; |
93 | 93 | |
94 | 94 | parent::setImageUrl($value); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function setDescriptionUrl($value) |
103 | 103 | { |
104 | - if(parent::getDescriptionUrl() === $value) |
|
104 | + if(parent::getDescriptionUrl()===$value) |
|
105 | 105 | return; |
106 | 106 | |
107 | 107 | parent::setDescriptionUrl($value); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | protected function addAttributesToRender($writer) |
152 | 152 | { |
153 | 153 | parent::addAttributesToRender($writer); |
154 | - $writer->addAttribute('id',$this->getClientID()); |
|
154 | + $writer->addAttribute('id', $this->getClientID()); |
|
155 | 155 | $this->getActiveControl()->registerCallbackClientScript( |
156 | 156 | $this->getClientClassName(), $this->getPostBackOptions()); |
157 | 157 | } |
@@ -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 | } |