Completed
Push — master ( 69e9f4...3042e6 )
by Jean-Christophe
04:01
created
Ajax/semantic/traits/SemanticHtmlElementsTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
 	public function htmlIconGroups($identifier, $size="", $icons=array()) {
101 101
 		$group=new HtmlIconGroups($identifier, $size);
102 102
 		if (JArray::isAssociative($icons)) {
103
-			foreach ( $icons as $icon => $size ) {
103
+			foreach ($icons as $icon => $size) {
104 104
 				$group->add($icon, $size);
105 105
 			}
106
-		} else {
107
-			foreach ( $icons as $icon ) {
106
+		}else {
107
+			foreach ($icons as $icon) {
108 108
 				$group->add($icon);
109 109
 			}
110 110
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDimmer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class HtmlDimmer extends HtmlSemDoubleElement {
11 11
 	private $_container;
12
-	private $_params=array ();
12
+	private $_params=array();
13 13
 	private $_inverted;
14 14
 
15 15
 	public function __construct($identifier, $content=NULL) {
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 	}
20 20
 
21 21
 	public function setContent($content) {
22
-		$this->content=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
22
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
23 23
 		return $this;
24 24
 	}
25 25
 
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27
-		$header=new HtmlHeader("header-" . $this->identifier);
27
+		$header=new HtmlHeader("header-".$this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
29
+		if ($this->_inverted===false)
30 30
 			$header->setInverted();
31 31
 		return $this->setContent($header);
32 32
 	}
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
 	public function run(JsUtils $js) {
45 45
 		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+			$this->_bsComponent=$js->semantic()->dimmer("#".$this->_container->getIdentifier(), $this->_params);
47 47
 		return parent::run($js);
48 48
 	}
49 49
 
50 50
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
51
+		if (isset($this->_container)===true)
52
+			return '$("#.'.$this->_container->getIdentifier().').dimmer("show");';
53 53
 	}
54 54
 
55 55
 	public function setBlurring() {
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSearch.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 use Ajax\semantic\html\base\constants\Direction;
9 9
 
10 10
 class HtmlSearch extends HtmlSemDoubleElement {
11
-	private $_elements=array ();
12
-	private $_params=array ();
13
-	private $_searchFields=array ("title" );
11
+	private $_elements=array();
12
+	private $_params=array();
13
+	private $_searchFields=array("title");
14 14
 	private $_local=false;
15 15
 
16 16
 	public function __construct($identifier, $placeholder=NULL, $icon=NULL) {
17
-		parent::__construct("search-" . $identifier, "div", "ui search", array ());
17
+		parent::__construct("search-".$identifier, "div", "ui search", array());
18 18
 		$this->createField($placeholder, $icon);
19 19
 		$this->createResult();
20 20
 		$this->_params["type"]="standard";
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 
23 23
 	private function createField($placeholder=NULL, $icon=NULL) {
24 24
 		$field=new HtmlInput($this->identifier);
25
-		if (isset($placeholder) === true)
25
+		if (isset($placeholder)===true)
26 26
 			$field->setPlaceholder($placeholder);
27
-		if (isset($icon) === true)
27
+		if (isset($icon)===true)
28 28
 			$field->addIcon($icon, Direction::RIGHT);
29 29
 		$field->getField()->setClass("prompt");
30 30
 		$this->content["field"]=$field;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	}
33 33
 
34 34
 	private function createResult() {
35
-		$this->content["result"]=new HtmlSemDoubleElement("results-" . $this->identifier, "div", "results");
35
+		$this->content["result"]=new HtmlSemDoubleElement("results-".$this->identifier, "div", "results");
36 36
 		return $this->content["result"];
37 37
 	}
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	public function setUrl($url) {
52
-		$this->_params["apiSettings"]="%{url: %quote%" . $url . "%quote%}%";
52
+		$this->_params["apiSettings"]="%{url: %quote%".$url."%quote%}%";
53 53
 		return $this;
54 54
 	}
55 55
 
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	public function run(JsUtils $js) {
75
-		$this->_params["onSelect"]='%function(result,response){$(%quote%#' . $this->identifier . '%quote%).trigger(%quote%onSelect%quote%, {%quote%result%quote%: result, %quote%response%quote%:response} );}%';
75
+		$this->_params["onSelect"]='%function(result,response){$(%quote%#'.$this->identifier.'%quote%).trigger(%quote%onSelect%quote%, {%quote%result%quote%: result, %quote%response%quote%:response} );}%';
76 76
 		$searchFields=\json_encode($this->_searchFields);
77 77
 		$searchFields=str_ireplace("\"", "%quote%", $searchFields);
78
-		$this->_params["searchFields"]="%" . $searchFields . "%";
79
-		if ($this->_local === true) {
78
+		$this->_params["searchFields"]="%".$searchFields."%";
79
+		if ($this->_local===true) {
80 80
 			$this->_params["source"]="%content%";
81
-			$this->addEvent("beforeExecute", "var content=" . $this->resultsToJson() . ";");
81
+			$this->addEvent("beforeExecute", "var content=".$this->resultsToJson().";");
82 82
 		}
83
-		if (isset($this->_bsComponent) === false) {
84
-			$this->_bsComponent=$js->semantic()->search("#" . $this->identifier, $this->_params);
83
+		if (isset($this->_bsComponent)===false) {
84
+			$this->_bsComponent=$js->semantic()->search("#".$this->identifier, $this->_params);
85 85
 		}
86 86
 		$this->addEventsOnRun($js);
87 87
 		return $this->_bsComponent;
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	protected function createItem($value) {
20 20
 		$count=$this->count();
21 21
 		if (\is_array($value)) {
22
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
22
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		}else
25
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
26 26
 		return $item;
27 27
 	}
28 28
 
29 29
 	public function addHeader($niveau, $content) {
30
-		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
30
+		$header=new HtmlHeader("header-".$this->identifier, $niveau, $content, "page");
31 31
 		$this->wrap($header);
32 32
 		return $header;
33 33
 	}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function asLink() {
40
-		$this->addToPropertyCtrl("class", "link", array ("link" ));
40
+		$this->addToPropertyCtrl("class", "link", array("link"));
41 41
 		return $this->contentAs("a");
42 42
 	}
43 43
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	public function run(JsUtils $js) {
55
-		if ($this->_hasCheckedList === true) {
56
-			$jsCode=include dirname(__FILE__) . '/../../components/jsTemplates/tplCheckedList.php';
57
-			$jsCode=\str_replace("%identifier%", "#" . $this->identifier, $jsCode);
55
+		if ($this->_hasCheckedList===true) {
56
+			$jsCode=include dirname(__FILE__).'/../../components/jsTemplates/tplCheckedList.php';
57
+			$jsCode=\str_replace("%identifier%", "#".$this->identifier, $jsCode);
58 58
 			$this->executeOnRun($jsCode);
59 59
 		}
60 60
 		return parent::run($js);
@@ -70,28 +70,28 @@  discard block
 block discarded – undo
70 70
 
71 71
 	public function addCheckedList($items=array(), $masterItem=NULL, $values=array()) {
72 72
 		$count=$this->count();
73
-		$identifier=$this->identifier . "-" . $count;
73
+		$identifier=$this->identifier."-".$count;
74 74
 		if (isset($masterItem)) {
75
-			$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
75
+			$masterO=new HtmlFormCheckbox("master-".$identifier, $masterItem);
76 76
 			$masterO->getField()->addToProperty("class", "master");
77 77
 			$masterO->setClass("item");
78 78
 			$this->addItem($masterO);
79 79
 		}
80
-		$fields=array ();
80
+		$fields=array();
81 81
 		$i=0;
82
-		foreach ( $items as $val => $caption ) {
83
-			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
84
-			if (\array_search($val, $values) !== false) {
82
+		foreach ($items as $val => $caption) {
83
+			$itemO=new HtmlFormCheckbox($identifier."-".$i++, $caption, $val, "child");
84
+			if (\array_search($val, $values)!==false) {
85 85
 				$itemO->getField()->getField()->setProperty("checked", "");
86 86
 			}
87 87
 			$itemO->setClass("item");
88 88
 			$fields[]=$itemO;
89 89
 		}
90
-		if (isset($masterO) === true) {
90
+		if (isset($masterO)===true) {
91 91
 			$list=new HtmlList("", $fields);
92 92
 			$list->setClass("list");
93 93
 			$masterO->addContent($list);
94
-		} else {
94
+		}else {
95 95
 			$this->addList($fields);
96 96
 		}
97 97
 		$this->_hasCheckedList=true;
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	public function addDimmer($content=NULL) {
49
-		$dimmer=new HtmlDimmer("dimmer-" . $this->identifier, $content);
49
+		$dimmer=new HtmlDimmer("dimmer-".$this->identifier, $content);
50 50
 		$this->addContent($dimmer);
51 51
 		return $dimmer;
52 52
 	}
53 53
 
54 54
 	public function jsShowDimmer($show=true) {
55 55
 		$status="hide";
56
-		if ($show === true)
56
+		if ($show===true)
57 57
 			$status="show";
58
-		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
58
+		return '$("#.'.$this->identifier.').dimmer("'.$status.'");';
59 59
 	}
60 60
 
61 61
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 
67 67
 	public function run(JsUtils $js) {
68
-		$this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
68
+		$this->_bsComponent=$js->semantic()->generic("#".$this->identifier);
69 69
 		parent::run($js);
70 70
 		$this->addEventsOnRun($js);
71 71
 		if (isset($this->_popup)) {
Please login to merge, or discard this patch.