@@ -47,10 +47,12 @@ discard block |
||
47 | 47 | $js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]); |
48 | 48 | $js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]); |
49 | 49 | } |
50 | - if(\is_array($this->_deleteBehavior)) |
|
51 | - $this->_generateBehavior("delete",$this->_deleteBehavior, $js); |
|
52 | - if(\is_array($this->_editBehavior)) |
|
53 | - $this->_generateBehavior("edit",$this->_editBehavior,$js); |
|
50 | + if(\is_array($this->_deleteBehavior)) { |
|
51 | + $this->_generateBehavior("delete",$this->_deleteBehavior, $js); |
|
52 | + } |
|
53 | + if(\is_array($this->_editBehavior)) { |
|
54 | + $this->_generateBehavior("edit",$this->_editBehavior,$js); |
|
55 | + } |
|
54 | 56 | return parent::run($js); |
55 | 57 | } |
56 | 58 | |
@@ -85,12 +87,14 @@ discard block |
||
85 | 87 | |
86 | 88 | $table->setRowCount(0, \sizeof($captions)); |
87 | 89 | $table->setHeaderValues($captions); |
88 | - if(isset($this->_compileParts)) |
|
89 | - $table->setCompileParts($this->_compileParts); |
|
90 | + if(isset($this->_compileParts)) { |
|
91 | + $table->setCompileParts($this->_compileParts); |
|
92 | + } |
|
90 | 93 | |
91 | 94 | if(isset($this->_searchField) && isset($js)){ |
92 | - if(isset($this->_urls["refresh"])) |
|
93 | - $this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
95 | + if(isset($this->_urls["refresh"])) { |
|
96 | + $this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
97 | + } |
|
94 | 98 | } |
95 | 99 | |
96 | 100 | $this->_generateContent($table); |
@@ -145,8 +149,9 @@ discard block |
||
145 | 149 | $menu->floatRight(); |
146 | 150 | $menu->setActiveItem($this->_pagination->getPage()-1); |
147 | 151 | $footer->setValues($menu); |
148 | - if(isset($this->_urls["refresh"])) |
|
149 | - $menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}",$this->getRefreshSelector(),["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
152 | + if(isset($this->_urls["refresh"])) { |
|
153 | + $menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}",$this->getRefreshSelector(),["preventDefault"=>false,"jqueryDone"=>"replaceWith"]); |
|
154 | + } |
|
150 | 155 | } |
151 | 156 | |
152 | 157 | protected function _getFieldName($index){ |
@@ -189,7 +194,7 @@ discard block |
||
189 | 194 | $hasPart=$table->hasPart($part); |
190 | 195 | if($hasPart){ |
191 | 196 | $row=$table->getPart($part)->addRow(\sizeof($captions)); |
192 | - }else{ |
|
197 | + } else{ |
|
193 | 198 | $row=$table->getPart($part)->getRow(0); |
194 | 199 | } |
195 | 200 | $row->mergeCol(); |
@@ -214,7 +219,7 @@ discard block |
||
214 | 219 | $this->_urls["refresh"]=JArray::getValue($urls, "refresh",0); |
215 | 220 | $this->_urls["edit"]=JArray::getValue($urls, "edit",1); |
216 | 221 | $this->_urls["delete"]=JArray::getValue($urls, "delete",2); |
217 | - }else{ |
|
222 | + } else{ |
|
218 | 223 | $this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls]; |
219 | 224 | } |
220 | 225 | return $this; |
@@ -288,8 +293,9 @@ discard block |
||
288 | 293 | |
289 | 294 | protected function getTargetSelector() { |
290 | 295 | $result=$this->_targetSelector; |
291 | - if(!isset($result)) |
|
292 | - $result="#".$this->identifier; |
|
296 | + if(!isset($result)) { |
|
297 | + $result="#".$this->identifier; |
|
298 | + } |
|
293 | 299 | return $result; |
294 | 300 | } |
295 | 301 | |
@@ -304,8 +310,9 @@ discard block |
||
304 | 310 | } |
305 | 311 | |
306 | 312 | public function getRefreshSelector() { |
307 | - if(isset($this->_refreshSelector)) |
|
308 | - return $this->_refreshSelector; |
|
313 | + if(isset($this->_refreshSelector)) { |
|
314 | + return $this->_refreshSelector; |
|
315 | + } |
|
309 | 316 | return "#".$this->identifier." tbody"; |
310 | 317 | } |
311 | 318 |