@@ -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,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 | } |
@@ -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); |