@@ -16,6 +16,10 @@ |
||
16 | 16 | class HtmlGridSystem extends HtmlDoubleElement { |
17 | 17 | private $rows; |
18 | 18 | |
19 | + /** |
|
20 | + * @param string $identifier |
|
21 | + * @param integer $numCols |
|
22 | + */ |
|
19 | 23 | public function __construct($identifier,$numRows=1,$numCols=NULL){ |
20 | 24 | parent::__construct($identifier,"div"); |
21 | 25 | $this->setProperty("class", "container-fluid"); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * Outputs a jQuery click event |
160 | 160 | * |
161 | 161 | * @param string $element The element to attach the event to |
162 | - * @param mixed $js The code to execute |
|
162 | + * @param string $js The code to execute |
|
163 | 163 | * @param boolean $ret_false whether or not to return false |
164 | 164 | * @return string |
165 | 165 | */ |
@@ -235,6 +235,8 @@ discard block |
||
235 | 235 | * @param string - element |
236 | 236 | * @param string - Javascript code for mouse over |
237 | 237 | * @param string - Javascript code for mouse out |
238 | + * @param string $over |
|
239 | + * @param string $out |
|
238 | 240 | * @return string |
239 | 241 | */ |
240 | 242 | public function _hover($element='this', $over, $out) { |
@@ -768,7 +770,7 @@ discard block |
||
768 | 770 | * |
769 | 771 | * @param string $element |
770 | 772 | * @param array $options |
771 | - * @return void |
|
773 | + * @return string |
|
772 | 774 | */ |
773 | 775 | public function sortable($element, $options=array()) { |
774 | 776 | if (count($options)>0) { |
@@ -904,6 +906,7 @@ discard block |
||
904 | 906 | /** |
905 | 907 | * A wrapper for writing document.ready() |
906 | 908 | * |
909 | + * @param string $js |
|
907 | 910 | * @return string |
908 | 911 | */ |
909 | 912 | public function _document_ready($js) { |
@@ -958,7 +961,7 @@ discard block |
||
958 | 961 | /** |
959 | 962 | * Ensures the speed parameter is valid for jQuery |
960 | 963 | * |
961 | - * @param string|int $speed |
|
964 | + * @param string $speed |
|
962 | 965 | * @return string |
963 | 966 | */ |
964 | 967 | private function _validate_speed($speed) { |
@@ -973,6 +976,10 @@ discard block |
||
973 | 976 | return $speed; |
974 | 977 | } |
975 | 978 | // ------------------------------------------------------------------------ |
979 | + |
|
980 | + /** |
|
981 | + * @param string $retour |
|
982 | + */ |
|
976 | 983 | protected function addLoading(&$retour, $responseElement) { |
977 | 984 | $loading_notifier='<div class="ajax-loader">'; |
978 | 985 | if ($this->ajaxLoader=='') { |
@@ -985,13 +992,25 @@ discard block |
||
985 | 992 | $retour.="\t\t$({$responseElement}).prepend('{$loading_notifier}');\n"; |
986 | 993 | } |
987 | 994 | |
995 | + /** |
|
996 | + * @param string $url |
|
997 | + * @param string $jsCallback |
|
998 | + */ |
|
988 | 999 | public function _get($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
989 | 1000 | return $this->_ajax("get", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
990 | 1001 | } |
1002 | + |
|
1003 | + /** |
|
1004 | + * @param string $url |
|
1005 | + * @param string $jsCallback |
|
1006 | + */ |
|
991 | 1007 | public function _post($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
992 | 1008 | return $this->_ajax("post", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
993 | 1009 | } |
994 | 1010 | |
1011 | + /** |
|
1012 | + * @param string $method |
|
1013 | + */ |
|
995 | 1014 | protected function _ajax($method,$url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
996 | 1015 | if(JString::isNull($params)){$params="{}";} |
997 | 1016 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
@@ -1008,6 +1027,9 @@ discard block |
||
1008 | 1027 | return $retour; |
1009 | 1028 | } |
1010 | 1029 | |
1030 | + /** |
|
1031 | + * @param string $attr |
|
1032 | + */ |
|
1011 | 1033 | protected function _getAjaxUrl($url,$attr){ |
1012 | 1034 | $url=$this->_correctAjaxUrl($url); |
1013 | 1035 | $retour="url='".$url."';\n"; |
@@ -1139,6 +1161,12 @@ discard block |
||
1139 | 1161 | return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $attr, $context), $event, $preventDefault, $stopPropagation,$immediatly); |
1140 | 1162 | } |
1141 | 1163 | |
1164 | + /** |
|
1165 | + * @param string $url |
|
1166 | + * @param string $form |
|
1167 | + * @param string $responseElement |
|
1168 | + * @param string $jsCallback |
|
1169 | + */ |
|
1142 | 1170 | public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
1143 | 1171 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
1144 | 1172 | $retour=$this->_getAjaxUrl($url, $attr); |
@@ -1252,7 +1280,7 @@ discard block |
||
1252 | 1280 | * @param string $element |
1253 | 1281 | * @param string $elementToModify |
1254 | 1282 | * @param string $jqueryCall |
1255 | - * @param string|array $param |
|
1283 | + * @param string $param |
|
1256 | 1284 | * @param boolean $preventDefault |
1257 | 1285 | * @param boolean $stopPropagation |
1258 | 1286 | * @param string $jsCallback javascript code to execute after the jquery call |
@@ -1290,6 +1318,9 @@ discard block |
||
1290 | 1318 | return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation,$immediatly); |
1291 | 1319 | } |
1292 | 1320 | |
1321 | + /** |
|
1322 | + * @param string $input |
|
1323 | + */ |
|
1293 | 1324 | private function minify($input) { |
1294 | 1325 | if(trim($input) === "") return $input; |
1295 | 1326 | return preg_replace( |
@@ -164,7 +164,6 @@ discard block |
||
164 | 164 | * Associate an ajax get to the breadcrumbs elements, displayed in $targetSelector |
165 | 165 | * $attr member is used to build each element url |
166 | 166 | * @param string $targetSelector the target of the get |
167 | - * @param string $attr the html attribute used to build the elements url |
|
168 | 167 | * @return HtmlBreadcrumbs |
169 | 168 | */ |
170 | 169 | public function autoGetOnClick($targetSelector){ |
@@ -178,6 +177,9 @@ discard block |
||
178 | 177 | return parent::contentAsString(); |
179 | 178 | } |
180 | 179 | |
180 | + /** |
|
181 | + * @param integer $index |
|
182 | + */ |
|
181 | 183 | public function getElement($index){ |
182 | 184 | return $this->content[$index]; |
183 | 185 | } |
@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | protected $style=""; |
20 | 20 | protected $styleLimits=null; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $identifier |
|
24 | + */ |
|
22 | 25 | public function __construct($identifier, $style="info", $value=0, $max=100, $min=0) { |
23 | 26 | parent::__construct($identifier); |
24 | 27 | $this->_template=include 'templates/tplProgressbar.php'; |
@@ -28,6 +31,9 @@ discard block |
||
28 | 31 | $this->setStyle($style); |
29 | 32 | } |
30 | 33 | |
34 | + /** |
|
35 | + * @param boolean $value |
|
36 | + */ |
|
31 | 37 | public function setActive($value) { |
32 | 38 | if(is_array($this->content)){ |
33 | 39 | foreach ($this->content as $pb){ |
@@ -42,6 +48,9 @@ discard block |
||
42 | 48 | return $this; |
43 | 49 | } |
44 | 50 | |
51 | + /** |
|
52 | + * @param boolean $value |
|
53 | + */ |
|
45 | 54 | public function setStriped($value) { |
46 | 55 | if(is_array($this->content)){ |
47 | 56 | foreach ($this->content as $pb){ |
@@ -56,6 +65,9 @@ discard block |
||
56 | 65 | return $this; |
57 | 66 | } |
58 | 67 | |
68 | + /** |
|
69 | + * @param boolean $value |
|
70 | + */ |
|
59 | 71 | public function showCaption($value) { |
60 | 72 | if(is_array($this->content)){ |
61 | 73 | foreach ($this->content as $pb){ |
@@ -113,6 +125,9 @@ discard block |
||
113 | 125 | return $this->isStacked; |
114 | 126 | } |
115 | 127 | |
128 | + /** |
|
129 | + * @param boolean $isStacked |
|
130 | + */ |
|
116 | 131 | public function setIsStacked($isStacked) { |
117 | 132 | $this->isStacked=$isStacked; |
118 | 133 | return $this; |
@@ -121,7 +136,7 @@ discard block |
||
121 | 136 | /** |
122 | 137 | * define the progressbar style |
123 | 138 | * avaible values : "success","info","warning","danger" |
124 | - * @param string|int $cssStyle |
|
139 | + * @param string $cssStyle |
|
125 | 140 | * @return \Ajax\bootstrap\html\HtmlProgressbar default : "" |
126 | 141 | */ |
127 | 142 | public function setStyle($cssStyle) { |
@@ -7,6 +7,9 @@ |
||
7 | 7 | |
8 | 8 | class PropertyWrapper { |
9 | 9 | |
10 | + /** |
|
11 | + * @param \Ajax\JsUtils $js |
|
12 | + */ |
|
10 | 13 | public static function wrap($input, $js=NULL, $separator=' ', $valueQuote='"') { |
11 | 14 | $output=""; |
12 | 15 | if (is_string($input)) { |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | */ |
19 | 19 | class HtmlListgroupItem extends HtmlElementAsContent { |
20 | 20 | |
21 | + /** |
|
22 | + * @param HtmlBsDoubleElement $element |
|
23 | + */ |
|
21 | 24 | public function __construct($element) { |
22 | 25 | parent::__construct($element); |
23 | 26 | $this->element->setProperty("class", "list-group-item"); |
@@ -37,7 +40,7 @@ discard block |
||
37 | 40 | * define the Panel style |
38 | 41 | * avaible values : "list-group-item-default","list-group-item-primary","list-group-item-success","list-group-item-info","list-group-item-warning","list-group-item-danger" |
39 | 42 | * @param string|int $cssStyle |
40 | - * @return \Ajax\bootstrap\html\HtmlListgroupItem default : "list-group-item-default" |
|
43 | + * @return \Ajax\common\html\HtmlSingleElement default : "list-group-item-default" |
|
41 | 44 | */ |
42 | 45 | public function setStyle($cssStyle) { |
43 | 46 | if (!PhalconUtils::startsWith($cssStyle, "list-group-item")) |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * Set the button value |
36 | 36 | * @param string $value |
37 | - * @return \Ajax\semantic\html\HtmlButton |
|
37 | + * @return HtmlButton |
|
38 | 38 | */ |
39 | 39 | public function setValue($value) { |
40 | 40 | $this->content=$value; |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * define the button style |
46 | - * @param string|int $cssStyle |
|
47 | - * @return \Ajax\semantic\html\HtmlButton default : "" |
|
46 | + * @param string $cssStyle |
|
47 | + * @return HtmlButton default : "" |
|
48 | 48 | */ |
49 | 49 | public function setStyle($cssStyle) { |
50 | 50 | return $this->addToProperty("class",$cssStyle); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @param string|HtmlIcon $icon |
|
90 | + * @param string $icon |
|
91 | 91 | * @return \Ajax\semantic\html\elements\HtmlButton |
92 | 92 | */ |
93 | 93 | public function asIcon($icon){ |
@@ -10,6 +10,9 @@ discard block |
||
10 | 10 | |
11 | 11 | class HtmlDropdownItem extends HtmlSemDoubleElement { |
12 | 12 | |
13 | + /** |
|
14 | + * @param string $identifier |
|
15 | + */ |
|
13 | 16 | public function __construct($identifier, $content="",$value=NULL,$image=NULL) { |
14 | 17 | parent::__construct($identifier, "div"); |
15 | 18 | $this->setClass("item"); |
@@ -60,6 +63,9 @@ discard block |
||
60 | 63 | return $this; |
61 | 64 | } |
62 | 65 | |
66 | + /** |
|
67 | + * @param string $content |
|
68 | + */ |
|
63 | 69 | public function setContent($content){ |
64 | 70 | if($content==="-"){ |
65 | 71 | $this->asDivider(); |
@@ -108,6 +108,10 @@ discard block |
||
108 | 108 | return true; |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param string $propertyName |
|
113 | + * @param string $value |
|
114 | + */ |
|
111 | 115 | protected function propertyContains($propertyName,$value){ |
112 | 116 | $values=$this->getProperty($propertyName); |
113 | 117 | if(isset($values)){ |
@@ -137,6 +141,10 @@ discard block |
||
137 | 141 | return $this; |
138 | 142 | } |
139 | 143 | |
144 | + /** |
|
145 | + * @param string $name |
|
146 | + * @param string[] $typeCtrl |
|
147 | + */ |
|
140 | 148 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
141 | 149 | if ($this->ctrl($name, $value, $typeCtrl)===true) { |
142 | 150 | if (is_array($typeCtrl)) { |
@@ -161,6 +169,9 @@ discard block |
||
161 | 169 | return $this->addToProperty($name, $value); |
162 | 170 | } |
163 | 171 | |
172 | + /** |
|
173 | + * @param string $name |
|
174 | + */ |
|
164 | 175 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
165 | 176 | // if($this->ctrl($name, $value, $typeCtrl)===true){ |
166 | 177 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
@@ -228,6 +239,9 @@ discard block |
||
228 | 239 | |
229 | 240 | } |
230 | 241 | |
242 | + /** |
|
243 | + * @param string $before |
|
244 | + */ |
|
231 | 245 | public function wrap($before, $after="") { |
232 | 246 | if(isset($before)){ |
233 | 247 | $this->wrapBefore.=$before; |
@@ -296,6 +310,9 @@ discard block |
||
296 | 310 | } |
297 | 311 | } |
298 | 312 | |
313 | + /** |
|
314 | + * @param string $operation |
|
315 | + */ |
|
299 | 316 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
300 | 317 | $params=array ( |
301 | 318 | "url" => $url, |
@@ -306,14 +323,23 @@ discard block |
||
306 | 323 | return $this; |
307 | 324 | } |
308 | 325 | |
326 | + /** |
|
327 | + * @param string $event |
|
328 | + */ |
|
309 | 329 | public function getOn($event, $url, $responseElement="", $parameters=array()) { |
310 | 330 | return $this->_ajaxOn("get", $event, $url, $responseElement, $parameters); |
311 | 331 | } |
312 | 332 | |
333 | + /** |
|
334 | + * @param string $url |
|
335 | + */ |
|
313 | 336 | public function getOnClick($url, $responseElement="", $parameters=array()) { |
314 | 337 | return $this->getOn("click", $url, $responseElement, $parameters); |
315 | 338 | } |
316 | 339 | |
340 | + /** |
|
341 | + * @param string $event |
|
342 | + */ |
|
317 | 343 | public function postOn($event, $url, $params="{}", $responseElement="", $parameters=array()) { |
318 | 344 | $parameters ["params"]=$params; |
319 | 345 | return $this->_ajaxOn("post", $event, $url, $responseElement, $parameters); |
@@ -323,6 +349,9 @@ discard block |
||
323 | 349 | return $this->postOn("click", $url, $params, $responseElement, $parameters); |
324 | 350 | } |
325 | 351 | |
352 | + /** |
|
353 | + * @param string $event |
|
354 | + */ |
|
326 | 355 | public function postFormOn($event, $url, $form, $responseElement="", $parameters=array()) { |
327 | 356 | $parameters ["form"]=$form; |
328 | 357 | return $this->_ajaxOn("postForm", $event, $url, $responseElement, $parameters); |
@@ -372,6 +401,9 @@ discard block |
||
372 | 401 | return $value; |
373 | 402 | } |
374 | 403 | |
404 | + /** |
|
405 | + * @param string $jqueryCall |
|
406 | + */ |
|
375 | 407 | public function jsDoJquery($jqueryCall, $param=""){ |
376 | 408 | return "$('#".$this->identifier."').".$jqueryCall."(".$this->_prep_value($param).");"; |
377 | 409 | } |