@@ -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) { |
@@ -48,6 +48,9 @@ discard block |
||
48 | 48 | return $this; |
49 | 49 | } |
50 | 50 | |
51 | + /** |
|
52 | + * @param string $name |
|
53 | + */ |
|
51 | 54 | public function getProperty($name) { |
52 | 55 | if (array_key_exists($name, $this->properties)) |
53 | 56 | return $this->properties [$name]; |
@@ -128,6 +131,10 @@ discard block |
||
128 | 131 | return $this; |
129 | 132 | } |
130 | 133 | |
134 | + /** |
|
135 | + * @param string $name |
|
136 | + * @param string[] $typeCtrl |
|
137 | + */ |
|
131 | 138 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
132 | 139 | if ($this->ctrl($name, $value, $typeCtrl)===true) { |
133 | 140 | if (is_array($typeCtrl)) { |
@@ -152,6 +159,9 @@ discard block |
||
152 | 159 | return $this->addToProperty($name, $value); |
153 | 160 | } |
154 | 161 | |
162 | + /** |
|
163 | + * @param string $name |
|
164 | + */ |
|
155 | 165 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
156 | 166 | // if($this->ctrl($name, $value, $typeCtrl)===true){ |
157 | 167 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
@@ -219,6 +229,9 @@ discard block |
||
219 | 229 | |
220 | 230 | } |
221 | 231 | |
232 | + /** |
|
233 | + * @param string $before |
|
234 | + */ |
|
222 | 235 | public function wrap($before, $after="") { |
223 | 236 | if(isset($before)){ |
224 | 237 | $this->wrapBefore.=$before; |
@@ -287,6 +300,9 @@ discard block |
||
287 | 300 | } |
288 | 301 | } |
289 | 302 | |
303 | + /** |
|
304 | + * @param string $operation |
|
305 | + */ |
|
290 | 306 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
291 | 307 | $params=array ( |
292 | 308 | "url" => $url, |
@@ -297,14 +313,23 @@ discard block |
||
297 | 313 | return $this; |
298 | 314 | } |
299 | 315 | |
316 | + /** |
|
317 | + * @param string $event |
|
318 | + */ |
|
300 | 319 | public function getOn($event, $url, $responseElement="", $parameters=array()) { |
301 | 320 | return $this->_ajaxOn("get", $event, $url, $responseElement, $parameters); |
302 | 321 | } |
303 | 322 | |
323 | + /** |
|
324 | + * @param string $url |
|
325 | + */ |
|
304 | 326 | public function getOnClick($url, $responseElement="", $parameters=array()) { |
305 | 327 | return $this->getOn("click", $url, $responseElement, $parameters); |
306 | 328 | } |
307 | 329 | |
330 | + /** |
|
331 | + * @param string $event |
|
332 | + */ |
|
308 | 333 | public function postOn($event, $url, $params="{}", $responseElement="", $parameters=array()) { |
309 | 334 | $parameters ["params"]=$params; |
310 | 335 | return $this->_ajaxOn("post", $event, $url, $responseElement, $parameters); |
@@ -314,6 +339,9 @@ discard block |
||
314 | 339 | return $this->postOn("click", $url, $params, $responseElement, $parameters); |
315 | 340 | } |
316 | 341 | |
342 | + /** |
|
343 | + * @param string $event |
|
344 | + */ |
|
317 | 345 | public function postFormOn($event, $url, $form, $responseElement="", $parameters=array()) { |
318 | 346 | $parameters ["form"]=$form; |
319 | 347 | return $this->_ajaxOn("postForm", $event, $url, $responseElement, $parameters); |
@@ -363,6 +391,9 @@ discard block |
||
363 | 391 | return $value; |
364 | 392 | } |
365 | 393 | |
394 | + /** |
|
395 | + * @param string $jqueryCall |
|
396 | + */ |
|
366 | 397 | public function jsDoJquery($jqueryCall, $param=""){ |
367 | 398 | return "$('#".$this->identifier."').".$jqueryCall."(".$this->_prep_value($param).");"; |
368 | 399 | } |
@@ -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){ |