@@ -99,12 +99,12 @@ |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * Adds an image |
|
103 | - * @param string $src |
|
104 | - * @param string $alt |
|
105 | - * @param boolean $before |
|
106 | - * @return HtmlImg |
|
107 | - */ |
|
102 | + * Adds an image |
|
103 | + * @param string $src |
|
104 | + * @param string $alt |
|
105 | + * @param boolean $before |
|
106 | + * @return HtmlImg |
|
107 | + */ |
|
108 | 108 | public function addImage($src, $alt="", $before=true) { |
109 | 109 | $img=new HtmlImg("image-" . $this->identifier, $src, $alt); |
110 | 110 | $img->setClass(""); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @version 1.001 |
19 | 19 | */ |
20 | 20 | class HtmlLabel extends HtmlSemDoubleElement { |
21 | - use LabeledIconTrait,HasTimeoutTrait; |
|
21 | + use LabeledIconTrait, HasTimeoutTrait; |
|
22 | 22 | |
23 | 23 | public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") { |
24 | 24 | parent::__construct($identifier, $tagName, "ui label"); |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | * @return HtmlLabel |
34 | 34 | */ |
35 | 35 | public function setPointing($value=Direction::NONE) { |
36 | - if($value==="left" || $value==="right") |
|
36 | + if ($value==="left" || $value==="right") |
|
37 | 37 | return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
38 | 38 | else |
39 | - return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true)); |
|
39 | + return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing", true)); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | * @return HtmlLabel |
46 | 46 | */ |
47 | 47 | public function toCorner($side="left") { |
48 | - return $this->addToPropertyCtrl("class", $side . " corner", array ("right corner","left corner" )); |
|
48 | + return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner")); |
|
49 | 49 | } |
50 | 50 | |
51 | - public function setHorizontal(){ |
|
52 | - return $this->addToPropertyCtrl("class", "hozizontal",array("horizontal")); |
|
51 | + public function setHorizontal() { |
|
52 | + return $this->addToPropertyCtrl("class", "hozizontal", array("horizontal")); |
|
53 | 53 | } |
54 | 54 | |
55 | - public function setFloating(){ |
|
56 | - return $this->addToPropertyCtrl("class", "floating",array("floating")); |
|
55 | + public function setFloating() { |
|
56 | + return $this->addToPropertyCtrl("class", "floating", array("floating")); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | return $this->addToProperty("class", "tag"); |
65 | 65 | } |
66 | 66 | |
67 | - public function setEmpty(){ |
|
67 | + public function setEmpty() { |
|
68 | 68 | $this->content=NULL; |
69 | - return $this->addToPropertyCtrl("class", "empty",array("empty")); |
|
69 | + return $this->addToPropertyCtrl("class", "empty", array("empty")); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function setBasic() { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function addEmphasisImage($src, $alt="", $before=true) { |
84 | 84 | $this->addToProperty("class", "image"); |
85 | - return $this->addImage($src,$alt,$before); |
|
85 | + return $this->addImage($src, $alt, $before); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @return HtmlImg |
94 | 94 | */ |
95 | 95 | public function addAvatarImage($src, $alt="", $before=true) { |
96 | - $img=$this->addImage($src,$alt,$before); |
|
96 | + $img=$this->addImage($src, $alt, $before); |
|
97 | 97 | $img->setClass("ui image"); |
98 | 98 | $img->asAvatar(); |
99 | 99 | return $img; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @return HtmlImg |
108 | 108 | */ |
109 | 109 | public function addImage($src, $alt="", $before=true) { |
110 | - $img=new HtmlImg("image-" . $this->identifier, $src, $alt); |
|
110 | + $img=new HtmlImg("image-".$this->identifier, $src, $alt); |
|
111 | 111 | $img->setClass(""); |
112 | 112 | $this->addContent($img, $before); |
113 | 113 | return $img; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @return HtmlDoubleElement |
120 | 120 | */ |
121 | 121 | public function addDetail($detail) { |
122 | - $div=new HtmlSemDoubleElement("detail-" . $this->identifier, $this->tagName,"detail"); |
|
122 | + $div=new HtmlSemDoubleElement("detail-".$this->identifier, $this->tagName, "detail"); |
|
123 | 123 | $div->setContent($detail); |
124 | 124 | $this->addContent($div); |
125 | 125 | return $div; |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | * @return HtmlLabel |
131 | 131 | */ |
132 | 132 | public function asRibbon($direction=Direction::NONE) { |
133 | - return $this->addToPropertyCtrl("class", $direction." ribbon", array ("ribbon","right ribbon","left ribbon" )); |
|
133 | + return $this->addToPropertyCtrl("class", $direction." ribbon", array("ribbon", "right ribbon", "left ribbon")); |
|
134 | 134 | } |
135 | 135 | |
136 | - public function setAttached($side=Side::TOP,$direction=Direction::NONE){ |
|
137 | - if($direction!==Direction::NONE) |
|
138 | - return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached")); |
|
136 | + public function setAttached($side=Side::TOP, $direction=Direction::NONE) { |
|
137 | + if ($direction!==Direction::NONE) |
|
138 | + return $this->addToPropertyCtrl("class", $side." ".$direction." attached", Side::getConstantValues($direction." attached")); |
|
139 | 139 | else |
140 | - return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached")); |
|
140 | + return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached")); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param string $direction one of RIGHT="right", LEFT="left",DOWN="down",UP="up",NONE="",BELOW="below" |
147 | 147 | * @return HtmlLabel |
148 | 148 | */ |
149 | - public static function ribbon($identifier, $caption,$direction=Direction::NONE) { |
|
149 | + public static function ribbon($identifier, $caption, $direction=Direction::NONE) { |
|
150 | 150 | return (new HtmlLabel($identifier, $caption))->asRibbon($direction); |
151 | 151 | } |
152 | 152 |
@@ -23,8 +23,9 @@ discard block |
||
23 | 23 | public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") { |
24 | 24 | parent::__construct($identifier, $tagName, "ui label"); |
25 | 25 | $this->content=$caption; |
26 | - if (isset($icon)) |
|
27 | - $this->addIcon($icon); |
|
26 | + if (isset($icon)) { |
|
27 | + $this->addIcon($icon); |
|
28 | + } |
|
28 | 29 | } |
29 | 30 | |
30 | 31 | /** |
@@ -33,10 +34,11 @@ discard block |
||
33 | 34 | * @return HtmlLabel |
34 | 35 | */ |
35 | 36 | public function setPointing($value=Direction::NONE) { |
36 | - if($value==="left" || $value==="right") |
|
37 | - return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
|
38 | - else |
|
39 | - return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true)); |
|
37 | + if($value==="left" || $value==="right") { |
|
38 | + return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing")); |
|
39 | + } else { |
|
40 | + return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true)); |
|
41 | + } |
|
40 | 42 | } |
41 | 43 | |
42 | 44 | /** |
@@ -134,10 +136,11 @@ discard block |
||
134 | 136 | } |
135 | 137 | |
136 | 138 | public function setAttached($side=Side::TOP,$direction=Direction::NONE){ |
137 | - if($direction!==Direction::NONE) |
|
138 | - return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached")); |
|
139 | - else |
|
140 | - return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached")); |
|
139 | + if($direction!==Direction::NONE) { |
|
140 | + return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached")); |
|
141 | + } else { |
|
142 | + return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached")); |
|
143 | + } |
|
141 | 144 | } |
142 | 145 | |
143 | 146 | /** |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | */ |
16 | 16 | class HtmlLabelGroups extends HtmlSemCollection { |
17 | 17 | |
18 | - public function __construct($identifier,$labels=array(), $attributes=array()) { |
|
18 | + public function __construct($identifier, $labels=array(), $attributes=array()) { |
|
19 | 19 | parent::__construct($identifier, "div", "ui labels"); |
20 | - $this->_states=\array_merge(Size::getConstants(),Color::getConstants(),["tag","circular"]); |
|
20 | + $this->_states=\array_merge(Size::getConstants(), Color::getConstants(), ["tag", "circular"]); |
|
21 | 21 | $this->addItems($labels); |
22 | 22 | $this->setStates($attributes); |
23 | 23 | } |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | $icon=JArray::getValue($value, "icon", 1); |
32 | 32 | $tagName=JArray::getValue($value, "tagName", 2); |
33 | 33 | } |
34 | - $labelO=new HtmlLabel("label-" . $this->identifier, $caption,$icon,$tagName); |
|
34 | + $labelO=new HtmlLabel("label-".$this->identifier, $caption, $icon, $tagName); |
|
35 | 35 | return $labelO; |
36 | 36 | } |
37 | 37 | |
38 | 38 | protected function createCondition($value) { |
39 | - return ($value instanceof HtmlLabel) === false; |
|
39 | + return ($value instanceof HtmlLabel)===false; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | } |
@@ -14,11 +14,11 @@ |
||
14 | 14 | class HtmlContainer extends HtmlSemDoubleElement { |
15 | 15 | use TextAlignmentTrait; |
16 | 16 | public function __construct($identifier, $content="") { |
17 | - parent::__construct($identifier, "div","ui container"); |
|
17 | + parent::__construct($identifier, "div", "ui container"); |
|
18 | 18 | $this->content=$content; |
19 | 19 | } |
20 | 20 | |
21 | - public function asText(){ |
|
21 | + public function asText() { |
|
22 | 22 | return $this->addToProperty("class", "text"); |
23 | 23 | } |
24 | 24 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @return HtmlDivider |
24 | 24 | */ |
25 | 25 | public function setVertical() { |
26 | - return $this->addToPropertyCtrl("class", "vertical", array ("vertical","horizontal" )); |
|
26 | + return $this->addToPropertyCtrl("class", "vertical", array("vertical", "horizontal")); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @return HtmlDivider |
32 | 32 | */ |
33 | 33 | public function setHorizontal() { |
34 | - return $this->addToPropertyCtrl("class", "horizontal", array ("vertical","horizontal" )); |
|
34 | + return $this->addToPropertyCtrl("class", "horizontal", array("vertical", "horizontal")); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * @return HtmlDivider |
63 | 63 | */ |
64 | - public function setIgnored(){ |
|
64 | + public function setIgnored() { |
|
65 | 65 | return $this->addToProperty("class", "ignored"); |
66 | 66 | } |
67 | 67 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * @param int $max |
14 | 14 | * @param string $icon star or heart |
15 | 15 | */ |
16 | - public function __construct($identifier, $value,$max=5,$icon="") { |
|
16 | + public function __construct($identifier, $value, $max=5, $icon="") { |
|
17 | 17 | parent::__construct($identifier, "div", "ui {$icon} rating"); |
18 | 18 | $this->setValue($value); |
19 | 19 | $this->setMax($max); |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | * {@inheritDoc} |
24 | 24 | * @see \Ajax\common\html\HtmlDoubleElement::setValue() |
25 | 25 | */ |
26 | - public function setValue($value){ |
|
26 | + public function setValue($value) { |
|
27 | 27 | $this->setProperty("data-rating", $value); |
28 | 28 | } |
29 | 29 | |
30 | - public function setMax($max){ |
|
30 | + public function setMax($max) { |
|
31 | 31 | $this->setProperty("data-max-rating", $max); |
32 | 32 | } |
33 | 33 | |
@@ -35,21 +35,21 @@ discard block |
||
35 | 35 | * {@inheritDoc} |
36 | 36 | * @see HtmlSemDoubleElement::run() |
37 | 37 | */ |
38 | - public function run(JsUtils $js){ |
|
38 | + public function run(JsUtils $js) { |
|
39 | 39 | parent::run($js); |
40 | - return $js->semantic()->rating("#".$this->identifier,$this->_params); |
|
40 | + return $js->semantic()->rating("#".$this->identifier, $this->_params); |
|
41 | 41 | } |
42 | 42 | |
43 | - public function asStar(){ |
|
43 | + public function asStar() { |
|
44 | 44 | return $this->setIcon(); |
45 | 45 | } |
46 | 46 | |
47 | - public function asHeart(){ |
|
47 | + public function asHeart() { |
|
48 | 48 | return $this->setIcon("heart"); |
49 | 49 | } |
50 | 50 | |
51 | - public function setIcon($icon="star"){ |
|
52 | - return $this->addToPropertyCtrl("class", $icon, ["star","heart",""]); |
|
51 | + public function setIcon($icon="star") { |
|
52 | + return $this->addToPropertyCtrl("class", $icon, ["star", "heart", ""]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | } |
@@ -52,8 +52,9 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function getSideContent($index){ |
54 | 54 | $item= $this->getItem($index); |
55 | - if(isset($item)) |
|
56 | - return $item->getContent(); |
|
55 | + if(isset($item)) { |
|
56 | + return $item->getContent(); |
|
57 | + } |
|
57 | 58 | return null; |
58 | 59 | } |
59 | 60 | |
@@ -147,15 +148,17 @@ discard block |
||
147 | 148 | * @see BaseHtml::run() |
148 | 149 | */ |
149 | 150 | public function run(JsUtils $js) { |
150 | - if (isset($this->_bsComponent) === false) |
|
151 | - $this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params); |
|
151 | + if (isset($this->_bsComponent) === false) { |
|
152 | + $this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params); |
|
153 | + } |
|
152 | 154 | $this->addEventsOnRun($js); |
153 | 155 | return $this->_bsComponent; |
154 | 156 | } |
155 | 157 | |
156 | 158 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
157 | - if($this->_autoActive) |
|
158 | - $this->setActiveSide(0); |
|
159 | + if($this->_autoActive) { |
|
160 | + $this->setActiveSide(0); |
|
161 | + } |
|
159 | 162 | return parent::compile($js,$view); |
160 | 163 | } |
161 | 164 | } |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | use Ajax\common\html\BaseHtml; |
9 | 9 | |
10 | 10 | |
11 | -class HtmlShape extends HtmlSemCollection{ |
|
11 | +class HtmlShape extends HtmlSemCollection { |
|
12 | 12 | |
13 | 13 | protected $_params=array(); |
14 | 14 | protected $_autoActive=true; |
15 | 15 | |
16 | - public function __construct( $identifier, $sides){ |
|
17 | - parent::__construct( $identifier, "div", "ui shape"); |
|
16 | + public function __construct($identifier, $sides) { |
|
17 | + parent::__construct($identifier, "div", "ui shape"); |
|
18 | 18 | $this->_template='<%tagName% id="%identifier%" %properties%><div class="sides">%wrapContentBefore%%content%%wrapContentAfter%</div></%tagName%>'; |
19 | 19 | $this->addItems($sides); |
20 | 20 | } |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | * {@inheritDoc} |
24 | 24 | * @see \Ajax\common\html\HtmlCollection::createItem() |
25 | 25 | */ |
26 | - protected function createItem($value){ |
|
27 | - if(\is_object($value)===false){ |
|
28 | - $value=new HtmlSemDoubleElement("","div","content",$value); |
|
26 | + protected function createItem($value) { |
|
27 | + if (\is_object($value)===false) { |
|
28 | + $value=new HtmlSemDoubleElement("", "div", "content", $value); |
|
29 | 29 | } |
30 | 30 | return new HtmlShapeItem("side-".$this->identifier."-".$this->count(), $value); |
31 | 31 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * {@inheritDoc} |
35 | 35 | * @see \Ajax\common\html\HtmlCollection::createCondition() |
36 | 36 | */ |
37 | - protected function createCondition($value){ |
|
37 | + protected function createCondition($value) { |
|
38 | 38 | return ($value instanceof HtmlShapeItem)===false; |
39 | 39 | } |
40 | 40 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param int $index |
43 | 43 | * @return \Ajax\semantic\html\content\HtmlShapeItem |
44 | 44 | */ |
45 | - public function getSide($index){ |
|
45 | + public function getSide($index) { |
|
46 | 46 | return $this->getItem($index); |
47 | 47 | } |
48 | 48 | |
@@ -50,96 +50,96 @@ discard block |
||
50 | 50 | * @param int $index |
51 | 51 | * @return mixed|NULL |
52 | 52 | */ |
53 | - public function getSideContent($index){ |
|
54 | - $item= $this->getItem($index); |
|
55 | - if(isset($item)) |
|
53 | + public function getSideContent($index) { |
|
54 | + $item=$this->getItem($index); |
|
55 | + if (isset($item)) |
|
56 | 56 | return $item->getContent(); |
57 | 57 | return null; |
58 | 58 | } |
59 | 59 | |
60 | - public function jsDo($action){ |
|
60 | + public function jsDo($action) { |
|
61 | 61 | return "$('#".$this->identifier."').shape('".$action."');"; |
62 | 62 | } |
63 | 63 | |
64 | - public function jsFlipLeft(){ |
|
64 | + public function jsFlipLeft() { |
|
65 | 65 | return $this->jsDo("flip left"); |
66 | 66 | } |
67 | 67 | |
68 | - public function jsFlipRight(){ |
|
68 | + public function jsFlipRight() { |
|
69 | 69 | return $this->jsDo("flip right"); |
70 | 70 | } |
71 | 71 | |
72 | - public function jsFlipUp(){ |
|
72 | + public function jsFlipUp() { |
|
73 | 73 | return $this->jsDo("flip up"); |
74 | 74 | } |
75 | 75 | |
76 | - public function jsFlipDown(){ |
|
76 | + public function jsFlipDown() { |
|
77 | 77 | return $this->jsDo("flip down"); |
78 | 78 | } |
79 | 79 | |
80 | - public function jsFlipOver(){ |
|
80 | + public function jsFlipOver() { |
|
81 | 81 | return $this->jsDo("flip over"); |
82 | 82 | } |
83 | 83 | |
84 | - public function jsFlipBack(){ |
|
84 | + public function jsFlipBack() { |
|
85 | 85 | return $this->jsDo("flip back"); |
86 | 86 | } |
87 | 87 | |
88 | - private function doActionOn($element,$event,$what){ |
|
89 | - if($element instanceof BaseHtml){ |
|
90 | - return $element->on($event, $what,true,true); |
|
88 | + private function doActionOn($element, $event, $what) { |
|
89 | + if ($element instanceof BaseHtml) { |
|
90 | + return $element->on($event, $what, true, true); |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - public function flipLeftOn($element,$event){ |
|
94 | + public function flipLeftOn($element, $event) { |
|
95 | 95 | return $this->doActionOn($element, $event, $this->jsFlipLeft()); |
96 | 96 | } |
97 | 97 | |
98 | - public function flipRightOn($element,$event){ |
|
98 | + public function flipRightOn($element, $event) { |
|
99 | 99 | return $this->doActionOn($element, $event, $this->jsFlipRight()); |
100 | 100 | } |
101 | 101 | |
102 | - public function flipUpOn($element,$event){ |
|
102 | + public function flipUpOn($element, $event) { |
|
103 | 103 | return $this->doActionOn($element, $event, $this->jsFlipUp()); |
104 | 104 | } |
105 | 105 | |
106 | - public function flipDownOn($element,$event){ |
|
106 | + public function flipDownOn($element, $event) { |
|
107 | 107 | return $this->doActionOn($element, $event, $this->jsFlipDown()); |
108 | 108 | } |
109 | 109 | |
110 | - public function flipBackOn($element,$event){ |
|
110 | + public function flipBackOn($element, $event) { |
|
111 | 111 | return $this->doActionOn($element, $event, $this->jsFlipBack()); |
112 | 112 | } |
113 | 113 | |
114 | - public function flipOverOn($element,$event){ |
|
114 | + public function flipOverOn($element, $event) { |
|
115 | 115 | return $this->doActionOn($element, $event, $this->jsFlipOver()); |
116 | 116 | } |
117 | 117 | |
118 | - public function setActiveSide($index){ |
|
118 | + public function setActiveSide($index) { |
|
119 | 119 | $side=$this->getSide($index); |
120 | - if(isset($side)){ |
|
120 | + if (isset($side)) { |
|
121 | 121 | $side->setActive(true); |
122 | 122 | } |
123 | 123 | return $this; |
124 | 124 | } |
125 | 125 | |
126 | - public function asCube(){ |
|
126 | + public function asCube() { |
|
127 | 127 | return $this->addToPropertyCtrl("class", "cube", ["cube"]); |
128 | 128 | } |
129 | 129 | |
130 | - public function asText(){ |
|
130 | + public function asText() { |
|
131 | 131 | return $this->addToPropertyCtrl("class", "text", ["text"]); |
132 | 132 | } |
133 | 133 | |
134 | - public function setWidth($width="initial"){ |
|
134 | + public function setWidth($width="initial") { |
|
135 | 135 | $this->_params["width"]=$width; |
136 | 136 | } |
137 | - public function onChange($jsCode){ |
|
138 | - return $this->_params["onChange"]="%function(){" . $jsCode . "}%"; |
|
137 | + public function onChange($jsCode) { |
|
138 | + return $this->_params["onChange"]="%function(){".$jsCode."}%"; |
|
139 | 139 | } |
140 | 140 | |
141 | - public function beforeChange($jsCode){ |
|
142 | - return $this->_params["beforeChange"]="%function(){" . $jsCode . "}%"; |
|
141 | + public function beforeChange($jsCode) { |
|
142 | + return $this->_params["beforeChange"]="%function(){".$jsCode."}%"; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | /* |
@@ -147,15 +147,15 @@ discard block |
||
147 | 147 | * @see BaseHtml::run() |
148 | 148 | */ |
149 | 149 | public function run(JsUtils $js) { |
150 | - if (isset($this->_bsComponent) === false) |
|
151 | - $this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params); |
|
150 | + if (isset($this->_bsComponent)===false) |
|
151 | + $this->_bsComponent=$js->semantic()->shape("#".$this->identifier, $this->_params); |
|
152 | 152 | $this->addEventsOnRun($js); |
153 | 153 | return $this->_bsComponent; |
154 | 154 | } |
155 | 155 | |
156 | 156 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
157 | - if($this->_autoActive) |
|
157 | + if ($this->_autoActive) |
|
158 | 158 | $this->setActiveSide(0); |
159 | - return parent::compile($js,$view); |
|
159 | + return parent::compile($js, $view); |
|
160 | 160 | } |
161 | 161 | } |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class SegmentType extends BaseEnum { |
8 | - const RAISED="raised",STACKED="stacked",PILED="piled",NORMAL=""; |
|
8 | + const RAISED="raised", STACKED="stacked", PILED="piled", NORMAL=""; |
|
9 | 9 | } |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Side extends BaseEnum { |
8 | - const BOTTOM="bottom",BOTH="",TOP="top"; |
|
8 | + const BOTTOM="bottom", BOTH="", TOP="top"; |
|
9 | 9 | } |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace Ajax\semantic\html\base\constants; |
3 | 3 | use Ajax\common\BaseEnum; |
4 | 4 | abstract class Wide extends BaseEnum { |
5 | - const W1="one", W2="two", W3="three", W4="four",W5="five", W6="six", W7="seven", W8="eight",W9="nine",W10="ten",W11="eleven",W12="twelve",W13="thirteen",W14="fourteen",W15="fifteen",W16="sixteen"; |
|
5 | + const W1="one", W2="two", W3="three", W4="four", W5="five", W6="six", W7="seven", W8="eight", W9="nine", W10="ten", W11="eleven", W12="twelve", W13="thirteen", W14="fourteen", W15="fifteen", W16="sixteen"; |
|
6 | 6 | } |