|
@@ 187-198 (lines=12) @@
|
| 184 |
|
* @param string $url the request address |
| 185 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true) |
| 186 |
|
*/ |
| 187 |
|
public function jsonOn($event,$element, $url,$parameters=array()) { |
| 188 |
|
$preventDefault=true; |
| 189 |
|
$stopPropagation=true; |
| 190 |
|
$jsCallback=null; |
| 191 |
|
$attr="id"; |
| 192 |
|
$method="get"; |
| 193 |
|
$context="document"; |
| 194 |
|
$params="{}"; |
| 195 |
|
$immediatly=true; |
| 196 |
|
extract($parameters); |
| 197 |
|
return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly); |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
/** |
| 201 |
|
* Prepares an ajax request delayed and receives the JSON data types by assigning DOM elements with the same name |
|
@@ 281-293 (lines=13) @@
|
| 278 |
|
* @param string $url the request url |
| 279 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","rowClass"=>"_json","immediatly"=>true) |
| 280 |
|
*/ |
| 281 |
|
public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) { |
| 282 |
|
$preventDefault=true; |
| 283 |
|
$stopPropagation=true; |
| 284 |
|
$jsCallback=null; |
| 285 |
|
$attr="id"; |
| 286 |
|
$method="get"; |
| 287 |
|
$context = null; |
| 288 |
|
$params="{}"; |
| 289 |
|
$immediatly=true; |
| 290 |
|
$rowClass="_json"; |
| 291 |
|
extract($parameters); |
| 292 |
|
return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $rowClass, $context,$attr), $event, $preventDefault, $stopPropagation,$immediatly); |
| 293 |
|
} |
| 294 |
|
|
| 295 |
|
/** |
| 296 |
|
* Prepares a Get ajax request |
|
@@ 319-331 (lines=13) @@
|
| 316 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 317 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 318 |
|
*/ |
| 319 |
|
public function getOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 320 |
|
$preventDefault=true; |
| 321 |
|
$stopPropagation=true; |
| 322 |
|
$jsCallback=null; |
| 323 |
|
$attr="id"; |
| 324 |
|
$hasLoader=true; |
| 325 |
|
$immediatly=true; |
| 326 |
|
$jqueryDone="html"; |
| 327 |
|
$ajaxTransition=null; |
| 328 |
|
$params="{}"; |
| 329 |
|
extract($parameters); |
| 330 |
|
return $this->_add_event($element, $this->_get($url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 331 |
|
} |
| 332 |
|
|
| 333 |
|
/** |
| 334 |
|
* Performs an ajax request to $url on the event $event on $element |
|
@@ 342-355 (lines=14) @@
|
| 339 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 340 |
|
* @param array $parameters default : array("method"=>"get","preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 341 |
|
*/ |
| 342 |
|
public function ajaxOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 343 |
|
$preventDefault=true; |
| 344 |
|
$stopPropagation=true; |
| 345 |
|
$jsCallback=null; |
| 346 |
|
$attr="id"; |
| 347 |
|
$method="get"; |
| 348 |
|
$hasLoader=true; |
| 349 |
|
$immediatly=true; |
| 350 |
|
$jqueryDone="html"; |
| 351 |
|
$ajaxTransition=null; |
| 352 |
|
$params="{}"; |
| 353 |
|
extract($parameters); |
| 354 |
|
return $this->_add_event($element, $this->_ajax($method,$url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 355 |
|
} |
| 356 |
|
|
| 357 |
|
/** |
| 358 |
|
* Performs a get to $url on the click event on $element |
|
@@ 425-436 (lines=12) @@
|
| 422 |
|
* @param string $responseElement selector of the HTML element displaying the answer |
| 423 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null) |
| 424 |
|
*/ |
| 425 |
|
public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
| 426 |
|
$preventDefault=true; |
| 427 |
|
$stopPropagation=true; |
| 428 |
|
$jsCallback=null; |
| 429 |
|
$attr="id"; |
| 430 |
|
$hasLoader=true; |
| 431 |
|
$immediatly=true; |
| 432 |
|
$jqueryDone="html"; |
| 433 |
|
$ajaxTransition=null; |
| 434 |
|
extract($parameters); |
| 435 |
|
return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 436 |
|
} |
| 437 |
|
|
| 438 |
|
/** |
| 439 |
|
* Performs a post to $url on the click event fired on $element and pass the parameters $params |