@@ -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( |