@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | public function __construct(JsUtils $js) { |
21 | 21 | parent::__construct($js); |
22 | - $this->tabs=array (); |
|
22 | + $this->tabs=array(); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function getTabs() { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getTab($index) { |
39 | - if ($index>0&&$index<sizeof($this->tabs)) |
|
39 | + if ($index>0 && $index<sizeof($this->tabs)) |
|
40 | 40 | return $this->tabs [$index]; |
41 | 41 | } |
42 | 42 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | protected function compileEvents() { |
68 | - foreach ( $this->events as $event => $jsCode ) { |
|
68 | + foreach ($this->events as $event => $jsCode) { |
|
69 | 69 | $this->jquery_code_for_compile []="$( \"".$this->collapsed."\" ).on(\"".$event."\" , function (e) {".$jsCode."});"; |
70 | 70 | } |
71 | 71 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * @see \Ajax\common\SimpleComponent::compileEvents() |
10 | 10 | */ |
11 | 11 | protected function compileEvents() { |
12 | - foreach ( $this->events as $event => $jsCode ) { |
|
12 | + foreach ($this->events as $event => $jsCode) { |
|
13 | 13 | if ($event==="buttonClick") { |
14 | 14 | $this->jquery_code_for_compile []="$( \"#split-".preg_replace('/[^a-zA-Z0-9\-.]/s', '', $this->attachTo)."\" ).on(\"click\" , function( event, data ) {".$jsCode."});"; |
15 | 15 | } else { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | - public function setPlaceHolder($value){ |
|
40 | + public function setPlaceHolder($value) { |
|
41 | 41 | $this->setProperty("placeholder", $value); |
42 | 42 | } |
43 | 43 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | if (!isset($id)) |
36 | 36 | if ($this->element->getTagName()==="a") |
37 | 37 | $id=$this->element->getProperty("href"); |
38 | - if (!isset($id)||$id==="#") { |
|
38 | + if (!isset($id) || $id==="#") { |
|
39 | 39 | $id="collapse-".$this->element->getIdentifier(); |
40 | 40 | $this->attachTo($id); |
41 | 41 | } |
@@ -32,11 +32,11 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | public function addBadge($caption, $leftSeparator=" ") { |
35 | - return $this->element->addBadge($caption,$leftSeparator); |
|
35 | + return $this->element->addBadge($caption, $leftSeparator); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function addLabel($caption, $style="label-default", $leftSeparator=" ") { |
39 | - return $this->element->addLabel($caption,$style,$leftSeparator); |
|
39 | + return $this->element->addLabel($caption, $style, $leftSeparator); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function run(JsUtils $js) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | const CSS_DEFAULT="-default", CSS_PRIMARY="-primary", CSS_SUCCESS="-success", CSS_INFO="-info", CSS_WARNING="-warning", CSS_DANGER="-danger", CSS_LINK="-link"; |
15 | 15 | |
16 | 16 | public static function buttonStyles() { |
17 | - return array ( |
|
17 | + return array( |
|
18 | 18 | "btn-default", |
19 | 19 | "btn-primary", |
20 | 20 | "btn-success", |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | public static function Styles($prefix="btn") { |
29 | - return array ( |
|
29 | + return array( |
|
30 | 30 | $prefix."-default", |
31 | 31 | $prefix."-primary", |
32 | 32 | $prefix."-success", |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | public static function sizes($prefix="btn") { |
40 | - return array ( |
|
40 | + return array( |
|
41 | 41 | $prefix."-lg", |
42 | 42 | "", |
43 | 43 | $prefix."-sm", |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | public static function position() { |
49 | - return array ( |
|
49 | + return array( |
|
50 | 50 | "top", |
51 | 51 | "left", |
52 | 52 | "right", |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | public static function alignment($prefix="") { |
59 | - return array ( |
|
59 | + return array( |
|
60 | 60 | $prefix."", |
61 | 61 | $prefix."left", |
62 | 62 | $prefix."right", |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | public static function navbarZoneClasses() { |
69 | - return array ( |
|
69 | + return array( |
|
70 | 70 | "navbar-nav", |
71 | 71 | "navbar-left", |
72 | 72 | "navbar-right", |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | public static function glyphIcons() { |
78 | - return array ( |
|
78 | + return array( |
|
79 | 79 | "glyphicon-asterisk", |
80 | 80 | "glyphicon-plus", |
81 | 81 | "glyphicon-euro", |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | public static function getStyle($cssStyle, $prefix) { |
348 | 348 | if (is_int($cssStyle)) { |
349 | 349 | $styles=CssRef::Styles($prefix); |
350 | - if ($cssStyle<sizeof($styles)&&$cssStyle>=0) { |
|
350 | + if ($cssStyle<sizeof($styles) && $cssStyle>=0) { |
|
351 | 351 | return CssRef::styles($prefix)[$cssStyle]; |
352 | 352 | } else { |
353 | 353 | throw new \Exception("La valeur passée a propriété `Style` ne fait pas partie des valeurs possibles : index '".$cssStyle."' inexistant"); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct($identifier, $tagName="ul") { |
17 | 17 | parent::__construct($identifier, $tagName); |
18 | - $this->content=array (); |
|
18 | + $this->content=array(); |
|
19 | 19 | $this->_template='<%tagName% %properties%>%content%</%tagName%>'; |
20 | 20 | $this->setProperty("class", "list-group"); |
21 | 21 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if (is_object($text)) { |
25 | 25 | $element=$text; |
26 | 26 | } else { |
27 | - switch($this->tagName) { |
|
27 | + switch ($this->tagName) { |
|
28 | 28 | case "ul": |
29 | 29 | $element=new HtmlBsDoubleElement("list-gi-".$this->identifier); |
30 | 30 | $element->setTagName("li"); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | public function addItems($items) { |
48 | - foreach ( $items as $item ) { |
|
48 | + foreach ($items as $item) { |
|
49 | 49 | if (is_string($item)) { |
50 | 50 | $this->addItem($item); |
51 | 51 | } else |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * @return \Ajax\bootstrap\html\HtmlButton |
73 | 73 | */ |
74 | 74 | public function setActive() { |
75 | - return $this->addToPropertyCtrl("class", "active", array ( |
|
75 | + return $this->addToPropertyCtrl("class", "active", array( |
|
76 | 76 | "active" |
77 | 77 | )); |
78 | 78 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @return \Ajax\bootstrap\html\HtmlButton |
83 | 83 | */ |
84 | 84 | public function setDisabled() { |
85 | - return $this->addToPropertyCtrl("class", "disabled", array ( |
|
85 | + return $this->addToPropertyCtrl("class", "disabled", array( |
|
86 | 86 | "disabled" |
87 | 87 | )); |
88 | 88 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function fromArray($array) { |
114 | 114 | $array=parent::fromArray($array); |
115 | - foreach ( $array as $key => $value ) { |
|
115 | + foreach ($array as $key => $value) { |
|
116 | 116 | $this->setProperty($key, $value); |
117 | 117 | } |
118 | 118 | return $array; |