@@ -32,8 +32,9 @@ discard block |
||
32 | 32 | // } |
33 | 33 | $this->setWide($numCols); |
34 | 34 | } |
35 | - if($createCols) |
|
36 | - $this->setRowsCount($numRows, $numCols); |
|
35 | + if($createCols) { |
|
36 | + $this->setRowsCount($numRows, $numCols); |
|
37 | + } |
|
37 | 38 | } |
38 | 39 | |
39 | 40 | public function asSegment() { |
@@ -85,8 +86,9 @@ discard block |
||
85 | 86 | public function addCol($width=NULL) { |
86 | 87 | $colCount=$this->colCount() + 1; |
87 | 88 | $this->setColsCount($colCount, true, $width); |
88 | - if ($this->hasOnlyCols($this->count())) |
|
89 | - return $this->content[$colCount - 1]; |
|
89 | + if ($this->hasOnlyCols($this->count())) { |
|
90 | + return $this->content[$colCount - 1]; |
|
91 | + } |
|
90 | 92 | return $this; |
91 | 93 | } |
92 | 94 | |
@@ -174,8 +176,9 @@ discard block |
||
174 | 176 | */ |
175 | 177 | public function rowCount() { |
176 | 178 | $count=$this->count(); |
177 | - if ($this->hasOnlyCols($count)) |
|
178 | - return 0; |
|
179 | + if ($this->hasOnlyCols($count)) { |
|
180 | + return 0; |
|
181 | + } |
|
179 | 182 | return $count; |
180 | 183 | } |
181 | 184 | |
@@ -185,10 +188,12 @@ discard block |
||
185 | 188 | */ |
186 | 189 | public function colCount() { |
187 | 190 | $count=$this->count(); |
188 | - if ($this->hasOnlyCols($count)) |
|
189 | - return $count; |
|
190 | - if ($count > 0) |
|
191 | - return $this->getItem(0)->count(); |
|
191 | + if ($this->hasOnlyCols($count)) { |
|
192 | + return $count; |
|
193 | + } |
|
194 | + if ($count > 0) { |
|
195 | + return $this->getItem(0)->count(); |
|
196 | + } |
|
192 | 197 | return 0; |
193 | 198 | } |
194 | 199 | |
@@ -199,8 +204,9 @@ discard block |
||
199 | 204 | * @return \Ajax\semantic\html\collections\HtmlGridCol |
200 | 205 | */ |
201 | 206 | public function getCell($row, $col) { |
202 | - if ($row < 2 && $this->hasOnlyCols($this->count())) |
|
203 | - return $this->getItem($col); |
|
207 | + if ($row < 2 && $this->hasOnlyCols($this->count())) { |
|
208 | + return $this->getItem($col); |
|
209 | + } |
|
204 | 210 | $row=$this->getItem($row); |
205 | 211 | if (isset($row)) { |
206 | 212 | $col=$row->getItem($col); |
@@ -249,8 +255,9 @@ discard block |
||
249 | 255 | * @return \Ajax\semantic\html\collections\HtmlGrid |
250 | 256 | */ |
251 | 257 | public function setPadded($value=NULL) { |
252 | - if (isset($value)) |
|
253 | - $this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" )); |
|
258 | + if (isset($value)) { |
|
259 | + $this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" )); |
|
260 | + } |
|
254 | 261 | return $this->addToProperty("class", "padded"); |
255 | 262 | } |
256 | 263 | |
@@ -275,8 +282,9 @@ discard block |
||
275 | 282 | * @see \Ajax\common\html\HtmlCollection::createItem() |
276 | 283 | */ |
277 | 284 | protected function createItem($value) { |
278 | - if ($this->_createCols === false) |
|
279 | - $value=null; |
|
285 | + if ($this->_createCols === false) { |
|
286 | + $value=null; |
|
287 | + } |
|
280 | 288 | $item=new HtmlGridRow($this->identifier . "-row-" . ($this->count() + 1), $value, $this->_colSizing, $this->_implicitRows); |
281 | 289 | return $item; |
282 | 290 | } |
@@ -55,14 +55,14 @@ |
||
55 | 55 | foreach ($values as $v){ |
56 | 56 | $form->addField($v); |
57 | 57 | } |
58 | - }else{ |
|
58 | + } else{ |
|
59 | 59 | $separators[]=$count; |
60 | 60 | for($i=0;$i<$size;$i++){ |
61 | 61 | $fields=\array_slice($values, $separators[$i]+1,$separators[$i+1]-$separators[$i]); |
62 | 62 | //TODO check why $fields is empty |
63 | 63 | if(\sizeof($fields)===1){ |
64 | 64 | $form->addField($fields[0]); |
65 | - }elseif(\sizeof($fields)>1){ |
|
65 | + } elseif(\sizeof($fields)>1){ |
|
66 | 66 | $form->addFields($fields); |
67 | 67 | $i+=\sizeof($fields)-1; |
68 | 68 | } |
@@ -29,15 +29,17 @@ discard block |
||
29 | 29 | |
30 | 30 | public function addContent($content,$before=false) { |
31 | 31 | if (!\is_array($this->content)) { |
32 | - if(isset($this->content)) |
|
33 | - $this->content=array ($this->content); |
|
34 | - else |
|
35 | - $this->content=array(); |
|
32 | + if(isset($this->content)) { |
|
33 | + $this->content=array ($this->content); |
|
34 | + } else { |
|
35 | + $this->content=array(); |
|
36 | + } |
|
37 | + } |
|
38 | + if($before) { |
|
39 | + array_unshift($this->content,$content); |
|
40 | + } else { |
|
41 | + $this->content []=$content; |
|
36 | 42 | } |
37 | - if($before) |
|
38 | - array_unshift($this->content,$content); |
|
39 | - else |
|
40 | - $this->content []=$content; |
|
41 | 43 | return $this; |
42 | 44 | } |
43 | 45 | |
@@ -75,9 +77,9 @@ discard block |
||
75 | 77 | $instances=[]; |
76 | 78 | if($content instanceof $class){ |
77 | 79 | $instances[]=$content; |
78 | - }elseif($content instanceof HtmlDoubleElement){ |
|
80 | + } elseif($content instanceof HtmlDoubleElement){ |
|
79 | 81 | $instances=\array_merge($instances,$content->getContentInstances($class)); |
80 | - }elseif (\is_array($content)){ |
|
82 | + } elseif (\is_array($content)){ |
|
81 | 83 | foreach ($content as $element){ |
82 | 84 | $instances=\array_merge($instances,$this->_getContentInstances($class, $element)); |
83 | 85 | } |
@@ -17,8 +17,9 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | public function setValue($value) { |
20 | - if(isset($value)) |
|
21 | - $this->setProperty("value", $value); |
|
20 | + if(isset($value)) { |
|
21 | + $this->setProperty("value", $value); |
|
22 | + } |
|
22 | 23 | return $this; |
23 | 24 | } |
24 | 25 | |
@@ -27,16 +28,18 @@ discard block |
||
27 | 28 | } |
28 | 29 | |
29 | 30 | public function setPlaceholder($value){ |
30 | - if(JString::isNotNull($value)) |
|
31 | - $this->_placeholder=$value; |
|
31 | + if(JString::isNotNull($value)) { |
|
32 | + $this->_placeholder=$value; |
|
33 | + } |
|
32 | 34 | return $this; |
33 | 35 | } |
34 | 36 | |
35 | 37 | public function compile(JsUtils $js=NULL,&$view=NULL){ |
36 | 38 | $value=$this->_placeholder; |
37 | 39 | if(JString::isNull($value)){ |
38 | - if(JString::isNotNull($this->getProperty("name"))) |
|
39 | - $value=\ucfirst($this->getProperty("name")); |
|
40 | + if(JString::isNotNull($this->getProperty("name"))) { |
|
41 | + $value=\ucfirst($this->getProperty("name")); |
|
42 | + } |
|
40 | 43 | } |
41 | 44 | $this->setProperty("placeholder", $value); |
42 | 45 | return parent::compile($js,$view); |
@@ -186,8 +186,9 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function addItemInToolbar($caption,$icon=NULL,$callback=NULL){ |
188 | 188 | $result=$this->addInToolbar($caption,$callback); |
189 | - if(isset($icon)) |
|
190 | - $result->addIcon($icon); |
|
189 | + if(isset($icon)) { |
|
190 | + $result->addIcon($icon); |
|
191 | + } |
|
191 | 192 | return $result; |
192 | 193 | } |
193 | 194 | |
@@ -201,7 +202,7 @@ discard block |
||
201 | 202 | foreach ($items as $icon=>$item){ |
202 | 203 | $this->addItemInToolbar($item,$icon,$callback); |
203 | 204 | } |
204 | - }else{ |
|
205 | + } else{ |
|
205 | 206 | foreach ($items as $item){ |
206 | 207 | $this->addItemInToolbar($item,null,$callback); |
207 | 208 | } |
@@ -352,8 +353,9 @@ discard block |
||
352 | 353 | protected function _compileForm(){ |
353 | 354 | if(isset($this->_form)){ |
354 | 355 | $noValidate=""; |
355 | - if(\sizeof($this->_form->getValidationParams())>0) |
|
356 | - $noValidate="novalidate"; |
|
356 | + if(\sizeof($this->_form->getValidationParams())>0) { |
|
357 | + $noValidate="novalidate"; |
|
358 | + } |
|
357 | 359 | $this->wrapContent("<form class='ui form' id='frm-".$this->identifier."' name='frm-".$this->identifier."' ".$noValidate.">","</form>"); |
358 | 360 | } |
359 | 361 | } |
@@ -52,8 +52,9 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function addHeader($title, $niveau=1, $dividing=true) { |
54 | 54 | $header=new HtmlHeader("", $niveau, $title); |
55 | - if ($dividing) |
|
56 | - $header->setDividing(); |
|
55 | + if ($dividing) { |
|
56 | + $header->setDividing(); |
|
57 | + } |
|
57 | 58 | return $this->addItem($header); |
58 | 59 | } |
59 | 60 | |
@@ -74,14 +75,16 @@ discard block |
||
74 | 75 | if (\is_string($end)) { |
75 | 76 | $label=$end; |
76 | 77 | \array_pop($fields); |
77 | - } else |
|
78 | - $label=NULL; |
|
78 | + } else { |
|
79 | + $label=NULL; |
|
80 | + } |
|
79 | 81 | } |
80 | 82 | $this->_fields=\array_merge($this->_fields, $fields); |
81 | 83 | $fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count(), $fields); |
82 | 84 | } |
83 | - if (isset($label)) |
|
84 | - $fields=new HtmlFormField("", $fields, $label); |
|
85 | + if (isset($label)) { |
|
86 | + $fields=new HtmlFormField("", $fields, $label); |
|
87 | + } |
|
85 | 88 | } else { |
86 | 89 | $fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count()); |
87 | 90 | } |
@@ -134,27 +137,31 @@ discard block |
||
134 | 137 | */ |
135 | 138 | public function addMessage($identifier, $content, $header=NULL, $icon=NULL, $type=NULL) { |
136 | 139 | $message=new HtmlMessage($identifier, $content); |
137 | - if (isset($header)) |
|
138 | - $message->addHeader($header); |
|
139 | - if (isset($icon)) |
|
140 | - $message->setIcon($icon); |
|
141 | - if (isset($type)) |
|
142 | - $message->setStyle($type); |
|
140 | + if (isset($header)) { |
|
141 | + $message->addHeader($header); |
|
142 | + } |
|
143 | + if (isset($icon)) { |
|
144 | + $message->setIcon($icon); |
|
145 | + } |
|
146 | + if (isset($type)) { |
|
147 | + $message->setStyle($type); |
|
148 | + } |
|
143 | 149 | return $this->addItem($message); |
144 | 150 | } |
145 | 151 | |
146 | 152 | |
147 | 153 | |
148 | 154 | public function compile(JsUtils $js=NULL,&$view=NULL){ |
149 | - if(\sizeof($this->_validationParams)>0) |
|
150 | - $this->setProperty("novalidate", ""); |
|
155 | + if(\sizeof($this->_validationParams)>0) { |
|
156 | + $this->setProperty("novalidate", ""); |
|
157 | + } |
|
151 | 158 | return parent::compile($js,$view); |
152 | 159 | } |
153 | 160 | |
154 | 161 | public function run(JsUtils $js) { |
155 | 162 | if(isset($js)){ |
156 | 163 | $compo=$js->semantic()->form("#".$this->identifier); |
157 | - }else{ |
|
164 | + } else{ |
|
158 | 165 | $compo=new Form(); |
159 | 166 | $compo->attach("#".$this->identifier); |
160 | 167 | } |
@@ -167,8 +174,9 @@ discard block |
||
167 | 174 | if($field instanceof HtmlFormFields){ |
168 | 175 | $items=$field->getItems(); |
169 | 176 | foreach ($items as $_field){ |
170 | - if($_field instanceof HtmlFormField) |
|
171 | - $compo=$this->addCompoValidation($compo, $_field); |
|
177 | + if($_field instanceof HtmlFormField) { |
|
178 | + $compo=$this->addCompoValidation($compo, $_field); |
|
179 | + } |
|
172 | 180 | } |
173 | 181 | } |
174 | 182 | } |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | $rules=$attributes["rules"]; |
58 | 58 | if(\is_array($rules)){ |
59 | 59 | $element->addRules($rules); |
60 | - } |
|
61 | - else{ |
|
60 | + } else{ |
|
62 | 61 | $element->addRule($rules); |
63 | 62 | } |
64 | 63 | unset($attributes["rules"]); |
@@ -118,8 +117,9 @@ discard block |
||
118 | 117 | public function fieldAsHeader($index,$niveau=1,$icon=NULL,$attributes=NULL){ |
119 | 118 | return $this->_fieldAs(function($id,$name,$value) use($niveau,$icon){ |
120 | 119 | $header=new HtmlHeader($id,$niveau,$value); |
121 | - if(isset($icon)) |
|
122 | - $header->asIcon($icon, $value); |
|
120 | + if(isset($icon)) { |
|
121 | + $header->asIcon($icon, $value); |
|
122 | + } |
|
123 | 123 | return $header; |
124 | 124 | }, $index,$attributes,"header"); |
125 | 125 | } |
@@ -127,7 +127,9 @@ discard block |
||
127 | 127 | |
128 | 128 | public function fieldAsImage($index,$size=Size::MINI,$circular=false){ |
129 | 129 | $this->setValueFunction($index,function($img) use($size,$circular){ |
130 | - $image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular)$image->setCircular(); |
|
130 | + $image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular) { |
|
131 | + $image->setCircular(); |
|
132 | + } |
|
131 | 133 | return $image; |
132 | 134 | }); |
133 | 135 | return $this; |
@@ -209,12 +211,13 @@ discard block |
||
209 | 211 | $i=0; |
210 | 212 | if(JArray::isAssociative($types)){ |
211 | 213 | foreach ($types as $type=>$attributes){ |
212 | - if(\is_int($type)) |
|
213 | - $this->fieldAs($i++,$attributes,[]); |
|
214 | - else |
|
215 | - $this->fieldAs($i++,$type,$attributes); |
|
214 | + if(\is_int($type)) { |
|
215 | + $this->fieldAs($i++,$attributes,[]); |
|
216 | + } else { |
|
217 | + $this->fieldAs($i++,$type,$attributes); |
|
218 | + } |
|
216 | 219 | } |
217 | - }else{ |
|
220 | + } else{ |
|
218 | 221 | foreach ($types as $type){ |
219 | 222 | $this->fieldAs($i++,$type); |
220 | 223 | } |
@@ -226,7 +229,7 @@ discard block |
||
226 | 229 | if(\method_exists($this, $method)){ |
227 | 230 | if(!\is_array($attributes)){ |
228 | 231 | $attributes=[$index]; |
229 | - }else{ |
|
232 | + } else{ |
|
230 | 233 | \array_unshift($attributes, $index); |
231 | 234 | } |
232 | 235 | \call_user_func_array([$this,$method], $attributes); |
@@ -21,8 +21,9 @@ discard block |
||
21 | 21 | $this->widgetIdentifier=$identifier; |
22 | 22 | $this->values=[]; |
23 | 23 | $this->afterCompile=[]; |
24 | - if(isset($instance)) |
|
25 | - $this->setInstance($instance); |
|
24 | + if(isset($instance)) { |
|
25 | + $this->setInstance($instance); |
|
26 | + } |
|
26 | 27 | $this->setCaptions($captions); |
27 | 28 | $this->captionCallback=NULL; |
28 | 29 | $this->defaultValueFunction=function($name,$value){return $value;}; |
@@ -39,11 +40,13 @@ discard block |
||
39 | 40 | } |
40 | 41 | |
41 | 42 | public function getIdentifier($index=NULL){ |
42 | - if(!isset($index)) |
|
43 | - $index=self::$index; |
|
43 | + if(!isset($index)) { |
|
44 | + $index=self::$index; |
|
45 | + } |
|
44 | 46 | $value=$index; |
45 | - if(isset($this->values["identifier"])) |
|
46 | - $value=$this->values["identifier"]($index,$this->instance); |
|
47 | + if(isset($this->values["identifier"])) { |
|
48 | + $value=$this->values["identifier"]($index,$this->instance); |
|
49 | + } |
|
47 | 50 | return $value; |
48 | 51 | } |
49 | 52 | |
@@ -67,19 +70,19 @@ discard block |
||
67 | 70 | $value=$property->getValue($this->instance); |
68 | 71 | if(isset($this->values[$index])){ |
69 | 72 | $value= $this->values[$index]($value,$this->instance,$index); |
70 | - }else{ |
|
73 | + } else{ |
|
71 | 74 | $value=$this->_getDefaultValue($property->getName(),$value, $index); |
72 | 75 | } |
73 | - }else{ |
|
74 | - if(\is_callable($property)) |
|
75 | - $value=$property($this->instance); |
|
76 | - elseif(\is_array($property)){ |
|
76 | + } else{ |
|
77 | + if(\is_callable($property)) { |
|
78 | + $value=$property($this->instance); |
|
79 | + } elseif(\is_array($property)){ |
|
77 | 80 | $values=\array_map(function($v) use ($index){return $this->_getValue($v, $index);}, $property); |
78 | 81 | $value=\implode("", $values); |
79 | - }else{ |
|
82 | + } else{ |
|
80 | 83 | if(isset($this->values[$index])){ |
81 | 84 | $value= $this->values[$index]($property,$this->instance,$index); |
82 | - }else{ |
|
85 | + } else{ |
|
83 | 86 | $value=$property; |
84 | 87 | } |
85 | 88 | } |
@@ -102,10 +105,10 @@ discard block |
||
102 | 105 | if(isset($vb[$index])){ |
103 | 106 | if(\is_array($vb[$index])){ |
104 | 107 | $this->visibleProperties[$index][]=$field; |
105 | - }else{ |
|
108 | + } else{ |
|
106 | 109 | $this->visibleProperties[$index]=[$vb[$index],$field]; |
107 | 110 | } |
108 | - }else{ |
|
111 | + } else{ |
|
109 | 112 | return $this->insertField($index, $field); |
110 | 113 | } |
111 | 114 | return $this; |
@@ -132,9 +135,9 @@ discard block |
||
132 | 135 | $property=$this->getProperty($index); |
133 | 136 | if($property instanceof \ReflectionProperty){ |
134 | 137 | $result=$property->getName(); |
135 | - }elseif(\is_callable($property)){ |
|
138 | + } elseif(\is_callable($property)){ |
|
136 | 139 | $result=$this->visibleProperties[$index]; |
137 | - }else{ |
|
140 | + } else{ |
|
138 | 141 | $result=$property; |
139 | 142 | } |
140 | 143 | return $result; |
@@ -154,7 +157,7 @@ discard block |
||
154 | 157 | $this->reflect=new \ReflectionClass($instance); |
155 | 158 | if(\sizeof($this->visibleProperties)===0){ |
156 | 159 | $this->properties=$this->getDefaultProperties(); |
157 | - }else{ |
|
160 | + } else{ |
|
158 | 161 | foreach ($this->visibleProperties as $property){ |
159 | 162 | $this->setInstanceProperty($property); |
160 | 163 | } |
@@ -165,22 +168,23 @@ discard block |
||
165 | 168 | private function setInstanceProperty($property){ |
166 | 169 | if(\is_callable($property)){ |
167 | 170 | $this->properties[]=$property; |
168 | - }elseif(\is_string($property)){ |
|
171 | + } elseif(\is_string($property)){ |
|
169 | 172 | try{ |
170 | 173 | $this->_beforeAddProperty(\sizeof($this->properties), $property); |
171 | 174 | $rProperty=$this->reflect->getProperty($property); |
172 | 175 | $this->properties[]=$rProperty; |
173 | - }catch(\Exception $e){ |
|
176 | + } catch(\Exception $e){ |
|
174 | 177 | $this->_beforeAddProperty(\sizeof($this->properties), $property); |
175 | 178 | $this->properties[]=$property; |
176 | 179 | } |
177 | - }elseif(\is_int($property)){ |
|
180 | + } elseif(\is_int($property)){ |
|
178 | 181 | $props=$this->getDefaultProperties(); |
179 | - if(isset($props[$property])) |
|
180 | - $this->properties[]=$props[$property]; |
|
181 | - else |
|
182 | - $this->properties[]=$property; |
|
183 | - }else{ |
|
182 | + if(isset($props[$property])) { |
|
183 | + $this->properties[]=$props[$property]; |
|
184 | + } else { |
|
185 | + $this->properties[]=$property; |
|
186 | + } |
|
187 | + } else{ |
|
184 | 188 | $this->properties[]=$property; |
185 | 189 | } |
186 | 190 | } |
@@ -224,12 +228,13 @@ discard block |
||
224 | 228 | if(isset($this->captions[$index])){ |
225 | 229 | return $this->captions[$index]; |
226 | 230 | } |
227 | - if($this->properties[$index] instanceof \ReflectionProperty) |
|
228 | - return $this->properties[$index]->getName(); |
|
229 | - elseif(\is_callable($this->properties[$index])) |
|
230 | - return ""; |
|
231 | - else |
|
232 | - return $this->properties[$index]; |
|
231 | + if($this->properties[$index] instanceof \ReflectionProperty) { |
|
232 | + return $this->properties[$index]->getName(); |
|
233 | + } elseif(\is_callable($this->properties[$index])) { |
|
234 | + return ""; |
|
235 | + } else { |
|
236 | + return $this->properties[$index]; |
|
237 | + } |
|
233 | 238 | } |
234 | 239 | |
235 | 240 | public function getCaptions(){ |
@@ -238,7 +243,7 @@ discard block |
||
238 | 243 | for($i=\sizeof($captions);$i<$this->count();$i++){ |
239 | 244 | $captions[]=""; |
240 | 245 | } |
241 | - }else{ |
|
246 | + } else{ |
|
242 | 247 | $captions=[]; |
243 | 248 | $index=0; |
244 | 249 | $count=$this->count(); |
@@ -254,8 +259,9 @@ discard block |
||
254 | 259 | } |
255 | 260 | |
256 | 261 | public function setCaption($index,$caption){ |
257 | - if(isset($this->captions)===false) |
|
258 | - $this->captions=[]; |
|
262 | + if(isset($this->captions)===false) { |
|
263 | + $this->captions=[]; |
|
264 | + } |
|
259 | 265 | $this->captions[$index]=$caption; |
260 | 266 | return $this; |
261 | 267 | } |
@@ -72,8 +72,9 @@ discard block |
||
72 | 72 | |
73 | 73 | $table->setRowCount(0, \sizeof($captions)); |
74 | 74 | $table->setHeaderValues($captions); |
75 | - if(isset($this->_compileParts)) |
|
76 | - $table->setCompileParts($this->_compileParts); |
|
75 | + if(isset($this->_compileParts)) { |
|
76 | + $table->setCompileParts($this->_compileParts); |
|
77 | + } |
|
77 | 78 | if(isset($this->_searchField) && isset($js)){ |
78 | 79 | $this->_searchField->postOn("change", $this->_urls,"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
79 | 80 | } |
@@ -178,7 +179,7 @@ discard block |
||
178 | 179 | $hasPart=$table->hasPart($part); |
179 | 180 | if($hasPart){ |
180 | 181 | $row=$table->getPart($part)->addRow(\sizeof($captions)); |
181 | - }else{ |
|
182 | + } else{ |
|
182 | 183 | $row=$table->getPart($part)->getRow(0); |
183 | 184 | } |
184 | 185 | $row->mergeCol(); |
@@ -257,8 +258,9 @@ discard block |
||
257 | 258 | */ |
258 | 259 | private function getFieldButton($caption,$visibleHover=true){ |
259 | 260 | $bt= new HtmlButton("",$caption); |
260 | - if($visibleHover) |
|
261 | - $this->_visibleOver($bt); |
|
261 | + if($visibleHover) { |
|
262 | + $this->_visibleOver($bt); |
|
263 | + } |
|
262 | 264 | return $bt; |
263 | 265 | } |
264 | 266 | |
@@ -311,8 +313,9 @@ discard block |
||
311 | 313 | private function getDefaultButton($icon,$class=null,$visibleHover=true){ |
312 | 314 | $bt=$this->getFieldButton("",$visibleHover); |
313 | 315 | $bt->asIcon($icon); |
314 | - if(isset($class)) |
|
315 | - $bt->addToProperty("class", $class); |
|
316 | + if(isset($class)) { |
|
317 | + $bt->addToProperty("class", $class); |
|
318 | + } |
|
316 | 319 | return $bt; |
317 | 320 | } |
318 | 321 |