@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -return array ( |
|
| 3 | - "JQuery" => array ( |
|
| 4 | - "MaxCDN" => array ( |
|
| 2 | +return array( |
|
| 3 | + "JQuery" => array( |
|
| 4 | + "MaxCDN" => array( |
|
| 5 | 5 | "url" => "http://code.jquery.com/jquery-%version%.min.js", |
| 6 | - "versions" => array ( |
|
| 6 | + "versions" => array( |
|
| 7 | 7 | "2.1.4", |
| 8 | 8 | "2.1.3", |
| 9 | 9 | "1.11.2" |
| 10 | 10 | ) |
| 11 | 11 | ), |
| 12 | - "Google" => array ( |
|
| 12 | + "Google" => array( |
|
| 13 | 13 | "url" => "https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js", |
| 14 | - "versions" => array ( |
|
| 14 | + "versions" => array( |
|
| 15 | 15 | "2.1.4", |
| 16 | 16 | "2.1.3", |
| 17 | 17 | "2.1.1", |
@@ -20,17 +20,17 @@ discard block |
||
| 20 | 20 | ) |
| 21 | 21 | ) |
| 22 | 22 | ), |
| 23 | - "JQueryUI" => array ( |
|
| 24 | - "MaxCDN" => array ( |
|
| 23 | + "JQueryUI" => array( |
|
| 24 | + "MaxCDN" => array( |
|
| 25 | 25 | "core" => "http://code.jquery.com/ui/%version%/jquery-ui.min.js", |
| 26 | 26 | "css" => "http://code.jquery.com/ui/%version%/themes/%theme%/jquery-ui.css", |
| 27 | - "versions" => array ( |
|
| 27 | + "versions" => array( |
|
| 28 | 28 | "1.11.4", |
| 29 | 29 | "1.11.3", |
| 30 | 30 | "1.11.2", |
| 31 | 31 | "1.10.4" |
| 32 | 32 | ), |
| 33 | - "themes" => array ( |
|
| 33 | + "themes" => array( |
|
| 34 | 34 | "black-tie", |
| 35 | 35 | "blitzer", |
| 36 | 36 | "cupertino", |
@@ -57,10 +57,10 @@ discard block |
||
| 57 | 57 | "vader" |
| 58 | 58 | ) |
| 59 | 59 | ), |
| 60 | - "Google" => array ( |
|
| 60 | + "Google" => array( |
|
| 61 | 61 | "core" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/jquery-ui.min.js", |
| 62 | 62 | "css" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/themes/%theme%/jquery-ui.css", |
| 63 | - "versions" => array ( |
|
| 63 | + "versions" => array( |
|
| 64 | 64 | "1.11.4", |
| 65 | 65 | "1.11.3", |
| 66 | 66 | "1.11.2", |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | "1.10.4", |
| 70 | 70 | "1.10.0" |
| 71 | 71 | ), |
| 72 | - "themes" => array ( |
|
| 72 | + "themes" => array( |
|
| 73 | 73 | "black-tie", |
| 74 | 74 | "blitzer", |
| 75 | 75 | "cupertino", |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | ) |
| 98 | 98 | ) |
| 99 | 99 | ), |
| 100 | - "Bootstrap" => array ( |
|
| 101 | - "MaxCDN" => array ( |
|
| 100 | + "Bootstrap" => array( |
|
| 101 | + "MaxCDN" => array( |
|
| 102 | 102 | "core" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/js/bootstrap.min.js", |
| 103 | 103 | "css" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/css/bootstrap.min.css", |
| 104 | - "versions" => array ( |
|
| 104 | + "versions" => array( |
|
| 105 | 105 | "3.3.5" |
| 106 | 106 | ), |
| 107 | - "themes" => array () |
|
| 107 | + "themes" => array() |
|
| 108 | 108 | ) |
| 109 | 109 | ) |
| 110 | 110 | ); |
| 111 | 111 | \ No newline at end of file |
@@ -60,10 +60,10 @@ |
||
| 60 | 60 | |
| 61 | 61 | protected function replaceVersionAndTheme($url, $version, $theme) { |
| 62 | 62 | if (isset($theme)) |
| 63 | - return str_ireplace(array ( |
|
| 63 | + return str_ireplace(array( |
|
| 64 | 64 | "%theme%", |
| 65 | 65 | "%version%" |
| 66 | - ), array ( |
|
| 66 | + ), array( |
|
| 67 | 67 | $theme, |
| 68 | 68 | $version |
| 69 | 69 | ), $url); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | if ($stopPropagation===true) { |
| 31 | 31 | $result.="event.stopPropagation();\n"; |
| 32 | 32 | } |
| 33 | - switch($this->method) { |
|
| 33 | + switch ($this->method) { |
|
| 34 | 34 | case "get": |
| 35 | 35 | $result.=$js->getDeferred($url, $responseElement, $params, $callback, $attr); |
| 36 | 36 | break; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public static function getDefaultValue($array, $key, $default) { |
| 21 | 21 | if (array_key_exists($key, $array)) { |
| 22 | 22 | return $array [$key]; |
| 23 | - } else |
|
| 23 | + }else |
|
| 24 | 24 | return $default; |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | \ No newline at end of file |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Ajax\service; |
| 3 | 3 | class JString { |
| 4 | - public static function isNull($s){ |
|
| 4 | + public static function isNull($s) { |
|
| 5 | 5 | return (!isset($s) || NULL===$s || ""===$s); |
| 6 | 6 | } |
| 7 | - public static function isNotNull($s){ |
|
| 7 | + public static function isNotNull($s) { |
|
| 8 | 8 | return (isset($s) && NULL!==$s && ""!==$s); |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | \ No newline at end of file |
@@ -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 |