@@ -58,6 +58,9 @@ discard block |
||
58 | 58 | return $this->addComponent(new Accordion($this->js), $attachTo, $params); |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $attachTo |
|
63 | + */ |
|
61 | 64 | public function sticky($attachTo=NULL, $params=NULL) { |
62 | 65 | return $this->addComponent(new Sticky($this->js), $attachTo, $params); |
63 | 66 | } |
@@ -66,18 +69,30 @@ discard block |
||
66 | 69 | return $this->addComponent(new Checkbox($this->js), $attachTo, $params); |
67 | 70 | } |
68 | 71 | |
72 | + /** |
|
73 | + * @param string $attachTo |
|
74 | + */ |
|
69 | 75 | public function rating($attachTo=NULL, $params=NULL) { |
70 | 76 | return $this->addComponent(new Rating($this->js), $attachTo, $params); |
71 | 77 | } |
72 | 78 | |
79 | + /** |
|
80 | + * @param string $attachTo |
|
81 | + */ |
|
73 | 82 | public function progress($attachTo=NULL, $params=NULL) { |
74 | 83 | return $this->addComponent(new Progress($this->js), $attachTo, $params); |
75 | 84 | } |
76 | 85 | |
86 | + /** |
|
87 | + * @param string $attachTo |
|
88 | + */ |
|
77 | 89 | public function search($attachTo=NULL, $params=NULL) { |
78 | 90 | return $this->addComponent(new Search($this->js), $attachTo, $params); |
79 | 91 | } |
80 | 92 | |
93 | + /** |
|
94 | + * @param string $attachTo |
|
95 | + */ |
|
81 | 96 | public function dimmer($attachTo=NULL, $params=NULL) { |
82 | 97 | return $this->addComponent(new Dimmer($this->js), $attachTo, $params); |
83 | 98 | } |
@@ -100,11 +100,11 @@ |
||
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 | } |
@@ -9,7 +9,7 @@ discard block |
||
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 |
||
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 |
||
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() { |
@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | public function asIcon($icon, $title, $subHeader=NULL) { |
27 | 27 | $header=new HtmlHeader("header-" . $this->identifier); |
28 | 28 | $header->asIcon($icon, $title, $subHeader); |
29 | - if ($this->_inverted === false) |
|
30 | - $header->setInverted(); |
|
29 | + if ($this->_inverted === false) { |
|
30 | + $header->setInverted(); |
|
31 | + } |
|
31 | 32 | return $this->setContent($header); |
32 | 33 | } |
33 | 34 | |
@@ -42,14 +43,16 @@ discard block |
||
42 | 43 | } |
43 | 44 | |
44 | 45 | public function run(JsUtils $js) { |
45 | - if ($this->_container instanceof HtmlSingleElement) |
|
46 | - $this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params); |
|
46 | + if ($this->_container instanceof HtmlSingleElement) { |
|
47 | + $this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params); |
|
48 | + } |
|
47 | 49 | return parent::run($js); |
48 | 50 | } |
49 | 51 | |
50 | 52 | public function jsShow() { |
51 | - if (isset($this->_container) === true) |
|
52 | - return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");'; |
|
53 | + if (isset($this->_container) === true) { |
|
54 | + return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");'; |
|
55 | + } |
|
53 | 56 | } |
54 | 57 | |
55 | 58 | public function setBlurring() { |
@@ -46,16 +46,16 @@ discard block |
||
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 |
||
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)) { |
@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | public function setPopupAttributes($variation=NULL, $popupEvent=NULL) { |
32 | - if (isset($this->_popup)) |
|
33 | - $this->_popup->setAttributes($variation, $popupEvent); |
|
32 | + if (isset($this->_popup)) { |
|
33 | + $this->_popup->setAttributes($variation, $popupEvent); |
|
34 | + } |
|
34 | 35 | } |
35 | 36 | |
36 | 37 | public function addPopup($title="", $content="", $variation=NULL, $params=array()) { |
@@ -53,14 +54,16 @@ discard block |
||
53 | 54 | |
54 | 55 | public function jsShowDimmer($show=true) { |
55 | 56 | $status="hide"; |
56 | - if ($show === true) |
|
57 | - $status="show"; |
|
57 | + if ($show === true) { |
|
58 | + $status="show"; |
|
59 | + } |
|
58 | 60 | return '$("#.' . $this->identifier . ').dimmer("' . $status . '");'; |
59 | 61 | } |
60 | 62 | |
61 | 63 | public function compile(JsUtils $js=NULL, View $view=NULL) { |
62 | - if (isset($this->_popup)) |
|
63 | - $this->_popup->compile(); |
|
64 | + if (isset($this->_popup)) { |
|
65 | + $this->_popup->compile(); |
|
66 | + } |
|
64 | 67 | return parent::compile($js, $view); |
65 | 68 | } |
66 | 69 |