@@ -13,8 +13,9 @@ discard block |
||
| 13 | 13 | $field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value); |
| 14 | 14 | $field->setProperty("name", $name); |
| 15 | 15 | $this->setField($field); |
| 16 | - if (isset($label)) |
|
| 17 | - $this->setLabel($label); |
|
| 16 | + if (isset($label)) { |
|
| 17 | + $this->setLabel($label); |
|
| 18 | + } |
|
| 18 | 19 | } |
| 19 | 20 | |
| 20 | 21 | public function setType($checkboxType) { |
@@ -40,8 +41,9 @@ discard block |
||
| 40 | 41 | * @return mixed |
| 41 | 42 | */ |
| 42 | 43 | public function getLabel() { |
| 43 | - if (\array_key_exists("label", $this->content)) |
|
| 44 | - return $this->content["label"]; |
|
| 44 | + if (\array_key_exists("label", $this->content)) { |
|
| 45 | + return $this->content["label"]; |
|
| 46 | + } |
|
| 45 | 47 | } |
| 46 | 48 | |
| 47 | 49 | /** |
@@ -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() { |
@@ -10,8 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function __construct($identifier,$context=NULL,$content=NULL) { |
| 12 | 12 | parent::__construct($identifier, "div", "ui sticky", $content); |
| 13 | - if(isset($content)) |
|
| 14 | - $this->setContext($context); |
|
| 13 | + if(isset($content)) { |
|
| 14 | + $this->setContext($context); |
|
| 15 | + } |
|
| 15 | 16 | } |
| 16 | 17 | |
| 17 | 18 | public function setContext($context){ |
@@ -22,10 +22,12 @@ |
||
| 22 | 22 | |
| 23 | 23 | private function createField($placeholder=NULL, $icon=NULL) { |
| 24 | 24 | $field=new HtmlInput($this->identifier); |
| 25 | - if (isset($placeholder) === true) |
|
| 26 | - $field->setPlaceholder($placeholder); |
|
| 27 | - if (isset($icon) === true) |
|
| 28 | - $field->addIcon($icon, Direction::RIGHT); |
|
| 25 | + if (isset($placeholder) === true) { |
|
| 26 | + $field->setPlaceholder($placeholder); |
|
| 27 | + } |
|
| 28 | + if (isset($icon) === true) { |
|
| 29 | + $field->addIcon($icon, Direction::RIGHT); |
|
| 30 | + } |
|
| 29 | 31 | $field->getField()->setClass("prompt"); |
| 30 | 32 | $this->content["field"]=$field; |
| 31 | 33 | return $field; |
@@ -62,8 +62,9 @@ |
||
| 62 | 62 | * @see BaseHtml::run() |
| 63 | 63 | */ |
| 64 | 64 | public function run(JsUtils $js) { |
| 65 | - if(isset($this->_bsComponent)===false) |
|
| 66 | - $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
| 65 | + if(isset($this->_bsComponent)===false) { |
|
| 66 | + $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
| 67 | + } |
|
| 67 | 68 | $this->addEventsOnRun($js); |
| 68 | 69 | return $this->_bsComponent; |
| 69 | 70 | } |
@@ -44,8 +44,9 @@ |
||
| 44 | 44 | $actionO=$action; |
| 45 | 45 | if (\is_object($action) === false) { |
| 46 | 46 | $actionO=new HtmlButton("action-" . $this->identifier, $action); |
| 47 | - if (isset($icon)) |
|
| 48 | - $actionO->addIcon($icon, true, $labeled); |
|
| 47 | + if (isset($icon)) { |
|
| 48 | + $actionO->addIcon($icon, true, $labeled); |
|
| 49 | + } |
|
| 49 | 50 | } |
| 50 | 51 | $this->addToProperty("class", $direction . " action"); |
| 51 | 52 | $this->addContent($actionO, \strstr($direction, Direction::LEFT) !== false); |
@@ -12,8 +12,9 @@ discard block |
||
| 12 | 12 | $image=new HtmlImg("img-", $src, $alt); |
| 13 | 13 | $image->setClass(""); |
| 14 | 14 | parent::__construct($identifier, "div", "ui image", $image); |
| 15 | - if (isset($size)) |
|
| 16 | - $this->setSize($size); |
|
| 15 | + if (isset($size)) { |
|
| 16 | + $this->setSize($size); |
|
| 17 | + } |
|
| 17 | 18 | } |
| 18 | 19 | |
| 19 | 20 | public function setCircular() { |
@@ -21,8 +22,9 @@ discard block |
||
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | public function asAvatar($caption=NULL) { |
| 24 | - if (isset($caption)) |
|
| 25 | - $this->wrap("", $caption); |
|
| 25 | + if (isset($caption)) { |
|
| 26 | + $this->wrap("", $caption); |
|
| 27 | + } |
|
| 26 | 28 | return $this->addToProperty("class", "avatar"); |
| 27 | 29 | } |
| 28 | 30 | |
@@ -14,8 +14,9 @@ |
||
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function asAvatar($caption=NULL) { |
| 17 | - if (isset($caption)) |
|
| 18 | - $this->wrap("", $caption); |
|
| 17 | + if (isset($caption)) { |
|
| 18 | + $this->wrap("", $caption); |
|
| 19 | + } |
|
| 19 | 20 | return $this->addToProperty("class", "avatar"); |
| 20 | 21 | } |
| 21 | 22 | } |
| 22 | 23 | \ No newline at end of file |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function setFocusable($value=true) { |
| 58 | - if ($value === true) |
|
| 59 | - $this->setProperty("tabindex", "0"); |
|
| 60 | - else { |
|
| 58 | + if ($value === true) { |
|
| 59 | + $this->setProperty("tabindex", "0"); |
|
| 60 | + } else { |
|
| 61 | 61 | $this->removeProperty("tabindex"); |
| 62 | 62 | } |
| 63 | 63 | return $this; |
@@ -109,8 +109,9 @@ discard block |
||
| 109 | 109 | $this->content=new HtmlButton("button-" . $this->identifier, $this->content); |
| 110 | 110 | $this->content->setTagName("div"); |
| 111 | 111 | $label=new HtmlLabel("label-" . $this->identifier, $label, "a"); |
| 112 | - if(isset($icon)) |
|
| 113 | - $label->addIcon($icon); |
|
| 112 | + if(isset($icon)) { |
|
| 113 | + $label->addIcon($icon); |
|
| 114 | + } |
|
| 114 | 115 | $label->setBasic(); |
| 115 | 116 | $this->addContent($label, $before); |
| 116 | 117 | return $label; |
@@ -185,8 +186,9 @@ discard block |
||
| 185 | 186 | } |
| 186 | 187 | |
| 187 | 188 | public static function social($identifier, $social, $value=NULL) { |
| 188 | - if ($value === NULL) |
|
| 189 | - $value=\ucfirst($social); |
|
| 189 | + if ($value === NULL) { |
|
| 190 | + $value=\ucfirst($social); |
|
| 191 | + } |
|
| 190 | 192 | $return=new HtmlButton($identifier, $value); |
| 191 | 193 | $return->addIcon($social); |
| 192 | 194 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |