@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * Outputs a jQuery click event |
156 | 156 | * |
157 | 157 | * @param string $element The element to attach the event to |
158 | - * @param mixed $js The code to execute |
|
158 | + * @param string $js The code to execute |
|
159 | 159 | * @param boolean $ret_false whether or not to return false |
160 | 160 | * @return string |
161 | 161 | */ |
@@ -220,6 +220,8 @@ discard block |
||
220 | 220 | * @param string - element |
221 | 221 | * @param string - Javascript code for mouse over |
222 | 222 | * @param string - Javascript code for mouse out |
223 | + * @param string $over |
|
224 | + * @param string $out |
|
223 | 225 | * @return string |
224 | 226 | */ |
225 | 227 | public function _hover($element='this', $over, $out) { |
@@ -803,7 +805,7 @@ discard block |
||
803 | 805 | * |
804 | 806 | * @param string $element |
805 | 807 | * @param array $options |
806 | - * @return void |
|
808 | + * @return string |
|
807 | 809 | */ |
808 | 810 | public function sortable($element, $options=array()) { |
809 | 811 | if (count($options)>0) { |
@@ -934,6 +936,7 @@ discard block |
||
934 | 936 | /** |
935 | 937 | * A wrapper for writing document.ready() |
936 | 938 | * |
939 | + * @param string $js |
|
937 | 940 | * @return string |
938 | 941 | */ |
939 | 942 | public function _document_ready($js) { |
@@ -988,7 +991,7 @@ discard block |
||
988 | 991 | /** |
989 | 992 | * Ensures the speed parameter is valid for jQuery |
990 | 993 | * |
991 | - * @param string|int $speed |
|
994 | + * @param string $speed |
|
992 | 995 | * @return string |
993 | 996 | */ |
994 | 997 | private function _validate_speed($speed) { |
@@ -1003,6 +1006,10 @@ discard block |
||
1003 | 1006 | return $speed; |
1004 | 1007 | } |
1005 | 1008 | // ------------------------------------------------------------------------ |
1009 | + |
|
1010 | + /** |
|
1011 | + * @param string $retour |
|
1012 | + */ |
|
1006 | 1013 | protected function addLoading(&$retour, $responseElement) { |
1007 | 1014 | $loading_notifier='<div class="ajax-loader">'; |
1008 | 1015 | if ($this->ajaxLoader=='') { |
@@ -1015,13 +1022,25 @@ discard block |
||
1015 | 1022 | $retour.="\t\t$(\"{$responseElement}\").prepend('{$loading_notifier}');\n"; |
1016 | 1023 | } |
1017 | 1024 | |
1025 | + /** |
|
1026 | + * @param string $url |
|
1027 | + * @param string $jsCallback |
|
1028 | + */ |
|
1018 | 1029 | public function _get($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
1019 | 1030 | return $this->_ajax("get", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
1020 | 1031 | } |
1032 | + |
|
1033 | + /** |
|
1034 | + * @param string $url |
|
1035 | + * @param string $jsCallback |
|
1036 | + */ |
|
1021 | 1037 | public function _post($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
1022 | 1038 | return $this->_ajax("post", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
1023 | 1039 | } |
1024 | 1040 | |
1041 | + /** |
|
1042 | + * @param string $method |
|
1043 | + */ |
|
1025 | 1044 | protected function _ajax($method,$url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
1026 | 1045 | if(JString::isNull($params)){$params="{}";} |
1027 | 1046 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
@@ -1036,6 +1055,9 @@ discard block |
||
1036 | 1055 | return $retour; |
1037 | 1056 | } |
1038 | 1057 | |
1058 | + /** |
|
1059 | + * @param string $attr |
|
1060 | + */ |
|
1039 | 1061 | protected function _getAjaxUrl($url,$attr){ |
1040 | 1062 | $url=$this->_correctAjaxUrl($url); |
1041 | 1063 | $retour="url='".$url."';\n"; |
@@ -1105,6 +1127,12 @@ discard block |
||
1105 | 1127 | return $retour; |
1106 | 1128 | } |
1107 | 1129 | |
1130 | + /** |
|
1131 | + * @param string $url |
|
1132 | + * @param string $form |
|
1133 | + * @param string $responseElement |
|
1134 | + * @param string $jsCallback |
|
1135 | + */ |
|
1108 | 1136 | public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
1109 | 1137 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
1110 | 1138 | $retour=$this->_getAjaxUrl($url, $attr); |
@@ -1212,7 +1240,7 @@ discard block |
||
1212 | 1240 | * @param string $element |
1213 | 1241 | * @param string $elementToModify |
1214 | 1242 | * @param string $jqueryCall |
1215 | - * @param string|array $param |
|
1243 | + * @param string $param |
|
1216 | 1244 | * @param boolean $preventDefault |
1217 | 1245 | * @param boolean $stopPropagation |
1218 | 1246 | * @param string $jsCallback javascript code to execute after the jquery call |