@@ 145-156 (lines=12) @@ | ||
142 | * @param string $url the request address |
|
143 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true) |
|
144 | */ |
|
145 | public function _jsonOn($event,$element, $url,$parameters=array()) { |
|
146 | $preventDefault=true; |
|
147 | $stopPropagation=true; |
|
148 | $jsCallback=null; |
|
149 | $attr="id"; |
|
150 | $method="get"; |
|
151 | $context="document"; |
|
152 | $params="{}"; |
|
153 | $immediatly=true; |
|
154 | extract($parameters); |
|
155 | return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly); |
|
156 | } |
|
157 | ||
158 | /** |
|
159 | * Makes an ajax request and receives a JSON array data types by copying and assigning them to the DOM elements with the same name |
|
@@ 197-208 (lines=12) @@ | ||
194 | * @param string $url the request address |
|
195 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get", "context"=>null) |
|
196 | */ |
|
197 | public function _jsonArrayOn($event,$element, $maskSelector,$url,$parameters=array()) { |
|
198 | $preventDefault=true; |
|
199 | $stopPropagation=true; |
|
200 | $jsCallback=null; |
|
201 | $attr="id"; |
|
202 | $method="get"; |
|
203 | $context = null; |
|
204 | $params="{}"; |
|
205 | $immediatly=true; |
|
206 | extract($parameters); |
|
207 | return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $attr, $context), $event, $preventDefault, $stopPropagation,$immediatly); |
|
208 | } |
|
209 | ||
210 | public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$jqueryDone="html",$ajaxTransition=null,$immediatly=false) { |
|
211 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
|
@@ 243-254 (lines=12) @@ | ||
240 | * @param string $responseElement |
|
241 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxTransition"=>null,"jqueryDone"=>"html") |
|
242 | */ |
|
243 | public function _getOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
244 | $preventDefault=true; |
|
245 | $stopPropagation=true; |
|
246 | $jsCallback=null; |
|
247 | $attr="id"; |
|
248 | $hasLoader=true; |
|
249 | $immediatly=true; |
|
250 | $jqueryDone="html"; |
|
251 | $ajaxTransition=null; |
|
252 | extract($parameters); |
|
253 | return $this->_add_event($element, $this->_get($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
|
254 | } |
|
255 | ||
256 | /** |
|
257 | * Effectue un post vers $url sur l'évènement $event de $element en passant les paramètres $params |
|
@@ 266-277 (lines=12) @@ | ||
263 | * @param string $responseElement |
|
264 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxTransition"=>null) |
|
265 | */ |
|
266 | public function _postOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
267 | $preventDefault=true; |
|
268 | $stopPropagation=true; |
|
269 | $jsCallback=null; |
|
270 | $attr="id"; |
|
271 | $hasLoader=true; |
|
272 | $immediatly=true; |
|
273 | $jqueryDone="html"; |
|
274 | $ajaxTransition=null; |
|
275 | extract($parameters); |
|
276 | return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
|
277 | } |
|
278 | ||
279 | /** |
|
280 | * Effectue un post vers $url sur l'évènement $event de $element en passant les paramètres du formulaire $form |