@@ -14,6 +14,6 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(JsUtils $js) { |
16 | 16 | parent::__construct($js); |
17 | - $this->uiName = "menu"; |
|
17 | + $this->uiName="menu"; |
|
18 | 18 | } |
19 | 19 | } |
@@ -16,10 +16,10 @@ 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 | - $this->uiName = "accordion"; |
|
22 | + $this->uiName="accordion"; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function setAnimate($value) { |
56 | 56 | if ($value instanceof Animation) |
57 | - $value = $value->getParams(); |
|
57 | + $value=$value->getParams(); |
|
58 | 58 | else if (is_string($value)) { |
59 | - $animation = new Animation(); |
|
59 | + $animation=new Animation(); |
|
60 | 60 | $animation->setEasing($value); |
61 | 61 | } |
62 | 62 | $this->setParam("animate", $value); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | public function setIcons($value) { |
147 | 147 | if (is_string($value)) { |
148 | 148 | if (JString::startsWith($value, "{")); |
149 | - $value = "%" . $value . "%"; |
|
149 | + $value="%".$value."%"; |
|
150 | 150 | } |
151 | 151 | $this->setParam("icons", $value); |
152 | 152 | return $this; |
@@ -53,9 +53,9 @@ |
||
53 | 53 | * @return $this |
54 | 54 | */ |
55 | 55 | public function setAnimate($value) { |
56 | - if ($value instanceof Animation) |
|
57 | - $value = $value->getParams(); |
|
58 | - else if (is_string($value)) { |
|
56 | + if ($value instanceof Animation) { |
|
57 | + $value = $value->getParams(); |
|
58 | + } else if (is_string($value)) { |
|
59 | 59 | $animation = new Animation(); |
60 | 60 | $animation->setEasing($value); |
61 | 61 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(JsUtils $js) { |
16 | 16 | parent::__construct($js); |
17 | - $this->uiName = "selectmenu"; |
|
17 | + $this->uiName="selectmenu"; |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(JsUtils $js) { |
16 | 16 | parent::__construct($js); |
17 | - $this->uiName = "slider"; |
|
17 | + $this->uiName="slider"; |
|
18 | 18 | $this->setParam("value", 0); |
19 | 19 | } |
20 | 20 |
@@ -14,9 +14,9 @@ |
||
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 | - $this->uiName = "progressbar"; |
|
20 | + $this->uiName="progressbar"; |
|
21 | 21 | } |
22 | 22 | } |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | class DialogButton extends BaseComponent { |
15 | 15 | |
16 | 16 | private function addFunction($jsCode) { |
17 | - if (! JString::startsWith($jsCode, "function")) |
|
18 | - $jsCode = "%function(){" . $jsCode . "}%"; |
|
17 | + if (!JString::startsWith($jsCode, "function")) |
|
18 | + $jsCode="%function(){".$jsCode."}%"; |
|
19 | 19 | return $jsCode; |
20 | 20 | } |
21 | 21 | |
22 | - public function __construct($caption, $jsCode, $event = "click") { |
|
22 | + public function __construct($caption, $jsCode, $event="click") { |
|
23 | 23 | parent::__construct(NULL); |
24 | - $this->params["text"] = $caption; |
|
25 | - $this->params[$event] = $this->addFunction($jsCode); |
|
24 | + $this->params["text"]=$caption; |
|
25 | + $this->params[$event]=$this->addFunction($jsCode); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function __toString() { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return json_encode($this->params, JSON_UNESCAPED_SLASHES); |
38 | 38 | } |
39 | 39 | |
40 | - public static function cancelButton($caption = "Annuler") { |
|
40 | + public static function cancelButton($caption="Annuler") { |
|
41 | 41 | return new DialogButton($caption, "$( this ).dialog( 'close' );"); |
42 | 42 | } |
43 | 43 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * default : array("params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>NULL,"headers"=>null) |
53 | 53 | * @return DialogButton |
54 | 54 | */ |
55 | - public static function submitButton(JsUtils $js, $url, $form, $responseElement, $caption = "Okay", $parameters = []) { |
|
56 | - return new DialogButton($caption, $js->postFormDeferred($url, $form, $responseElement, $parameters) . ";$( this ).dialog( 'close' );"); |
|
55 | + public static function submitButton(JsUtils $js, $url, $form, $responseElement, $caption="Okay", $parameters=[]) { |
|
56 | + return new DialogButton($caption, $js->postFormDeferred($url, $form, $responseElement, $parameters).";$( this ).dialog( 'close' );"); |
|
57 | 57 | } |
58 | 58 | } |
@@ -14,8 +14,9 @@ |
||
14 | 14 | class DialogButton extends BaseComponent { |
15 | 15 | |
16 | 16 | private function addFunction($jsCode) { |
17 | - if (! JString::startsWith($jsCode, "function")) |
|
18 | - $jsCode = "%function(){" . $jsCode . "}%"; |
|
17 | + if (! JString::startsWith($jsCode, "function")) { |
|
18 | + $jsCode = "%function(){" . $jsCode . "}%"; |
|
19 | + } |
|
19 | 20 | return $jsCode; |
20 | 21 | } |
21 | 22 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(JsUtils $js) { |
16 | 16 | parent::__construct($js); |
17 | - $this->uiName = "buttonset"; |
|
17 | + $this->uiName="buttonset"; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | class Position extends BaseComponent { |
13 | 13 | |
14 | - public function __construct($my = "left top", $at = "left bottom", $collision = "none", $within = "window") { |
|
14 | + public function __construct($my="left top", $at="left bottom", $collision="none", $within="window") { |
|
15 | 15 | $this->setParam("my", $my); |
16 | 16 | $this->setParam("at", $at); |
17 | 17 | $this->setParam("collision", $collision); |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | protected function setParamCtrl($key, $value, $typeCtrl) { |
85 | - if (! $typeCtrl($value)) { |
|
86 | - throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position"); |
|
85 | + if (!$typeCtrl($value)) { |
|
86 | + throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position"); |
|
87 | 87 | } else |
88 | 88 | $this->setParam($key, $value); |
89 | 89 | } |
@@ -84,8 +84,9 @@ |
||
84 | 84 | protected function setParamCtrl($key, $value, $typeCtrl) { |
85 | 85 | if (! $typeCtrl($value)) { |
86 | 86 | throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position"); |
87 | - } else |
|
88 | - $this->setParam($key, $value); |
|
87 | + } else { |
|
88 | + $this->setParam($key, $value); |
|
89 | + } |
|
89 | 90 | } |
90 | 91 | |
91 | 92 | /* |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | class Animation extends BaseComponent { |
13 | 13 | |
14 | - public function __construct($duration = 400, $easing = "swing", $queue = false) { |
|
14 | + public function __construct($duration=400, $easing="swing", $queue=false) { |
|
15 | 15 | $this->setDuration($duration); |
16 | 16 | $this->setEasing($easing); |
17 | 17 | $this->setQueue($queue); |