@@ -17,6 +17,11 @@ discard block |
||
| 17 | 17 | class HtmlTable extends HtmlSemDoubleElement { |
| 18 | 18 | private $_colCount; |
| 19 | 19 | |
| 20 | + /** |
|
| 21 | + * @param string $identifier |
|
| 22 | + * @param integer $rowCount |
|
| 23 | + * @param integer $colCount |
|
| 24 | + */ |
|
| 20 | 25 | public function __construct($identifier, $rowCount, $colCount) { |
| 21 | 26 | parent::__construct($identifier, "table", "ui table"); |
| 22 | 27 | $this->content=array (); |
@@ -96,7 +101,7 @@ discard block |
||
| 96 | 101 | /** |
| 97 | 102 | * Retuns the row at $rowIndex |
| 98 | 103 | * @param int $rowIndex |
| 99 | - * @return \Ajax\semantic\html\content\HtmlTR |
|
| 104 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
| 100 | 105 | */ |
| 101 | 106 | public function getRow($rowIndex) { |
| 102 | 107 | return $this->getBody()->getRow($rowIndex); |
@@ -172,6 +177,9 @@ discard block |
||
| 172 | 177 | return $this->colAlign($colIndex, "colLeft"); |
| 173 | 178 | } |
| 174 | 179 | |
| 180 | + /** |
|
| 181 | + * @param string $function |
|
| 182 | + */ |
|
| 175 | 183 | private function colAlign($colIndex, $function) { |
| 176 | 184 | if (\is_array($colIndex)) { |
| 177 | 185 | foreach ( $colIndex as $cIndex ) { |
@@ -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 | } |
@@ -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() { |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | if (\is_array($value)) { |
| 22 | 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 | 27 | return $item; |
| 27 | 28 | } |
| 28 | 29 | |
@@ -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 | |