@@ -50,10 +50,12 @@ discard block |
||
50 | 50 | $js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]); |
51 | 51 | $js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]); |
52 | 52 | } |
53 | - if(\is_array($this->_deleteBehavior)) |
|
54 | - $this->_generateBehavior("delete",$this->_deleteBehavior, $js); |
|
55 | - if(\is_array($this->_editBehavior)) |
|
56 | - $this->_generateBehavior("edit",$this->_editBehavior,$js); |
|
53 | + if(\is_array($this->_deleteBehavior)) { |
|
54 | + $this->_generateBehavior("delete",$this->_deleteBehavior, $js); |
|
55 | + } |
|
56 | + if(\is_array($this->_editBehavior)) { |
|
57 | + $this->_generateBehavior("edit",$this->_editBehavior,$js); |
|
58 | + } |
|
57 | 59 | return parent::run($js); |
58 | 60 | } |
59 | 61 | |
@@ -107,12 +109,14 @@ discard block |
||
107 | 109 | |
108 | 110 | $table->setRowCount(0, \sizeof($captions)); |
109 | 111 | $table->setHeaderValues($captions); |
110 | - if(isset($this->_compileParts)) |
|
111 | - $table->setCompileParts($this->_compileParts); |
|
112 | + if(isset($this->_compileParts)) { |
|
113 | + $table->setCompileParts($this->_compileParts); |
|
114 | + } |
|
112 | 115 | |
113 | 116 | if(isset($this->_searchField) && isset($js)){ |
114 | - if(isset($this->_urls["refresh"])) |
|
115 | - $this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
117 | + if(isset($this->_urls["refresh"])) { |
|
118 | + $this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
119 | + } |
|
116 | 120 | } |
117 | 121 | |
118 | 122 | $this->_generateContent($table); |
@@ -137,8 +141,9 @@ discard block |
||
137 | 141 | private function _generateMainCheckbox(&$captions){ |
138 | 142 | $ck=new HtmlCheckbox("main-ck-".$this->identifier,""); |
139 | 143 | $checkedMessageCall=""; |
140 | - if($this->_hasCheckedMessage) |
|
141 | - $checkedMessageCall="updateChecked();"; |
|
144 | + if($this->_hasCheckedMessage) { |
|
145 | + $checkedMessageCall="updateChecked();"; |
|
146 | + } |
|
142 | 147 | |
143 | 148 | $ck->setOnChecked($this->_setAllChecked("true").$checkedMessageCall); |
144 | 149 | $ck->setOnUnchecked($this->_setAllChecked("false").$checkedMessageCall); |
@@ -184,8 +189,9 @@ discard block |
||
184 | 189 | $menu->floatRight(); |
185 | 190 | $menu->setActiveItem($this->_pagination->getPage()-1); |
186 | 191 | $footer->setValues($menu); |
187 | - if(isset($this->_urls["refresh"])) |
|
188 | - $menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
192 | + if(isset($this->_urls["refresh"])) { |
|
193 | + $menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
194 | + } |
|
189 | 195 | } |
190 | 196 | |
191 | 197 | protected function _getFieldName($index){ |
@@ -228,7 +234,7 @@ discard block |
||
228 | 234 | $hasPart=$table->hasPart($part); |
229 | 235 | if($hasPart){ |
230 | 236 | $row=$table->getPart($part)->addRow(\sizeof($captions)); |
231 | - }else{ |
|
237 | + } else{ |
|
232 | 238 | $row=$table->getPart($part)->getRow(0); |
233 | 239 | } |
234 | 240 | $row->mergeCol(); |
@@ -253,7 +259,7 @@ discard block |
||
253 | 259 | $this->_urls["refresh"]=JArray::getValue($urls, "refresh",0); |
254 | 260 | $this->_urls["edit"]=JArray::getValue($urls, "edit",1); |
255 | 261 | $this->_urls["delete"]=JArray::getValue($urls, "delete",2); |
256 | - }else{ |
|
262 | + } else{ |
|
257 | 263 | $this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls]; |
258 | 264 | } |
259 | 265 | return $this; |
@@ -309,8 +315,9 @@ discard block |
||
309 | 315 | |
310 | 316 | protected function getTargetSelector() { |
311 | 317 | $result=$this->_targetSelector; |
312 | - if(!isset($result)) |
|
313 | - $result="#".$this->identifier; |
|
318 | + if(!isset($result)) { |
|
319 | + $result="#".$this->identifier; |
|
320 | + } |
|
314 | 321 | return $result; |
315 | 322 | } |
316 | 323 | |
@@ -348,8 +355,9 @@ discard block |
||
348 | 355 | * @param callable $callback |
349 | 356 | */ |
350 | 357 | public function addCountCheckedInToolbar(array $checkedMessage=null,$callback=null){ |
351 | - if(isset($checkedMessage)) |
|
352 | - $this->_checkedMessage=$checkedMessage; |
|
358 | + if(isset($checkedMessage)) { |
|
359 | + $this->_checkedMessage=$checkedMessage; |
|
360 | + } |
|
353 | 361 | $checkedMessage=$this->getCheckedMessage(); |
354 | 362 | $this->_hasCheckboxes=true; |
355 | 363 | $this->_hasCheckedMessage=true; |
@@ -48,8 +48,9 @@ discard block |
||
48 | 48 | |
49 | 49 | public function setAttached($value=true){ |
50 | 50 | $form=$this->getForm(); |
51 | - if($value) |
|
52 | - $form->addToPropertyCtrl("class", "attached", array ("attached" )); |
|
51 | + if($value) { |
|
52 | + $form->addToPropertyCtrl("class", "attached", array ("attached" )); |
|
53 | + } |
|
53 | 54 | return $form; |
54 | 55 | } |
55 | 56 | |
@@ -91,8 +92,9 @@ discard block |
||
91 | 92 | if(isset($url) && isset($responseElement)){ |
92 | 93 | $button->addEvent($event, "$('#".$form->getIdentifier()."').form('validate form');",true,true); |
93 | 94 | $params=["form"=>$form->getIdentifier(),"responseElement"=>$responseElement,"url"=>$url,"stopPropagation"=>true]; |
94 | - if(\is_array($parameters)) |
|
95 | - $params=\array_merge($params,$parameters); |
|
95 | + if(\is_array($parameters)) { |
|
96 | + $params=\array_merge($params,$parameters); |
|
97 | + } |
|
96 | 98 | $form->addValidationParam("_ajaxSubmit", new AjaxCall("postForm", $params)); |
97 | 99 | } |
98 | 100 | return $button; |