@@ -40,6 +40,10 @@ discard block |
||
40 | 40 | parent::run($js); |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $identifier |
|
45 | + * @param string $model |
|
46 | + */ |
|
43 | 47 | public function __construct($identifier,$model,$modelInstance=NULL) { |
44 | 48 | parent::__construct($identifier, $model,$modelInstance); |
45 | 49 | $this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0,0), false); |
@@ -154,6 +158,9 @@ discard block |
||
154 | 158 | return $this; |
155 | 159 | } |
156 | 160 | |
161 | + /** |
|
162 | + * @param PositionInTable $part |
|
163 | + */ |
|
157 | 164 | private function addToolbarRow($part,$table,$captions){ |
158 | 165 | $hasPart=$table->hasPart($part); |
159 | 166 | if($hasPart){ |
@@ -198,7 +205,7 @@ discard block |
||
198 | 205 | /** |
199 | 206 | * @param string $caption |
200 | 207 | * @param callable $callback |
201 | - * @return callable |
|
208 | + * @return \Closure |
|
202 | 209 | */ |
203 | 210 | private function getFieldButtonCallable($caption,$callback=null){ |
204 | 211 | return $this->getCallable("getFieldButton",[$caption],$callback); |
@@ -206,9 +213,9 @@ discard block |
||
206 | 213 | |
207 | 214 | /** |
208 | 215 | * @param callable $thisCallback |
209 | - * @param array $parameters |
|
216 | + * @param string[] $parameters |
|
210 | 217 | * @param callable $callback |
211 | - * @return callable |
|
218 | + * @return \Closure |
|
212 | 219 | */ |
213 | 220 | private function getCallable($thisCallback,$parameters,$callback=null){ |
214 | 221 | $result=function($instance) use($thisCallback,$parameters,$callback){ |
@@ -269,11 +276,19 @@ discard block |
||
269 | 276 | return $this; |
270 | 277 | } |
271 | 278 | |
279 | + /** |
|
280 | + * @param string $icon |
|
281 | + * @param string $class |
|
282 | + */ |
|
272 | 283 | private function addDefaultButton($icon,$class=null,$callback=null){ |
273 | 284 | $this->addField($this->getCallable("getDefaultButton",[$icon,$class],$callback)); |
274 | 285 | return $this; |
275 | 286 | } |
276 | 287 | |
288 | + /** |
|
289 | + * @param string $icon |
|
290 | + * @param string $class |
|
291 | + */ |
|
277 | 292 | private function insertDefaultButtonIn($index,$icon,$class=null,$callback=null){ |
278 | 293 | $this->insertInField($index,$this->getCallable("getDefaultButton",[$icon,$class],$callback)); |
279 | 294 | return $this; |
@@ -66,8 +66,9 @@ discard block |
||
66 | 66 | |
67 | 67 | $table->setRowCount(0, \sizeof($captions)); |
68 | 68 | $table->setHeaderValues($captions); |
69 | - if(isset($this->_compileParts)) |
|
70 | - $table->setCompileParts($this->_compileParts); |
|
69 | + if(isset($this->_compileParts)) { |
|
70 | + $table->setCompileParts($this->_compileParts); |
|
71 | + } |
|
71 | 72 | if(isset($this->_searchField) && isset($js)){ |
72 | 73 | $this->_searchField->postOn("change", $this->_urls,"{'s':$(this).val()}","-#".$this->identifier." tbody",["preventDefault"=>false]); |
73 | 74 | } |
@@ -158,7 +159,7 @@ discard block |
||
158 | 159 | $hasPart=$table->hasPart($part); |
159 | 160 | if($hasPart){ |
160 | 161 | $row=$table->getPart($part)->addRow(\sizeof($captions)); |
161 | - }else{ |
|
162 | + } else{ |
|
162 | 163 | $row=$table->getPart($part)->getRow(0); |
163 | 164 | } |
164 | 165 | $row->mergeCol(); |
@@ -282,8 +283,9 @@ discard block |
||
282 | 283 | private function getDefaultButton($icon,$class=null){ |
283 | 284 | $bt=$this->getFieldButton(""); |
284 | 285 | $bt->asIcon($icon); |
285 | - if(isset($class)) |
|
286 | - $bt->addToProperty("class", $class); |
|
286 | + if(isset($class)) { |
|
287 | + $bt->addToProperty("class", $class); |
|
288 | + } |
|
287 | 289 | return $bt; |
288 | 290 | } |
289 | 291 |