|
@@ 221-232 (lines=12) @@
|
| 218 |
|
* @param string $url the request address |
| 219 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true) |
| 220 |
|
*/ |
| 221 |
|
public function jsonOn($event,$element, $url,$parameters=array()) { |
| 222 |
|
$preventDefault=true; |
| 223 |
|
$stopPropagation=true; |
| 224 |
|
$jsCallback=null; |
| 225 |
|
$attr="id"; |
| 226 |
|
$method="get"; |
| 227 |
|
$context="document"; |
| 228 |
|
$params="{}"; |
| 229 |
|
$immediatly=true; |
| 230 |
|
extract($parameters); |
| 231 |
|
return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly); |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
/** |
| 235 |
|
* Prepares an ajax request delayed and receives the JSON data types by assigning DOM elements with the same name |
|
@@ 315-327 (lines=13) @@
|
| 312 |
|
* @param string $url the request url |
| 313 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","rowClass"=>"_json","immediatly"=>true) |
| 314 |
|
*/ |
| 315 |
|
public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) { |
| 316 |
|
$preventDefault=true; |
| 317 |
|
$stopPropagation=true; |
| 318 |
|
$jsCallback=null; |
| 319 |
|
$attr="id"; |
| 320 |
|
$method="get"; |
| 321 |
|
$context = null; |
| 322 |
|
$params="{}"; |
| 323 |
|
$immediatly=true; |
| 324 |
|
$rowClass="_json"; |
| 325 |
|
extract($parameters); |
| 326 |
|
return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $rowClass, $context,$attr), $event, $preventDefault, $stopPropagation,$immediatly); |
| 327 |
|
} |
| 328 |
|
|
| 329 |
|
/** |
| 330 |
|
* Prepares a Get ajax request |
|
@@ 353-365 (lines=13) @@
|
| 350 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 351 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 352 |
|
*/ |
| 353 |
|
public function getOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 354 |
|
$preventDefault=true; |
| 355 |
|
$stopPropagation=true; |
| 356 |
|
$jsCallback=null; |
| 357 |
|
$attr="id"; |
| 358 |
|
$hasLoader=true; |
| 359 |
|
$immediatly=true; |
| 360 |
|
$jqueryDone="html"; |
| 361 |
|
$ajaxTransition=null; |
| 362 |
|
$params="{}"; |
| 363 |
|
extract($parameters); |
| 364 |
|
return $this->_add_event($element, $this->_get($url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 365 |
|
} |
| 366 |
|
|
| 367 |
|
/** |
| 368 |
|
* Performs an ajax request to $url on the event $event on $element |
|
@@ 376-389 (lines=14) @@
|
| 373 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 374 |
|
* @param array $parameters default : array("method"=>"get","preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 375 |
|
*/ |
| 376 |
|
public function ajaxOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 377 |
|
$preventDefault=true; |
| 378 |
|
$stopPropagation=true; |
| 379 |
|
$jsCallback=null; |
| 380 |
|
$attr="id"; |
| 381 |
|
$method="get"; |
| 382 |
|
$hasLoader=true; |
| 383 |
|
$immediatly=true; |
| 384 |
|
$jqueryDone="html"; |
| 385 |
|
$ajaxTransition=null; |
| 386 |
|
$params="{}"; |
| 387 |
|
extract($parameters); |
| 388 |
|
return $this->_add_event($element, $this->_ajax($method,$url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 389 |
|
} |
| 390 |
|
|
| 391 |
|
/** |
| 392 |
|
* Performs a get to $url on the click event on $element |
|
@@ 459-470 (lines=12) @@
|
| 456 |
|
* @param string $responseElement selector of the HTML element displaying the answer |
| 457 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null) |
| 458 |
|
*/ |
| 459 |
|
public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
| 460 |
|
$preventDefault=true; |
| 461 |
|
$stopPropagation=true; |
| 462 |
|
$jsCallback=null; |
| 463 |
|
$attr="id"; |
| 464 |
|
$hasLoader=true; |
| 465 |
|
$immediatly=true; |
| 466 |
|
$jqueryDone="html"; |
| 467 |
|
$ajaxTransition=null; |
| 468 |
|
extract($parameters); |
| 469 |
|
return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 470 |
|
} |
| 471 |
|
|
| 472 |
|
/** |
| 473 |
|
* Performs a post to $url on the click event fired on $element and pass the parameters $params |