@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | public function addDimmer($params=array(), $content=NULL) { |
51 | - $dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content); |
|
51 | + $dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content); |
|
52 | 52 | $dimmer->setParams($params); |
53 | 53 | $dimmer->setContainer($this); |
54 | 54 | $this->addContent($dimmer); |
@@ -57,20 +57,20 @@ discard block |
||
57 | 57 | |
58 | 58 | public function addLabel($label, $before=false, $icon=NULL) { |
59 | 59 | $labelO=$label; |
60 | - if (\is_object($label) === false) { |
|
61 | - $labelO=new HtmlLabel("label-" . $this->identifier, $label); |
|
60 | + if (\is_object($label)===false) { |
|
61 | + $labelO=new HtmlLabel("label-".$this->identifier, $label); |
|
62 | 62 | if (isset($icon)) |
63 | 63 | $labelO->addIcon($icon); |
64 | 64 | } else { |
65 | - $labelO->addToPropertyCtrl("class", "label", array ("label" )); |
|
65 | + $labelO->addToPropertyCtrl("class", "label", array("label")); |
|
66 | 66 | } |
67 | 67 | $this->addContent($labelO, $before); |
68 | 68 | return $labelO; |
69 | 69 | } |
70 | 70 | |
71 | - public function attachLabel($label,$side,$direction=Direction::NONE,$icon=NULL){ |
|
72 | - $label=$this->addLabel($label,true,$icon); |
|
73 | - $label->setAttached($side,$direction); |
|
71 | + public function attachLabel($label, $side, $direction=Direction::NONE, $icon=NULL) { |
|
72 | + $label=$this->addLabel($label, true, $icon); |
|
73 | + $label->setAttached($side, $direction); |
|
74 | 74 | return $this; |
75 | 75 | } |
76 | 76 | |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | |
87 | 87 | public function jsShowDimmer($show=true) { |
88 | 88 | $status="hide"; |
89 | - if ($show === true) |
|
89 | + if ($show===true) |
|
90 | 90 | $status="show"; |
91 | - return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
|
91 | + return '$("#.'.$this->identifier.').dimmer("'.$status.'");'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | public function run(JsUtils $js) { |
101 | - $this->_bsComponent=$js->semantic()->generic("#" . $this->identifier); |
|
101 | + $this->_bsComponent=$js->semantic()->generic("#".$this->identifier); |
|
102 | 102 | parent::run($js); |
103 | 103 | $this->addEventsOnRun($js); |
104 | 104 | if (isset($this->_popup)) { |
@@ -31,8 +31,9 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
34 | - if (isset($this->_popup)) |
|
35 | - $this->_popup->setAttributes($variation, $popupEvent); |
|
34 | + if (isset($this->_popup)) { |
|
35 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
36 | + } |
|
36 | 37 | } |
37 | 38 | |
38 | 39 | public function addPopup($title="", $content="", $variation=NULL, $params=array()) { |
@@ -59,8 +60,9 @@ discard block |
||
59 | 60 | $labelO=$label; |
60 | 61 | if (\is_object($label) === false) { |
61 | 62 | $labelO=new HtmlLabel("label-" . $this->identifier, $label); |
62 | - if (isset($icon)) |
|
63 | - $labelO->addIcon($icon); |
|
63 | + if (isset($icon)) { |
|
64 | + $labelO->addIcon($icon); |
|
65 | + } |
|
64 | 66 | } else { |
65 | 67 | $labelO->addToPropertyCtrl("class", "label", array ("label" )); |
66 | 68 | } |
@@ -79,21 +81,24 @@ discard block |
||
79 | 81 | * @return \Ajax\semantic\html\base\HtmlSemDoubleElement |
80 | 82 | */ |
81 | 83 | public function asLink($href=NULL) { |
82 | - if (isset($href)) |
|
83 | - $this->setProperty("href", $href); |
|
84 | + if (isset($href)) { |
|
85 | + $this->setProperty("href", $href); |
|
86 | + } |
|
84 | 87 | return $this->setTagName("a"); |
85 | 88 | } |
86 | 89 | |
87 | 90 | public function jsShowDimmer($show=true) { |
88 | 91 | $status="hide"; |
89 | - if ($show === true) |
|
90 | - $status="show"; |
|
92 | + if ($show === true) { |
|
93 | + $status="show"; |
|
94 | + } |
|
91 | 95 | return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
92 | 96 | } |
93 | 97 | |
94 | 98 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
95 | - if (isset($this->_popup)) |
|
96 | - $this->_popup->compile(); |
|
99 | + if (isset($this->_popup)) { |
|
100 | + $this->_popup->compile(); |
|
101 | + } |
|
97 | 102 | return parent::compile($js, $view); |
98 | 103 | } |
99 | 104 |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace Ajax\semantic\html\base\constants; |
3 | 3 | use Ajax\common\BaseEnum; |
4 | 4 | abstract class Size extends BaseEnum { |
5 | - const MASSIVE="massive",HUGE="huge",BIG="big",LARGE="large",MEDIUM="",SMALL="small",TINY="tiny",MINI="mini"; |
|
5 | + const MASSIVE="massive", HUGE="huge", BIG="big", LARGE="large", MEDIUM="", SMALL="small", TINY="tiny", MINI="mini"; |
|
6 | 6 | } |
7 | 7 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class StepStatus extends BaseEnum { |
8 | - const ACTIVE="active",COMPLETED="completed",DISABLED="disabled",NONE=""; |
|
8 | + const ACTIVE="active", COMPLETED="completed", DISABLED="disabled", NONE=""; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | const ACTIVE="active", DISABLED="disabled", ERROR="error", FOCUS="focus", LOADING="loading", NEGATIVE="negative", POSITIVE="positive", SUCCESS="success", WARNING="warning"; |
10 | 10 | |
11 | 11 | public static function add($state, $elements) { |
12 | - if (\is_array($state) === false) { |
|
12 | + if (\is_array($state)===false) { |
|
13 | 13 | $state=\explode(" ", $state); |
14 | 14 | } |
15 | 15 | if (\is_array($elements)) { |
16 | - foreach ( $elements as $element ) { |
|
16 | + foreach ($elements as $element) { |
|
17 | 17 | if ($element instanceof BaseHtml) { |
18 | 18 | self::_add($state, $element); |
19 | 19 | } |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | private static function _add($states, $element) { |
25 | - foreach ( $states as $state ) { |
|
26 | - $element->addToPropertyCtrl("class", $state, array ($state )); |
|
25 | + foreach ($states as $state) { |
|
26 | + $element->addToPropertyCtrl("class", $state, array($state)); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -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 | } |
10 | 10 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Style extends BaseEnum { |
8 | - const INFO="info",SUCCESS="success",POSITIVE="positive",WARNING="warning",ERROR="error",NEGATIVE="negative"; |
|
8 | + const INFO="info", SUCCESS="success", POSITIVE="positive", WARNING="warning", ERROR="error", NEGATIVE="negative"; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | use Ajax\common\BaseEnum; |
6 | 6 | |
7 | 7 | abstract class Emphasis extends BaseEnum { |
8 | - const PRIMARY="primary",SECONDARY="secondary",TERTIARY="tertiary"; |
|
8 | + const PRIMARY="primary", SECONDARY="secondary", TERTIARY="tertiary"; |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace Ajax\semantic\html\base\constants; |
3 | 3 | use Ajax\common\BaseEnum; |
4 | 4 | abstract class Sens extends BaseEnum { |
5 | - const VERTICAL="vertical", HORIZONTAL="horizontal",NONE=""; |
|
5 | + const VERTICAL="vertical", HORIZONTAL="horizontal", NONE=""; |
|
6 | 6 | } |
7 | 7 | \ No newline at end of file |
@@ -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 | } |
10 | 10 | \ No newline at end of file |