|
@@ 203-214 (lines=12) @@
|
| 200 |
|
* @param string $url the request address |
| 201 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true) |
| 202 |
|
*/ |
| 203 |
|
public function jsonOn($event,$element, $url,$parameters=array()) { |
| 204 |
|
$preventDefault=true; |
| 205 |
|
$stopPropagation=true; |
| 206 |
|
$jsCallback=null; |
| 207 |
|
$attr="id"; |
| 208 |
|
$method="get"; |
| 209 |
|
$context="document"; |
| 210 |
|
$params="{}"; |
| 211 |
|
$immediatly=true; |
| 212 |
|
extract($parameters); |
| 213 |
|
return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly); |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
/** |
| 217 |
|
* Prepares an ajax request delayed and receives the JSON data types by assigning DOM elements with the same name |
|
@@ 297-309 (lines=13) @@
|
| 294 |
|
* @param string $url the request url |
| 295 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","rowClass"=>"_json","immediatly"=>true) |
| 296 |
|
*/ |
| 297 |
|
public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) { |
| 298 |
|
$preventDefault=true; |
| 299 |
|
$stopPropagation=true; |
| 300 |
|
$jsCallback=null; |
| 301 |
|
$attr="id"; |
| 302 |
|
$method="get"; |
| 303 |
|
$context = null; |
| 304 |
|
$params="{}"; |
| 305 |
|
$immediatly=true; |
| 306 |
|
$rowClass="_json"; |
| 307 |
|
extract($parameters); |
| 308 |
|
return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $rowClass, $context,$attr), $event, $preventDefault, $stopPropagation,$immediatly); |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
/** |
| 312 |
|
* Prepares a Get ajax request |
|
@@ 335-347 (lines=13) @@
|
| 332 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 333 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 334 |
|
*/ |
| 335 |
|
public function getOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 336 |
|
$preventDefault=true; |
| 337 |
|
$stopPropagation=true; |
| 338 |
|
$jsCallback=null; |
| 339 |
|
$attr="id"; |
| 340 |
|
$hasLoader=true; |
| 341 |
|
$immediatly=true; |
| 342 |
|
$jqueryDone="html"; |
| 343 |
|
$ajaxTransition=null; |
| 344 |
|
$params="{}"; |
| 345 |
|
extract($parameters); |
| 346 |
|
return $this->_add_event($element, $this->_get($url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 347 |
|
} |
| 348 |
|
|
| 349 |
|
/** |
| 350 |
|
* Performs an ajax request to $url on the event $event on $element |
|
@@ 358-371 (lines=14) @@
|
| 355 |
|
* @param string $responseElement The selector of the HTML element displaying the answer |
| 356 |
|
* @param array $parameters default : array("method"=>"get","preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html") |
| 357 |
|
*/ |
| 358 |
|
public function ajaxOn($event, $element, $url, $responseElement="", $parameters=array()) { |
| 359 |
|
$preventDefault=true; |
| 360 |
|
$stopPropagation=true; |
| 361 |
|
$jsCallback=null; |
| 362 |
|
$attr="id"; |
| 363 |
|
$method="get"; |
| 364 |
|
$hasLoader=true; |
| 365 |
|
$immediatly=true; |
| 366 |
|
$jqueryDone="html"; |
| 367 |
|
$ajaxTransition=null; |
| 368 |
|
$params="{}"; |
| 369 |
|
extract($parameters); |
| 370 |
|
return $this->_add_event($element, $this->_ajax($method,$url, $params,$responseElement,$jsCallback,$attr, $hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 371 |
|
} |
| 372 |
|
|
| 373 |
|
/** |
| 374 |
|
* Performs a get to $url on the click event on $element |
|
@@ 441-452 (lines=12) @@
|
| 438 |
|
* @param string $responseElement selector of the HTML element displaying the answer |
| 439 |
|
* @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null) |
| 440 |
|
*/ |
| 441 |
|
public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
| 442 |
|
$preventDefault=true; |
| 443 |
|
$stopPropagation=true; |
| 444 |
|
$jsCallback=null; |
| 445 |
|
$attr="id"; |
| 446 |
|
$hasLoader=true; |
| 447 |
|
$immediatly=true; |
| 448 |
|
$jqueryDone="html"; |
| 449 |
|
$ajaxTransition=null; |
| 450 |
|
extract($parameters); |
| 451 |
|
return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader,$jqueryDone,$ajaxTransition), $event, $preventDefault, $stopPropagation,$immediatly); |
| 452 |
|
} |
| 453 |
|
|
| 454 |
|
/** |
| 455 |
|
* Performs a post to $url on the click event fired on $element and pass the parameters $params |