@@ -7,9 +7,16 @@ |
||
7 | 7 | trait IconTrait { |
8 | 8 | private $_hasIcon=false; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $name |
|
12 | + * @param string $value |
|
13 | + */ |
|
10 | 14 | protected abstract function addToPropertyCtrl($name, $value, $typeCtrl); |
11 | 15 | public abstract function addContent($content,$before=false); |
12 | 16 | |
17 | + /** |
|
18 | + * @param boolean $direction |
|
19 | + */ |
|
13 | 20 | public function addIcon($icon,$direction=Direction::LEFT){ |
14 | 21 | if($this->_hasIcon===false){ |
15 | 22 | $iconO=$icon; |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * Associate an ajax get to the breadcrumb elements, displayed in $targetSelector |
58 | 58 | * $attr member is used to build each element url |
59 | 59 | * @param string $targetSelector the target of the get |
60 | - * @param string $attr the html attribute used to build the elements url |
|
61 | - * @return HtmlBreadcrumbs |
|
60 | + * @return HtmlBreadcrumb |
|
62 | 61 | */ |
63 | 62 | public function autoGetOnClick($targetSelector){ |
64 | 63 | return $this->getOnClick($this->root, $targetSelector,array("attr"=>$this->attr)); |
@@ -83,7 +82,7 @@ discard block |
||
83 | 82 | /** |
84 | 83 | * Add new elements in breadcrumbs corresponding to request dispatcher : controllerName, actionName, parameters |
85 | 84 | * @param Dispatcher $dispatcher the request dispatcher |
86 | - * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
|
85 | + * @return HtmlBreadcrumb |
|
87 | 86 | */ |
88 | 87 | public function fromDispatcher($dispatcher,$startIndex=0){ |
89 | 88 | $this->startIndex=$startIndex; |
@@ -120,7 +119,7 @@ discard block |
||
120 | 119 | /** |
121 | 120 | * sets the function who generates the href elements. default : function($element){return $element->getContent()} |
122 | 121 | * @param function $_hrefFunction |
123 | - * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
|
122 | + * @return HtmlBreadcrumb |
|
124 | 123 | */ |
125 | 124 | public function setHrefFunction($_hrefFunction) { |
126 | 125 | $this->_hrefFunction = $_hrefFunction; |
@@ -109,6 +109,10 @@ discard block |
||
109 | 109 | return true; |
110 | 110 | } |
111 | 111 | |
112 | + /** |
|
113 | + * @param string $propertyName |
|
114 | + * @param string $value |
|
115 | + */ |
|
112 | 116 | protected function propertyContains($propertyName,$value){ |
113 | 117 | $values=$this->getProperty($propertyName); |
114 | 118 | if(isset($values)){ |
@@ -138,17 +142,28 @@ discard block |
||
138 | 142 | return $this; |
139 | 143 | } |
140 | 144 | |
145 | + /** |
|
146 | + * @param string $name |
|
147 | + * @param string $value |
|
148 | + */ |
|
141 | 149 | protected function removePropertyValue($name,$value){ |
142 | 150 | $this->properties[$name]=\str_replace($value, "", $this->properties[$name]); |
143 | 151 | return $this; |
144 | 152 | } |
145 | 153 | |
154 | + /** |
|
155 | + * @param string $name |
|
156 | + */ |
|
146 | 157 | protected function removeProperty($name){ |
147 | 158 | if(\array_key_exists($name, $this->properties)) |
148 | 159 | unset($this->properties[$name]); |
149 | 160 | return $this; |
150 | 161 | } |
151 | 162 | |
163 | + /** |
|
164 | + * @param string $name |
|
165 | + * @param string[] $typeCtrl |
|
166 | + */ |
|
152 | 167 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
153 | 168 | if ($this->ctrl($name, $value, $typeCtrl)===true) { |
154 | 169 | if (is_array($typeCtrl)) { |
@@ -173,6 +188,9 @@ discard block |
||
173 | 188 | return $this->addToProperty($name, $value); |
174 | 189 | } |
175 | 190 | |
191 | + /** |
|
192 | + * @param string $name |
|
193 | + */ |
|
176 | 194 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
177 | 195 | // if($this->ctrl($name, $value, $typeCtrl)===true){ |
178 | 196 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
@@ -312,6 +330,9 @@ discard block |
||
312 | 330 | } |
313 | 331 | } |
314 | 332 | |
333 | + /** |
|
334 | + * @param string $operation |
|
335 | + */ |
|
315 | 336 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
316 | 337 | $params=array ( |
317 | 338 | "url" => $url, |
@@ -322,14 +343,23 @@ discard block |
||
322 | 343 | return $this; |
323 | 344 | } |
324 | 345 | |
346 | + /** |
|
347 | + * @param string $event |
|
348 | + */ |
|
325 | 349 | public function getOn($event, $url, $responseElement="", $parameters=array()) { |
326 | 350 | return $this->_ajaxOn("get", $event, $url, $responseElement, $parameters); |
327 | 351 | } |
328 | 352 | |
353 | + /** |
|
354 | + * @param string $url |
|
355 | + */ |
|
329 | 356 | public function getOnClick($url, $responseElement="", $parameters=array()) { |
330 | 357 | return $this->getOn("click", $url, $responseElement, $parameters); |
331 | 358 | } |
332 | 359 | |
360 | + /** |
|
361 | + * @param string $event |
|
362 | + */ |
|
333 | 363 | public function postOn($event, $url, $params="{}", $responseElement="", $parameters=array()) { |
334 | 364 | $parameters ["params"]=$params; |
335 | 365 | return $this->_ajaxOn("post", $event, $url, $responseElement, $parameters); |
@@ -339,6 +369,9 @@ discard block |
||
339 | 369 | return $this->postOn("click", $url, $params, $responseElement, $parameters); |
340 | 370 | } |
341 | 371 | |
372 | + /** |
|
373 | + * @param string $event |
|
374 | + */ |
|
342 | 375 | public function postFormOn($event, $url, $form, $responseElement="", $parameters=array()) { |
343 | 376 | $parameters ["form"]=$form; |
344 | 377 | return $this->_ajaxOn("postForm", $event, $url, $responseElement, $parameters); |
@@ -388,6 +421,9 @@ discard block |
||
388 | 421 | return $value; |
389 | 422 | } |
390 | 423 | |
424 | + /** |
|
425 | + * @param string $jqueryCall |
|
426 | + */ |
|
391 | 427 | public function jsDoJquery($jqueryCall, $param=""){ |
392 | 428 | return "$('#".$this->identifier."').".$jqueryCall."(".$this->_prep_value($param).");"; |
393 | 429 | } |
@@ -22,6 +22,9 @@ discard block |
||
22 | 22 | private $_colSize; |
23 | 23 | private $_implicite=false; |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $identifier |
|
27 | + */ |
|
25 | 28 | public function __construct( $identifier,$numCols=NULL,$colSizing=false,$implicite=false){ |
26 | 29 | parent::__construct( $identifier,"div","row"); |
27 | 30 | $this->_implicite=$implicite; |
@@ -55,7 +58,7 @@ discard block |
||
55 | 58 | /** |
56 | 59 | * return the col at $index |
57 | 60 | * @param int $index |
58 | - * @return \Ajax\semantic\html\collections\HtmlGridCol |
|
61 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
59 | 62 | */ |
60 | 63 | public function getCol($index){ |
61 | 64 | return $this->getItem($index); |
@@ -47,6 +47,9 @@ |
||
47 | 47 | return $this->addComponent(new Accordion($this->js), $attachTo, $params); |
48 | 48 | } |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $attachTo |
|
52 | + */ |
|
50 | 53 | public function sticky($attachTo=NULL, $params=NULL) { |
51 | 54 | return $this->addComponent(new Sticky($this->js), $attachTo, $params); |
52 | 55 | } |
@@ -22,6 +22,10 @@ discard block |
||
22 | 22 | private $_colSizing=true; |
23 | 23 | private $_implicitRows=false; |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $identifier |
|
27 | + * @param integer $numCols |
|
28 | + */ |
|
25 | 29 | public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
26 | 30 | parent::__construct( $identifier, "div","ui grid"); |
27 | 31 | $this->_implicitRows=$implicitRows; |
@@ -148,7 +152,7 @@ discard block |
||
148 | 152 | /** |
149 | 153 | * return the row at $index |
150 | 154 | * @param int $index |
151 | - * @return \Ajax\semantic\html\collections\HtmlGridRow |
|
155 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
152 | 156 | */ |
153 | 157 | public function getRow($index){ |
154 | 158 | return $this->getItem($index); |
@@ -284,7 +288,7 @@ discard block |
||
284 | 288 | |
285 | 289 | /** |
286 | 290 | * stretch the row contents to take up the entire column height |
287 | - * @return \Ajax\semantic\html\content\HtmlGridRow |
|
291 | + * @return HtmlGrid |
|
288 | 292 | */ |
289 | 293 | public function setStretched(){ |
290 | 294 | return $this->addToProperty("class", "stretched"); |