|
@@ 212-223 (lines=12) @@
|
| 209 |
|
* @param string $url the request address |
| 210 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true) |
| 211 |
|
*/ |
| 212 |
|
public function jsonOn($event,$element, $url,$parameters=array()) { |
| 213 |
|
$preventDefault=true; |
| 214 |
|
$stopPropagation=true; |
| 215 |
|
$jsCallback=null; |
| 216 |
|
$attr="id"; |
| 217 |
|
$method="get"; |
| 218 |
|
$context="document"; |
| 219 |
|
$params="{}"; |
| 220 |
|
$immediatly=true; |
| 221 |
|
extract($parameters); |
| 222 |
|
return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
/** |
| 226 |
|
* Prepares an ajax request delayed and receives the JSON data types by assigning DOM elements with the same name |
|
@@ 306-318 (lines=13) @@
|
| 303 |
|
* @param string $url the request url |
| 304 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","rowClass"=>"_json","immediatly"=>true) |
| 305 |
|
*/ |
| 306 |
|
public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) { |
| 307 |
|
$preventDefault=true; |
| 308 |
|
$stopPropagation=true; |
| 309 |
|
$jsCallback=null; |
| 310 |
|
$attr="id"; |
| 311 |
|
$method="get"; |
| 312 |
|
$context = null; |
| 313 |
|
$params="{}"; |
| 314 |
|
$immediatly=true; |
| 315 |
|
$rowClass="_json"; |
| 316 |
|
extract($parameters); |
| 317 |
|
return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $rowClass, $context,$attr), $event, $preventDefault, $stopPropagation,$immediatly); |
| 318 |
|
} |
| 319 |
|
|
| 320 |
|
/** |
| 321 |
|
* Prepares a Get ajax request |
|
@@ 344-356 (lines=13) @@
|
| 341 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 342 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 343 |
|
*/ |
| 344 |
|
public function getOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 345 |
|
$preventDefault=true; |
| 346 |
|
$stopPropagation=true; |
| 347 |
|
$jsCallback=null; |
| 348 |
|
$attr="id"; |
| 349 |
|
$hasLoader=true; |
| 350 |
|
$immediatly=true; |
| 351 |
|
$jqueryDone="html"; |
| 352 |
|
$ajaxTransition=null; |
| 353 |
|
$params="{}"; |
| 354 |
|
extract($parameters); |
| 355 |
|
return $this->_add_event($element, $this->_get($url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
/** |
| 359 |
|
* Performs an ajax request to $url on the event $event on $element |
|
@@ 367-380 (lines=14) @@
|
| 364 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 365 |
|
* @param array $parameters default : array("method"=>"get","preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 366 |
|
*/ |
| 367 |
|
public function ajaxOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 368 |
|
$preventDefault=true; |
| 369 |
|
$stopPropagation=true; |
| 370 |
|
$jsCallback=null; |
| 371 |
|
$attr="id"; |
| 372 |
|
$method="get"; |
| 373 |
|
$hasLoader=true; |
| 374 |
|
$immediatly=true; |
| 375 |
|
$jqueryDone="html"; |
| 376 |
|
$ajaxTransition=null; |
| 377 |
|
$params="{}"; |
| 378 |
|
extract($parameters); |
| 379 |
|
return $this->_add_event($element, $this->_ajax($method,$url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
/** |
| 383 |
|
* Performs a get to $url on the click event on $element |
|
@@ 450-461 (lines=12) @@
|
| 447 |
|
* @param string $responseElement selector of the HTML element displaying the answer |
| 448 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null) |
| 449 |
|
*/ |
| 450 |
|
public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
| 451 |
|
$preventDefault=true; |
| 452 |
|
$stopPropagation=true; |
| 453 |
|
$jsCallback=null; |
| 454 |
|
$attr="id"; |
| 455 |
|
$hasLoader=true; |
| 456 |
|
$immediatly=true; |
| 457 |
|
$jqueryDone="html"; |
| 458 |
|
$ajaxTransition=null; |
| 459 |
|
extract($parameters); |
| 460 |
|
return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 461 |
|
} |
| 462 |
|
|
| 463 |
|
/** |
| 464 |
|
* Performs a post to $url on the click event fired on $element and pass the parameters $params |