Completed
Push — master ( ab500e...03e9d9 )
by Jean-Christophe
04:23
created
Ajax/semantic/html/content/HtmlGridCol.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	public function setWidth($width) {
33 33
 		if (\is_int($width)) {
34
-			$width=Wide::getConstants()["W" . $width];
34
+			$width=Wide::getConstants()["W".$width];
35 35
 		}
36 36
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
37
-		return $this->addToPropertyCtrl("class", "wide", array ("wide" ));
37
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
38 38
 	}
39 39
 
40 40
 	public function setValue($value) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			$divider->setVertical();
53 53
 		else
54 54
 			$divider->setHorizontal();
55
-		$this->wrap($divider,"");
55
+		$this->wrap($divider, "");
56 56
 		return $divider;
57 57
 	}
58 58
 }
59 59
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/components/Popup.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 	 * @return $this
28 28
 	 */
29 29
 	public function setOnShow($jsCode) {
30
-		$jsCode=str_ireplace("\"","%quote%", $jsCode);
30
+		$jsCode=str_ireplace("\"", "%quote%", $jsCode);
31 31
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
32 32
 	}
33 33
 
34
-	public function setExclusive($value){
34
+	public function setExclusive($value) {
35 35
 		return $this->setParam("exclusive", $value);
36 36
 	}
37 37
 
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
 	 * @param string $popup the css selector of the popup
41 41
 	 * @return \Ajax\semantic\components\Popup
42 42
 	 */
43
-	public function setPopup($popup){
43
+	public function setPopup($popup) {
44 44
 		return $this->setParam("popup", $popup);
45 45
 	}
46 46
 
47
-	public function setInline($value){
47
+	public function setInline($value) {
48 48
 		return $this->setParam("inline", $value);
49 49
 	}
50 50
 
51
-	public function setPosition($value){
51
+	public function setPosition($value) {
52 52
 		return $this->setParam("position", $value);
53 53
 	}
54 54
 	//TODO other events implementation
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlDropdownItem.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -12,34 +12,34 @@  discard block
 block discarded – undo
12 12
 use Ajax\semantic\html\base\traits\MenuItemTrait;
13 13
 
14 14
 class HtmlDropdownItem extends HtmlSemDoubleElement {
15
-	use IconTrait,MenuItemTrait;
16
-	public function __construct($identifier, $content="",$value=NULL,$image=NULL,$description=NULL) {
15
+	use IconTrait, MenuItemTrait;
16
+	public function __construct($identifier, $content="", $value=NULL, $image=NULL, $description=NULL) {
17 17
 		parent::__construct($identifier, "a");
18 18
 		$this->setClass("item");
19 19
 		$this->setContent($content);
20
-		if($value!==NULL)
20
+		if ($value!==NULL)
21 21
 			$this->setData($value);
22
-		if($image!==NULL)
22
+		if ($image!==NULL)
23 23
 			$this->asMiniAvatar($image);
24
-		if($description!==NULL)
24
+		if ($description!==NULL)
25 25
 			$this->setDescription($description);
26 26
 	}
27 27
 
28
-	public function setDescription($description){
29
-		$descO=new HtmlDoubleElement("desc-".$this->identifier,"span");
28
+	public function setDescription($description) {
29
+		$descO=new HtmlDoubleElement("desc-".$this->identifier, "span");
30 30
 		$descO->setClass("description");
31 31
 		$descO->setContent($description);
32
-		return $this->addContent($descO,true);
32
+		return $this->addContent($descO, true);
33 33
 	}
34 34
 
35
-	public function setData($value){
35
+	public function setData($value) {
36 36
 		$this->setProperty("data-value", $value);
37 37
 		return $this;
38 38
 	}
39 39
 
40
-	public function asOption(){
40
+	public function asOption() {
41 41
 		$this->tagName="option";
42
-		if($this->getProperty("data-value")!==null)
42
+		if ($this->getProperty("data-value")!==null)
43 43
 			$this->setProperty("value", $this->getProperty("data-value"));
44 44
 	}
45 45
 
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 	 * @param string $image the image src
48 48
 	 * @return \Ajax\common\html\html5\HtmlImg
49 49
 	 */
50
-	public function asMiniAvatar($image){
50
+	public function asMiniAvatar($image) {
51 51
 		$this->tagName="div";
52
-		$img=new HtmlImg("image-".$this->identifier,$image);
52
+		$img=new HtmlImg("image-".$this->identifier, $image);
53 53
 		$img->setClass("ui mini avatar image");
54
-		$this->addContent($img,true);
54
+		$this->addContent($img, true);
55 55
 		return $this;
56 56
 	}
57 57
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	 * @param string $icon
61 61
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
62 62
 	 */
63
-	public function asIcon($caption,$icon){
63
+	public function asIcon($caption, $icon) {
64 64
 		$this->setContent($caption);
65
-		$this->addContent(new HtmlIcon("", $icon),true);
65
+		$this->addContent(new HtmlIcon("", $icon), true);
66 66
 		return $this;
67 67
 	}
68 68
 
@@ -71,23 +71,23 @@  discard block
 block discarded – undo
71 71
 	 * @param string $color
72 72
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
73 73
 	 */
74
-	public function asCircularLabel($caption,$color){
74
+	public function asCircularLabel($caption, $color) {
75 75
 		$this->setContent($caption);
76 76
 		$lbl=new HtmlLabel("");
77 77
 		$lbl->setCircular()->setColor($color)->setEmpty();
78
-		$this->addContent($lbl,true);
78
+		$this->addContent($lbl, true);
79 79
 		return $this;
80 80
 	}
81 81
 
82 82
 
83 83
 
84 84
 	public function addMenuItem($items) {
85
-		$menu=new HtmlMenu("menu-" . $this->identifier, $items);
85
+		$menu=new HtmlMenu("menu-".$this->identifier, $items);
86 86
 		$content=$this->content;
87 87
 		$this->setTagName("div");
88 88
 		$this->setProperty("class", "item");
89 89
 		$icon=new HtmlIcon("", "dropdown");
90
-		$this->content=[$icon,new HtmlSemDoubleElement("","span","text",$content),$menu];
90
+		$this->content=[$icon, new HtmlSemDoubleElement("", "span", "text", $content), $menu];
91 91
 		return $menu;
92 92
 	}
93 93
 
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
 	 * @param string $icon
97 97
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
98 98
 	 */
99
-	public static function searchInput($placeholder=NULL,$icon=NULL){
100
-		return (new HtmlDropdownItem(""))->asSearchInput($placeholder,$icon);
99
+	public static function searchInput($placeholder=NULL, $icon=NULL) {
100
+		return (new HtmlDropdownItem(""))->asSearchInput($placeholder, $icon);
101 101
 	}
102 102
 
103 103
 	/**
104 104
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
105 105
 	 */
106
-	public static function divider(){
106
+	public static function divider() {
107 107
 		return (new HtmlDropdownItem(""))->asDivider();
108 108
 	}
109 109
 
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	 * @param string $icon
113 113
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
114 114
 	 */
115
-	public static function header($caption=NULL,$icon=NULL){
116
-		return (new HtmlDropdownItem(""))->asHeader($caption,$icon);
115
+	public static function header($caption=NULL, $icon=NULL) {
116
+		return (new HtmlDropdownItem(""))->asHeader($caption, $icon);
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	 * @param string $color
122 122
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
123 123
 	 */
124
-	public static function circular($caption,$color){
125
-		return (new HtmlDropdownItem(""))->asCircularLabel($caption,$color);
124
+	public static function circular($caption, $color) {
125
+		return (new HtmlDropdownItem(""))->asCircularLabel($caption, $color);
126 126
 	}
127 127
 
128 128
 	/**
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 	 * @param string $icon
131 131
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
132 132
 	 */
133
-	public static function icon($caption,$icon){
134
-		return (new HtmlDropdownItem(""))->asIcon($caption,$icon);
133
+	public static function icon($caption, $icon) {
134
+		return (new HtmlDropdownItem(""))->asIcon($caption, $icon);
135 135
 	}
136 136
 
137 137
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 * @param unknown $image
140 140
 	 * @return \Ajax\semantic\html\content\HtmlDropdownItem
141 141
 	 */
142
-	public static function avatar($caption,$image){
143
-		return (new HtmlDropdownItem("",$caption))->asMiniAvatar($image);
142
+	public static function avatar($caption, $image) {
143
+		return (new HtmlDropdownItem("", $caption))->asMiniAvatar($image);
144 144
 	}
145 145
 }
146 146
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlDivider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
23 23
 	 */
24 24
 	public function setVertical() {
25
-		return $this->addToPropertyCtrl("class", "vertical", array ("vertical","horizontal" ));
25
+		return $this->addToPropertyCtrl("class", "vertical", array("vertical", "horizontal"));
26 26
 	}
27 27
 
28 28
 	/**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @return \Ajax\semantic\html\elements\HtmlDivider
31 31
 	 */
32 32
 	public function setHorizontal() {
33
-		return $this->addToPropertyCtrl("class", "horizontal", array ("vertical","horizontal" ));
33
+		return $this->addToPropertyCtrl("class", "horizontal", array("vertical", "horizontal"));
34 34
 	}
35 35
 
36 36
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		return $this->addToProperty("class", "inverted");
66 66
 	}
67 67
 
68
-	public function setIgnored(){
68
+	public function setIgnored() {
69 69
 		return $this->addToProperty("class", "ignored");
70 70
 	}
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlShapeItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 
6 6
 class HtmlShapeItem extends HtmlSemDoubleElement {
7 7
 	public function __construct($identifier, $content) {
8
-		parent::__construct($identifier,"div","side",$content);
8
+		parent::__construct($identifier, "div", "side", $content);
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
12
-		if($value){
11
+	public function setActive($value=true) {
12
+		if ($value) {
13 13
 			$this->addToPropertyCtrl("class", "active", ["active"]);
14
-		}else{
14
+		} else {
15 15
 			$this->removePropertyValue("class", "active");
16 16
 		}
17 17
 		return $this;
Please login to merge, or discard this patch.
Ajax/common/components/BaseComponent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  * @version 1.001
11 11
  */
12 12
 abstract class BaseComponent {
13
-	public $jquery_code_for_compile=array ();
14
-	protected $params=array ();
13
+	public $jquery_code_for_compile=array();
14
+	protected $params=array();
15 15
 
16 16
 	/**
17 17
 	 *
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	public function setParams($params) {
71
-		foreach ( $params as $k => $v ) {
71
+		foreach ($params as $k => $v) {
72 72
 			$method="set".ucfirst($k);
73 73
 			if (method_exists($this, $method))
74 74
 				$this->$method($v);
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 		return $this;
82 82
 	}
83 83
 
84
-	public function addParams($params){
85
-		foreach ($params as $k=>$v){
84
+	public function addParams($params) {
85
+		foreach ($params as $k=>$v) {
86 86
 				$this->setParam($k, $v);
87 87
 		}
88 88
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	use BaseTrait;
22 22
 	protected $_popup=NULL;
23 23
 	protected $_dimmer=NULL;
24
-	protected $_params=array ();
24
+	protected $_params=array();
25 25
 
26 26
 
27 27
 	public function __construct($identifier, $tagName="p", $baseClass="ui", $content=NULL) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	}
52 52
 
53 53
 	public function addDimmer($params=array(), $content=NULL) {
54
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
54
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
55 55
 		$dimmer->setParams($params);
56 56
 		$dimmer->setContainer($this);
57 57
 		$this->addContent($dimmer);
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
 
61 61
 	public function addLabel($label, $before=false, $icon=NULL) {
62 62
 		$labelO=$label;
63
-		if (\is_object($label) === false) {
64
-			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
63
+		if (\is_object($label)===false) {
64
+			$labelO=new HtmlLabel("label-".$this->identifier, $label);
65 65
 			if (isset($icon))
66 66
 				$labelO->addIcon($icon);
67 67
 		} else {
68
-			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
68
+			$labelO->addToPropertyCtrl("class", "label", array("label"));
69 69
 		}
70 70
 		$this->addContent($labelO, $before);
71 71
 		return $labelO;
72 72
 	}
73 73
 
74
-	public function attachLabel($label,$side,$direction=Direction::NONE,$icon=NULL){
75
-		$label=$this->addLabel($label,true,$icon);
76
-		$label->setAttached($side,$direction);
74
+	public function attachLabel($label, $side, $direction=Direction::NONE, $icon=NULL) {
75
+		$label=$this->addLabel($label, true, $icon);
76
+		$label->setAttached($side, $direction);
77 77
 		return $this;
78 78
 	}
79 79
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
 	public function jsShowDimmer($show=true) {
91 91
 		$status="hide";
92
-		if ($show === true)
92
+		if ($show===true)
93 93
 			$status="show";
94
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
94
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
95 95
 	}
96 96
 
97 97
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	}
102 102
 
103 103
 	public function run(JsUtils $js) {
104
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
104
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
105 105
 		parent::run($js);
106 106
 		$this->addEventsOnRun($js);
107 107
 		if (isset($this->_popup)) {
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlShape.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticHtmlCollectionsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 * @param int $colCount
19 19
 	 * @return HtmlTable
20 20
 	 */
21
-	public function htmlTable($identifier, $rowCount, $colCount){
21
+	public function htmlTable($identifier, $rowCount, $colCount) {
22 22
 		return $this->addHtmlComponent(new HtmlTable($identifier, $rowCount, $colCount));
23 23
 	}
24 24
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	 * @param $styles string|array|NULL
30 30
 	 * @return HtmlMessage
31 31
 	 */
32
-	public function htmlMessage($identifier, $content="",$styles=NULL) {
33
-		$msg= $this->addHtmlComponent(new HtmlMessage($identifier, $content));
34
-		if(isset($msg))
32
+	public function htmlMessage($identifier, $content="", $styles=NULL) {
33
+		$msg=$this->addHtmlComponent(new HtmlMessage($identifier, $content));
34
+		if (isset($msg))
35 35
 			$msg->setStyle($styles);
36 36
 		return $msg;
37 37
 	}
Please login to merge, or discard this patch.