@@ 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 |
|
@@ 194-205 (lines=12) @@ | ||
191 | * @param string $url the request address |
|
192 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get", "context"=>null) |
|
193 | */ |
|
194 | public function _jsonArrayOn($event,$element, $maskSelector,$url,$parameters=array()) { |
|
195 | $preventDefault=true; |
|
196 | $stopPropagation=true; |
|
197 | $jsCallback=null; |
|
198 | $attr="id"; |
|
199 | $method="get"; |
|
200 | $context = null; |
|
201 | $params="{}"; |
|
202 | $immediatly=true; |
|
203 | extract($parameters); |
|
204 | return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $attr, $context), $event, $preventDefault, $stopPropagation,$immediatly); |
|
205 | } |
|
206 | ||
207 | public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$jqueryDone="html",$ajaxTransition=null,$immediatly=false) { |
|
208 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
|
@@ 240-251 (lines=12) @@ | ||
237 | * @param string $responseElement |
|
238 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxTransition"=>null,"jqueryDone"=>"html") |
|
239 | */ |
|
240 | public function _getOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
241 | $preventDefault=true; |
|
242 | $stopPropagation=true; |
|
243 | $jsCallback=null; |
|
244 | $attr="id"; |
|
245 | $hasLoader=true; |
|
246 | $immediatly=true; |
|
247 | $jqueryDone="html"; |
|
248 | $ajaxTransition=null; |
|
249 | extract($parameters); |
|
250 | return $this->_add_event($element, $this->_get($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
|
251 | } |
|
252 | ||
253 | /** |
|
254 | * Effectue un post vers $url sur l'évènement $event de $element en passant les paramètres $params |
|
@@ 263-274 (lines=12) @@ | ||
260 | * @param string $responseElement |
|
261 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxTransition"=>null) |
|
262 | */ |
|
263 | public function _postOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
264 | $preventDefault=true; |
|
265 | $stopPropagation=true; |
|
266 | $jsCallback=null; |
|
267 | $attr="id"; |
|
268 | $hasLoader=true; |
|
269 | $immediatly=true; |
|
270 | $jqueryDone="html"; |
|
271 | $ajaxTransition=null; |
|
272 | extract($parameters); |
|
273 | return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
|
274 | } |
|
275 | ||
276 | /** |
|
277 | * Effectue un post vers $url sur l'évènement $event de $element en passant les paramètres du formulaire $form |