@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | public function __construct(JsUtils $js) { |
18 | 18 | parent::__construct($js); |
19 | - $this->params=array ( |
|
19 | + $this->params=array( |
|
20 | 20 | "active" => 0 |
21 | 21 | ); |
22 | 22 | $this->uiName="accordion"; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @return $this |
113 | 113 | */ |
114 | 114 | public function setHeightStyle($value) { |
115 | - return $this->setParamCtrl("heightStyle", $value, array ( |
|
115 | + return $this->setParamCtrl("heightStyle", $value, array( |
|
116 | 116 | "auto", |
117 | 117 | "fill", |
118 | 118 | "content" |
@@ -52,7 +52,7 @@ |
||
52 | 52 | * @return $this |
53 | 53 | */ |
54 | 54 | public function setSource($source) { |
55 | - $source=str_ireplace(array ( |
|
55 | + $source=str_ireplace(array( |
|
56 | 56 | "\"", |
57 | 57 | "'" |
58 | 58 | ), "%quote%", $source); |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | */ |
13 | 13 | class Dialog extends SimpleComponent { |
14 | 14 | protected $attachTo; |
15 | - protected $buttons=array (); |
|
15 | + protected $buttons=array(); |
|
16 | 16 | |
17 | 17 | public function __construct(JsUtils $js) { |
18 | 18 | parent::__construct($js); |
19 | - $this->params=array ( |
|
19 | + $this->params=array( |
|
20 | 20 | "dialogClass" => "no-close" |
21 | 21 | ); |
22 | 22 | $this->addCancelBtn("Annuler"); |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | |
25 | 25 | public function getScript() { |
26 | 26 | $allParams=$this->params; |
27 | - $jsonButtons=array (); |
|
28 | - foreach ( $this->buttons as $button ) { |
|
27 | + $jsonButtons=array(); |
|
28 | + foreach ($this->buttons as $button) { |
|
29 | 29 | $jsonButtons []=$button->getParams(); |
30 | 30 | } |
31 | 31 | $allParams ["buttons"]=$jsonButtons; |
32 | - $this->jquery_code_for_compile []="$( '" . $this->attachTo . "' ).dialog(" . $this->getParamsAsJSON($allParams) . ");"; |
|
32 | + $this->jquery_code_for_compile []="$( '".$this->attachTo."' ).dialog(".$this->getParamsAsJSON($allParams).");"; |
|
33 | 33 | $result=implode("", $this->jquery_code_for_compile); |
34 | 34 | $result=str_ireplace("\"%", "", $result); |
35 | 35 | $result=str_ireplace("%\"", "", $result); |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | private function insertBtn($insert, $position=NULL) { |
62 | - if ($position != NULL) { |
|
62 | + if ($position!=NULL) { |
|
63 | 63 | $this->buttons=array_splice($this->buttons, $position, 0, $insert); |
64 | - } else { |
|
64 | + }else { |
|
65 | 65 | $this->buttons []=$insert; |
66 | 66 | } |
67 | 67 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | private function addFunction($jsCode) { |
18 | 18 | if (!Text::startsWith($jsCode, "function")) |
19 | - $jsCode="%function(){" . $jsCode . "}%"; |
|
19 | + $jsCode="%function(){".$jsCode."}%"; |
|
20 | 20 | return $jsCode; |
21 | 21 | } |
22 | 22 | |
@@ -43,6 +43,6 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | public static function submitButton(JsUtils $js, $url, $form, $responseElement, $caption="Okay") { |
46 | - return new DialogButton($caption, $js->postForm($url, $form, $responseElement) . ";$( this ).dialog( 'close' );"); |
|
46 | + return new DialogButton($caption, $js->postForm($url, $form, $responseElement).";$( this ).dialog( 'close' );"); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(JsUtils $js) { |
16 | 16 | parent::__construct($js); |
17 | - $this->params=array ( |
|
17 | + $this->params=array( |
|
18 | 18 | "value" => 50 |
19 | 19 | ); |
20 | 20 | $this->uiName="progressbar"; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @param string $value default : swing |
31 | 31 | */ |
32 | 32 | public function setEasing($value) { |
33 | - $this->setParamCtrl("easing", $value, array ( |
|
33 | + $this->setParamCtrl("easing", $value, array( |
|
34 | 34 | "linear", |
35 | 35 | "swing", |
36 | 36 | "easeInQuad", |
@@ -74,7 +74,7 @@ |
||
74 | 74 | protected function setParamCtrl($key, $value, $typeCtrl) { |
75 | 75 | if (!$typeCtrl($value)) { |
76 | 76 | throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position"); |
77 | - } else |
|
77 | + }else |
|
78 | 78 | $this->setParam($key, $value); |
79 | 79 | } |
80 | 80 |
@@ -268,8 +268,8 @@ discard block |
||
268 | 268 | * @param string $tagName container tagName |
269 | 269 | * @return HtmlListgroup |
270 | 270 | */ |
271 | - public function htmlListgroup($identifier,$items=array(),$tagName="ul"){ |
|
272 | - $listGroup=new HtmlListgroup($identifier,$tagName); |
|
271 | + public function htmlListgroup($identifier, $items=array(), $tagName="ul") { |
|
272 | + $listGroup=new HtmlListgroup($identifier, $tagName); |
|
273 | 273 | $listGroup->addItems($items); |
274 | 274 | return $this->addHtmlComponent($listGroup); |
275 | 275 | } |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | * @param string $onClick |
295 | 295 | * @return HtmlSplitbutton |
296 | 296 | */ |
297 | - public function htmlSplitbutton($identifier,$value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) { |
|
298 | - return $this->addHtmlComponent(new HtmlSplitbutton($identifier, $value, $items, $cssStyle,$onClick)); |
|
297 | + public function htmlSplitbutton($identifier, $value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) { |
|
298 | + return $this->addHtmlComponent(new HtmlSplitbutton($identifier, $value, $items, $cssStyle, $onClick)); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * @param string $identifier |
304 | 304 | * @return HtmlInputgroup |
305 | 305 | */ |
306 | - public function htmlInputgroup($identifier){ |
|
306 | + public function htmlInputgroup($identifier) { |
|
307 | 307 | return $this->addHtmlComponent(new HtmlInputgroup($identifier)); |
308 | 308 | } |
309 | 309 | |
@@ -315,8 +315,8 @@ discard block |
||
315 | 315 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
316 | 316 | * @return HtmlBreadcrumbs |
317 | 317 | */ |
318 | - public function htmlBreadcrumbs($identifier,$elements=array(),$autoActive=true,$hrefFunction=NULL){ |
|
319 | - return $this->addHtmlComponent(new HtmlBreadcrumbs($identifier,$elements,$autoActive,$hrefFunction)); |
|
318 | + public function htmlBreadcrumbs($identifier, $elements=array(), $autoActive=true, $hrefFunction=NULL) { |
|
319 | + return $this->addHtmlComponent(new HtmlBreadcrumbs($identifier, $elements, $autoActive, $hrefFunction)); |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | /** |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | * @param int $active The active page |
329 | 329 | * @return HtmlPagination |
330 | 330 | */ |
331 | - public function htmlPagination($identifier,$from=1,$to=1,$active=NULL,$countVisible=NULL){ |
|
332 | - return $this->addHtmlComponent(new HtmlPagination($identifier,$from,$to,$active,$countVisible)); |
|
331 | + public function htmlPagination($identifier, $from=1, $to=1, $active=NULL, $countVisible=NULL) { |
|
332 | + return $this->addHtmlComponent(new HtmlPagination($identifier, $from, $to, $active, $countVisible)); |
|
333 | 333 | } |
334 | 334 | } |
335 | 335 | \ No newline at end of file |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | protected $_bootstrap; |
22 | 22 | protected $libraryFile; |
23 | 23 | protected $_javascript_folder='js'; |
24 | - protected $jquery_code_for_load=array (); |
|
25 | - protected $jquery_code_for_compile=array (); |
|
24 | + protected $jquery_code_for_load=array(); |
|
25 | + protected $jquery_code_for_compile=array(); |
|
26 | 26 | protected $jquery_corner_active=FALSE; |
27 | 27 | protected $jquery_table_sorter_active=FALSE; |
28 | 28 | protected $jquery_table_sorter_pager_active=FALSE; |
29 | 29 | protected $ajaxLoader='<span></span><span></span><span></span><span></span><span></span>'; |
30 | - protected $jquery_events=array ( |
|
31 | - "bind","blur","change","click","dblclick","delegate","die","error","focus","focusin","focusout","hover","keydown","keypress","keyup","live","load","mousedown","mousseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","off","on","one","ready","resize","scroll","select","submit","toggle","trigger","triggerHandler","undind","undelegate","unload" |
|
30 | + protected $jquery_events=array( |
|
31 | + "bind", "blur", "change", "click", "dblclick", "delegate", "die", "error", "focus", "focusin", "focusout", "hover", "keydown", "keypress", "keyup", "live", "load", "mousedown", "mousseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "off", "on", "one", "ready", "resize", "scroll", "select", "submit", "toggle", "trigger", "triggerHandler", "undind", "undelegate", "unload" |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | public function setDi($di) { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function _click($element='this', $js=array(), $ret_false=TRUE) { |
163 | 163 | if (!is_array($js)) { |
164 | - $js=array ( |
|
164 | + $js=array( |
|
165 | 165 | $js |
166 | 166 | ); |
167 | 167 | } |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | */ |
357 | 357 | public function _output($array_js='') { |
358 | 358 | if (!is_array($array_js)) { |
359 | - $array_js=array ( |
|
359 | + $array_js=array( |
|
360 | 360 | $array_js |
361 | 361 | ); |
362 | 362 | } |
363 | 363 | |
364 | - foreach ( $array_js as $js ) { |
|
364 | + foreach ($array_js as $js) { |
|
365 | 365 | $this->jquery_code_for_compile[]="\t$js\n"; |
366 | 366 | } |
367 | 367 | } |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | * @param boolean $immediatly defers the execution if set to false |
417 | 417 | * @return string |
418 | 418 | */ |
419 | - public function after($element='this', $value='', $immediatly=false){ |
|
419 | + public function after($element='this', $value='', $immediatly=false) { |
|
420 | 420 | $element=$this->_prep_element($element); |
421 | 421 | $value=$this->_prep_value($value); |
422 | 422 | $str="$({$element}).after({$value});"; |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | if (isset($value)) { |
438 | 438 | $value=$this->_prep_value($value); |
439 | 439 | $str="$({$element}).attr(\"$attributeName\",{$value});"; |
440 | - } else |
|
440 | + }else |
|
441 | 441 | $str="$({$element}).attr(\"$attributeName\");"; |
442 | 442 | if ($immediatly) |
443 | 443 | $this->jquery_code_for_compile[]=$str; |
@@ -451,12 +451,12 @@ discard block |
||
451 | 451 | * @param string $param |
452 | 452 | * @param boolean $immediatly delayed if false |
453 | 453 | */ |
454 | - public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) { |
|
454 | + public function _genericCallValue($jQueryCall, $element='this', $param="", $immediatly=false) { |
|
455 | 455 | $element=$this->_prep_element($element); |
456 | 456 | if (isset($param)) { |
457 | 457 | $param=$this->_prep_value($param); |
458 | 458 | $str="$({$element}).{$jQueryCall}({$param});"; |
459 | - } else |
|
459 | + }else |
|
460 | 460 | $str="$({$element}).{$jQueryCall}();"; |
461 | 461 | if ($immediatly) |
462 | 462 | $this->jquery_code_for_compile[]=$str; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | * @param boolean $immediatly delayed if false |
471 | 471 | * @return string |
472 | 472 | */ |
473 | - public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) { |
|
473 | + public function _genericCallElement($jQueryCall, $to='this', $element, $immediatly=false) { |
|
474 | 474 | $to=$this->_prep_element($to); |
475 | 475 | $element=$this->_prep_element($element); |
476 | 476 | $str="$({$to}).{$jQueryCall}({$element});"; |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | |
497 | 497 | $animations="\t\t\t"; |
498 | 498 | if (is_array($params)) { |
499 | - foreach ( $params as $param => $value ) { |
|
499 | + foreach ($params as $param => $value) { |
|
500 | 500 | $animations.=$param.': \''.$value.'\', '; |
501 | 501 | } |
502 | 502 | } |
@@ -768,12 +768,12 @@ discard block |
||
768 | 768 | */ |
769 | 769 | public function sortable($element, $options=array()) { |
770 | 770 | if (count($options)>0) { |
771 | - $sort_options=array (); |
|
772 | - foreach ( $options as $k => $v ) { |
|
771 | + $sort_options=array(); |
|
772 | + foreach ($options as $k => $v) { |
|
773 | 773 | $sort_options[]="\n\t\t".$k.': '.$v.""; |
774 | 774 | } |
775 | 775 | $sort_options=implode(",", $sort_options); |
776 | - } else { |
|
776 | + }else { |
|
777 | 777 | $sort_options=''; |
778 | 778 | } |
779 | 779 | |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | |
855 | 855 | // External references |
856 | 856 | $external_scripts=implode('', $this->jquery_code_for_load); |
857 | - extract(array ( |
|
857 | + extract(array( |
|
858 | 858 | 'library_src' => $external_scripts |
859 | 859 | )); |
860 | 860 | |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | * @return void |
888 | 888 | */ |
889 | 889 | public function _clear_compile() { |
890 | - $this->jquery_code_for_compile=array (); |
|
890 | + $this->jquery_code_for_compile=array(); |
|
891 | 891 | } |
892 | 892 | |
893 | 893 | // -------------------------------------------------------------------- |
@@ -899,12 +899,12 @@ discard block |
||
899 | 899 | */ |
900 | 900 | public function _document_ready($js) { |
901 | 901 | if (!is_array($js)) { |
902 | - $js=array ( |
|
902 | + $js=array( |
|
903 | 903 | $js |
904 | 904 | ); |
905 | 905 | } |
906 | 906 | |
907 | - foreach ( $js as $script ) { |
|
907 | + foreach ($js as $script) { |
|
908 | 908 | $this->jquery_code_for_compile[]=$script; |
909 | 909 | } |
910 | 910 | } |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | * @return string |
921 | 921 | */ |
922 | 922 | public function _prep_element($element) { |
923 | - if (strrpos($element, 'this')===false&&strrpos($element, 'event')===false) { |
|
923 | + if (strrpos($element, 'this')===false && strrpos($element, 'event')===false) { |
|
924 | 924 | $element='"'.addslashes($element).'"'; |
925 | 925 | } |
926 | 926 | return $element; |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | if (is_array($value)) { |
939 | 939 | $value=implode(",", $value); |
940 | 940 | } |
941 | - if (strrpos($value, 'this')===false&&strrpos($value, 'event')===false) { |
|
941 | + if (strrpos($value, 'this')===false && strrpos($value, 'event')===false) { |
|
942 | 942 | $value='"'.$value.'"'; |
943 | 943 | } |
944 | 944 | return $value; |
@@ -953,8 +953,8 @@ discard block |
||
953 | 953 | * @return string |
954 | 954 | */ |
955 | 955 | private function _validate_speed($speed) { |
956 | - if (in_array($speed, array ( |
|
957 | - 'slow','normal','fast' |
|
956 | + if (in_array($speed, array( |
|
957 | + 'slow', 'normal', 'fast' |
|
958 | 958 | ))) { |
959 | 959 | $speed='"'.$speed.'"'; |
960 | 960 | } elseif (preg_match("/[^0-9]/", $speed)) { |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | $loading_notifier='<div class="ajax-loader">'; |
969 | 969 | if ($this->ajaxLoader=='') { |
970 | 970 | $loading_notifier.="Loading..."; |
971 | - } else { |
|
971 | + }else { |
|
972 | 972 | $loading_notifier.=$this->ajaxLoader; |
973 | 973 | } |
974 | 974 | $loading_notifier.='</div>'; |
@@ -976,18 +976,18 @@ discard block |
||
976 | 976 | $retour.="\t\t$(\"{$responseElement}\").prepend('{$loading_notifier}');\n"; |
977 | 977 | } |
978 | 978 | |
979 | - public function _get($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
|
980 | - return $this->_ajax("get", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
|
979 | + public function _get($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true, $immediatly=false) { |
|
980 | + return $this->_ajax("get", $url, $params, $responseElement, $jsCallback, $attr, $hasLoader, $immediatly); |
|
981 | 981 | } |
982 | - public function _post($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
|
983 | - return $this->_ajax("post", $url,$params,$responseElement,$jsCallback,$attr,$hasLoader,$immediatly); |
|
982 | + public function _post($url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true, $immediatly=false) { |
|
983 | + return $this->_ajax("post", $url, $params, $responseElement, $jsCallback, $attr, $hasLoader, $immediatly); |
|
984 | 984 | } |
985 | 985 | |
986 | - protected function _ajax($method,$url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
|
987 | - if(JString::isNull($params)){$params="{}";} |
|
986 | + protected function _ajax($method, $url, $params="{}", $responseElement="", $jsCallback=NULL, $attr="id", $hasLoader=true, $immediatly=false) { |
|
987 | + if (JString::isNull($params)) {$params="{}"; } |
|
988 | 988 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
989 | 989 | $retour=$this->_getAjaxUrl($url, $attr); |
990 | - if($hasLoader===true){ |
|
990 | + if ($hasLoader===true) { |
|
991 | 991 | $this->addLoading($retour, $responseElement); |
992 | 992 | } |
993 | 993 | $retour.="$.".$method."(url,".$params.").done(function( data ) {\n"; |
@@ -997,19 +997,19 @@ discard block |
||
997 | 997 | return $retour; |
998 | 998 | } |
999 | 999 | |
1000 | - protected function _getAjaxUrl($url,$attr){ |
|
1000 | + protected function _getAjaxUrl($url, $attr) { |
|
1001 | 1001 | $url=$this->_correctAjaxUrl($url); |
1002 | 1002 | $retour="url='".$url."';\n"; |
1003 | - if(JString::isNotNull($attr)){ |
|
1003 | + if (JString::isNotNull($attr)) { |
|
1004 | 1004 | if ($attr=="value") |
1005 | 1005 | $retour.="url=url+'/'+$(this).val();\n"; |
1006 | - else if($attr!=null && $attr!=="") |
|
1006 | + else if ($attr!=null && $attr!=="") |
|
1007 | 1007 | $retour.="url=url+'/'+$(this).attr('".$attr."');\n"; |
1008 | 1008 | } |
1009 | 1009 | return $retour; |
1010 | 1010 | } |
1011 | 1011 | |
1012 | - protected function _getOnAjaxDone($responseElement,$jsCallback){ |
|
1012 | + protected function _getOnAjaxDone($responseElement, $jsCallback) { |
|
1013 | 1013 | $retour=""; |
1014 | 1014 | if ($responseElement!=="") { |
1015 | 1015 | $responseElement=$this->_prep_value($responseElement); |
@@ -1022,7 +1022,7 @@ discard block |
||
1022 | 1022 | protected function _correctAjaxUrl($url) { |
1023 | 1023 | if (PhalconUtils::endsWith($url, "/")) |
1024 | 1024 | $url=substr($url, 0, strlen($url)-1); |
1025 | - if (strncmp($url, 'http://', 7)!=0&&strncmp($url, 'https://', 8)!=0) { |
|
1025 | + if (strncmp($url, 'http://', 7)!=0 && strncmp($url, 'https://', 8)!=0) { |
|
1026 | 1026 | $url=$this->_di->get("url")->get($url); |
1027 | 1027 | } |
1028 | 1028 | return $url; |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | * @param string $method Method use |
1036 | 1036 | * @param string $jsCallback javascript code to execute after the request |
1037 | 1037 | */ |
1038 | - public function _json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document",$immediatly=false) { |
|
1038 | + public function _json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document", $immediatly=false) { |
|
1039 | 1039 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
1040 | 1040 | $retour=$this->_getAjaxUrl($url, $attr); |
1041 | 1041 | $retour.="$.{$method}(url,".$params.").done(function( data ) {\n"; |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | * @param string $url the request address |
1055 | 1055 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get") |
1056 | 1056 | */ |
1057 | - public function _jsonOn($event,$element, $url,$parameters=array()) { |
|
1057 | + public function _jsonOn($event, $element, $url, $parameters=array()) { |
|
1058 | 1058 | $preventDefault=true; |
1059 | 1059 | $stopPropagation=true; |
1060 | 1060 | $jsCallback=null; |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | $context="document"; |
1064 | 1064 | $params="{}"; |
1065 | 1065 | extract($parameters); |
1066 | - return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation); |
|
1066 | + return $this->_add_event($element, $this->_json($url, $method, $params, $jsCallback, $attr, $context), $event, $preventDefault, $stopPropagation); |
|
1067 | 1067 | } |
1068 | 1068 | |
1069 | 1069 | /** |
@@ -1073,7 +1073,7 @@ discard block |
||
1073 | 1073 | * @param string $method Method use |
1074 | 1074 | * @param string $jsCallback javascript code to execute after the request |
1075 | 1075 | */ |
1076 | - public function _jsonArray($maskSelector, $url, $method="get", $params="{}", $jsCallback=NULL, $attr="id",$immediatly=false) { |
|
1076 | + public function _jsonArray($maskSelector, $url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $immediatly=false) { |
|
1077 | 1077 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
1078 | 1078 | $retour=$this->_getAjaxUrl($url, $attr); |
1079 | 1079 | $retour.="$.{$method}(url,".$params.").done(function( data ) {\n"; |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | * @param string $url the request address |
1092 | 1092 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get") |
1093 | 1093 | */ |
1094 | - public function _jsonArrayOn($event,$element, $maskSelector,$url,$parameters=array()) { |
|
1094 | + public function _jsonArrayOn($event, $element, $maskSelector, $url, $parameters=array()) { |
|
1095 | 1095 | $preventDefault=true; |
1096 | 1096 | $stopPropagation=true; |
1097 | 1097 | $jsCallback=null; |
@@ -1099,14 +1099,14 @@ discard block |
||
1099 | 1099 | $method="get"; |
1100 | 1100 | $params="{}"; |
1101 | 1101 | extract($parameters); |
1102 | - return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $attr), $event, $preventDefault, $stopPropagation); |
|
1102 | + return $this->_add_event($element, $this->_jsonArray($maskSelector, $url, $method, $params, $jsCallback, $attr), $event, $preventDefault, $stopPropagation); |
|
1103 | 1103 | } |
1104 | 1104 | |
1105 | - public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true,$immediatly=false) { |
|
1105 | + public function _postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true, $immediatly=false) { |
|
1106 | 1106 | $jsCallback=isset($jsCallback) ? $jsCallback : ""; |
1107 | 1107 | $retour=$this->_getAjaxUrl($url, $attr); |
1108 | 1108 | $retour.="\nvar params=$('#".$form."').serialize();\n"; |
1109 | - if($hasLoader===true){ |
|
1109 | + if ($hasLoader===true) { |
|
1110 | 1110 | $this->addLoading($retour, $responseElement); |
1111 | 1111 | } |
1112 | 1112 | $retour.="$.post(url,params).done(function( data ) {\n"; |
@@ -1133,14 +1133,14 @@ discard block |
||
1133 | 1133 | * @param string $responseElement |
1134 | 1134 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true) |
1135 | 1135 | */ |
1136 | - public function _getOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
1136 | + public function _getOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
1137 | 1137 | $preventDefault=true; |
1138 | 1138 | $stopPropagation=true; |
1139 | 1139 | $jsCallback=null; |
1140 | 1140 | $attr="id"; |
1141 | 1141 | $hasLoader=true; |
1142 | 1142 | extract($parameters); |
1143 | - return $this->_add_event($element, $this->_get($url, $params, $responseElement, $jsCallback, $attr,$hasLoader), $event, $preventDefault, $stopPropagation); |
|
1143 | + return $this->_add_event($element, $this->_get($url, $params, $responseElement, $jsCallback, $attr, $hasLoader), $event, $preventDefault, $stopPropagation); |
|
1144 | 1144 | } |
1145 | 1145 | |
1146 | 1146 | /** |
@@ -1153,14 +1153,14 @@ discard block |
||
1153 | 1153 | * @param string $responseElement |
1154 | 1154 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true) |
1155 | 1155 | */ |
1156 | - public function _postOn($event,$element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
1156 | + public function _postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) { |
|
1157 | 1157 | $preventDefault=true; |
1158 | 1158 | $stopPropagation=true; |
1159 | 1159 | $jsCallback=null; |
1160 | 1160 | $attr="id"; |
1161 | 1161 | $hasLoader=true; |
1162 | 1162 | extract($parameters); |
1163 | - return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr,$hasLoader), $event, $preventDefault, $stopPropagation); |
|
1163 | + return $this->_add_event($element, $this->_post($url, $params, $responseElement, $jsCallback, $attr, $hasLoader), $event, $preventDefault, $stopPropagation); |
|
1164 | 1164 | } |
1165 | 1165 | |
1166 | 1166 | /** |
@@ -1173,7 +1173,7 @@ discard block |
||
1173 | 1173 | * @param string $responseElement |
1174 | 1174 | * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"validation"=>false,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true) |
1175 | 1175 | */ |
1176 | - public function _postFormOn($event,$element, $url, $form, $responseElement="", $parameters=array()) { |
|
1176 | + public function _postFormOn($event, $element, $url, $form, $responseElement="", $parameters=array()) { |
|
1177 | 1177 | $preventDefault=true; |
1178 | 1178 | $stopPropagation=true; |
1179 | 1179 | $validation=false; |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | $attr="id"; |
1182 | 1182 | $hasLoader=true; |
1183 | 1183 | extract($parameters); |
1184 | - return $this->_add_event($element, $this->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr,$hasLoader), $event, $preventDefault, $stopPropagation); |
|
1184 | + return $this->_add_event($element, $this->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr, $hasLoader), $event, $preventDefault, $stopPropagation); |
|
1185 | 1185 | } |
1186 | 1186 | |
1187 | 1187 | /** |