@@ -89,8 +89,9 @@ discard block |
||
89 | 89 | * @return \Ajax\bootstrap\html\HtmlPanel default : "panel-default" |
90 | 90 | */ |
91 | 91 | public function setStyle($cssStyle) { |
92 | - if (!JString::startsWith($cssStyle, "panel")) |
|
93 | - $cssStyle="panel".$cssStyle; |
|
92 | + if (!JString::startsWith($cssStyle, "panel")) { |
|
93 | + $cssStyle="panel".$cssStyle; |
|
94 | + } |
|
94 | 95 | return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel")); |
95 | 96 | } |
96 | 97 | |
@@ -132,7 +133,8 @@ discard block |
||
132 | 133 | * @return $this default : false |
133 | 134 | */ |
134 | 135 | public function show($value) { |
135 | - if ($this->_collapsable) |
|
136 | - $this->_showOnStartup=$value; |
|
136 | + if ($this->_collapsable) { |
|
137 | + $this->_showOnStartup=$value; |
|
138 | + } |
|
137 | 139 | } |
138 | 140 | } |
@@ -25,8 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) { |
27 | 27 | parent::__construct($identifier, $tagName, ""); |
28 | - if (isset($rowCount) && isset($colCount)) |
|
29 | - $this->setRowCount($rowCount, $colCount); |
|
28 | + if (isset($rowCount) && isset($colCount)) { |
|
29 | + $this->setRowCount($rowCount, $colCount); |
|
30 | + } |
|
30 | 31 | } |
31 | 32 | |
32 | 33 | /** |
@@ -102,7 +103,7 @@ discard block |
||
102 | 103 | $row=$this->getItem($row); |
103 | 104 | if (isset($row) && $row instanceof HtmlCollection) { |
104 | 105 | $col=$row->getItem($col); |
105 | - }else{ |
|
106 | + } else{ |
|
106 | 107 | $col=$row; |
107 | 108 | } |
108 | 109 | return $col; |
@@ -160,8 +161,9 @@ discard block |
||
160 | 161 | $values=\array_fill(0, $count, $values); |
161 | 162 | $isArray=false; |
162 | 163 | } |
163 | - if (JArray::dimension($values) == 1 && $isArray) |
|
164 | - $values=[ $values ]; |
|
164 | + if (JArray::dimension($values) == 1 && $isArray) { |
|
165 | + $values=[ $values ]; |
|
166 | + } |
|
165 | 167 | |
166 | 168 | $count=\min(\sizeof($values), $count); |
167 | 169 | |
@@ -205,8 +207,9 @@ discard block |
||
205 | 207 | $count=$this->count(); |
206 | 208 | for($i=0; $i < $count; $i++) { |
207 | 209 | $index=$this->content[$i]->getColPosition($colIndex); |
208 | - if ($index !== NULL) |
|
209 | - $this->getCell($i, $index)->$function(); |
|
210 | + if ($index !== NULL) { |
|
211 | + $this->getCell($i, $index)->$function(); |
|
212 | + } |
|
210 | 213 | } |
211 | 214 | return $this; |
212 | 215 | } |
@@ -237,8 +240,9 @@ discard block |
||
237 | 240 | */ |
238 | 241 | public function getColCount() { |
239 | 242 | $result=0; |
240 | - if ($this->count() > 0) |
|
241 | - $result=$this->getItem(0)->count(); |
|
243 | + if ($this->count() > 0) { |
|
244 | + $result=$this->getItem(0)->count(); |
|
245 | + } |
|
242 | 246 | return $result; |
243 | 247 | } |
244 | 248 | |
@@ -262,8 +266,9 @@ discard block |
||
262 | 266 | |
263 | 267 | public function toDelete($rowIndex, $colIndex){ |
264 | 268 | $row=$this->getItem($rowIndex); |
265 | - if (isset($row) === true) |
|
266 | - $row->toDelete($colIndex); |
|
269 | + if (isset($row) === true) { |
|
270 | + $row->toDelete($colIndex); |
|
271 | + } |
|
267 | 272 | return $this; |
268 | 273 | } |
269 | 274 | |
@@ -361,8 +366,9 @@ discard block |
||
361 | 366 | foreach ( $rows as $row ) { |
362 | 367 | $cell=$row->getItem($colIndex); |
363 | 368 | $value=$cell->getContent(); |
364 | - if($functionExists) |
|
365 | - $value=\call_user_func($function,$value); |
|
369 | + if($functionExists) { |
|
370 | + $value=\call_user_func($function,$value); |
|
371 | + } |
|
366 | 372 | if($value!==$identiqual){ |
367 | 373 | if($counter>0 && isset($cellToMerge)){ |
368 | 374 | $cellToMerge->setRowspan($counter); |
@@ -250,8 +250,9 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function addItemInToolbar($caption,$icon=NULL,$callback=NULL){ |
252 | 252 | $result=$this->addInToolbar($caption,$callback); |
253 | - if(isset($icon) && method_exists($result, "addIcon")) |
|
254 | - $result->addIcon($icon); |
|
253 | + if(isset($icon) && method_exists($result, "addIcon")) { |
|
254 | + $result->addIcon($icon); |
|
255 | + } |
|
255 | 256 | return $result; |
256 | 257 | } |
257 | 258 | |
@@ -265,7 +266,7 @@ discard block |
||
265 | 266 | foreach ($items as $icon=>$item){ |
266 | 267 | $this->addItemInToolbar($item,$icon,$callback); |
267 | 268 | } |
268 | - }else{ |
|
269 | + } else{ |
|
269 | 270 | foreach ($items as $item){ |
270 | 271 | $this->addItemInToolbar($item,null,$callback); |
271 | 272 | } |
@@ -416,8 +417,9 @@ discard block |
||
416 | 417 | protected function _compileForm(){ |
417 | 418 | if(isset($this->_form)){ |
418 | 419 | $noValidate=""; |
419 | - if(\sizeof($this->_form->getValidationParams())>0) |
|
420 | - $noValidate="novalidate"; |
|
420 | + if(\sizeof($this->_form->getValidationParams())>0) { |
|
421 | + $noValidate="novalidate"; |
|
422 | + } |
|
421 | 423 | $this->wrapContent("<form class='ui form' id='frm-".$this->identifier."' name='frm-".$this->identifier."' ".$noValidate.">","</form>"); |
422 | 424 | } |
423 | 425 | } |