@@ -7,6 +7,10 @@ |
||
7 | 7 | trait IconTrait { |
8 | 8 | private $_hasIcon=false; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $name |
|
12 | + * @param string $value |
|
13 | + */ |
|
10 | 14 | protected abstract function addToPropertyCtrl($name, $value, $typeCtrl); |
11 | 15 | public abstract function addContent($content,$before=false); |
12 | 16 |
@@ -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 ) { |
@@ -68,10 +68,16 @@ discard block |
||
68 | 68 | return $tr; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param integer $value |
|
73 | + */ |
|
71 | 74 | public function newRow($value) { |
72 | 75 | return $this->createItem($value); |
73 | 76 | } |
74 | 77 | |
78 | + /** |
|
79 | + * @param integer $colCount |
|
80 | + */ |
|
75 | 81 | public function addRow($colCount) { |
76 | 82 | return $this->addItem($colCount); |
77 | 83 | } |
@@ -97,7 +103,7 @@ discard block |
||
97 | 103 | /** |
98 | 104 | * |
99 | 105 | * @param int $index |
100 | - * @return \Ajax\semantic\html\content\HtmlTR |
|
106 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
101 | 107 | */ |
102 | 108 | public function getRow($index) { |
103 | 109 | return $this->getItem($index); |
@@ -141,6 +147,9 @@ discard block |
||
141 | 147 | return $this; |
142 | 148 | } |
143 | 149 | |
150 | + /** |
|
151 | + * @param integer $colIndex |
|
152 | + */ |
|
144 | 153 | public function setColValues($colIndex, $values=array()) { |
145 | 154 | $count=$this->count(); |
146 | 155 | if (\is_array($values) === false) { |
@@ -161,6 +170,9 @@ discard block |
||
161 | 170 | return $this; |
162 | 171 | } |
163 | 172 | |
173 | + /** |
|
174 | + * @param integer $rowIndex |
|
175 | + */ |
|
164 | 176 | public function setRowValues($rowIndex, $values=array()) { |
165 | 177 | $count=$this->count(); |
166 | 178 | if (\is_array($values) === false) { |
@@ -170,6 +182,9 @@ discard block |
||
170 | 182 | return $this; |
171 | 183 | } |
172 | 184 | |
185 | + /** |
|
186 | + * @param string $function |
|
187 | + */ |
|
173 | 188 | private function colAlign($colIndex, $function) { |
174 | 189 | $count=$this->count(); |
175 | 190 | for($i=0; $i < $count; $i++) { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | protected $_tabsType="tabs"; |
21 | 21 | protected $stacked=""; |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $identifier |
|
25 | + */ |
|
23 | 26 | public function __construct($identifier, $tagName="ul") { |
24 | 27 | parent::__construct($identifier, $tagName); |
25 | 28 | $this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%"; |
@@ -22,6 +22,9 @@ discard block |
||
22 | 22 | private $_colSizing=true; |
23 | 23 | private $_implicitRows=false; |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $identifier |
|
27 | + */ |
|
25 | 28 | public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) { |
26 | 29 | parent::__construct($identifier, "div", "ui grid"); |
27 | 30 | $this->_implicitRows=$implicitRows; |
@@ -158,7 +161,7 @@ discard block |
||
158 | 161 | /** |
159 | 162 | * return the row at $index |
160 | 163 | * @param int $index |
161 | - * @return \Ajax\semantic\html\collections\HtmlGridRow |
|
164 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
162 | 165 | */ |
163 | 166 | public function getRow($index) { |
164 | 167 | return $this->getItem($index); |
@@ -297,7 +300,7 @@ discard block |
||
297 | 300 | |
298 | 301 | /** |
299 | 302 | * stretch the row contents to take up the entire column height |
300 | - * @return \Ajax\semantic\html\content\HtmlGridRow |
|
303 | + * @return HtmlGrid |
|
301 | 304 | */ |
302 | 305 | public function setStretched() { |
303 | 306 | return $this->addToProperty("class", "stretched"); |
@@ -54,6 +54,9 @@ |
||
54 | 54 | return $this->setParam("keyboard", $value); |
55 | 55 | } |
56 | 56 | |
57 | + /** |
|
58 | + * @param boolean $value |
|
59 | + */ |
|
57 | 60 | public function setDraggable($value) { |
58 | 61 | if ($value) { |
59 | 62 | $this->jsCodes ["draggable"]=new Draggable(); |
@@ -124,6 +124,10 @@ discard block |
||
124 | 124 | return $this; |
125 | 125 | } |
126 | 126 | |
127 | + /** |
|
128 | + * @param string $name |
|
129 | + * @param string[] $typeCtrl |
|
130 | + */ |
|
127 | 131 | protected function setMemberCtrl(&$name, $value, $typeCtrl) { |
128 | 132 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
129 | 133 | return $name=$value; |
@@ -139,22 +143,35 @@ discard block |
||
139 | 143 | return $this; |
140 | 144 | } |
141 | 145 | |
146 | + /** |
|
147 | + * @param string $name |
|
148 | + */ |
|
142 | 149 | protected function removePropertyValue($name, $value) { |
143 | 150 | $this->properties[$name]=\str_replace($value, "", $this->properties[$name]); |
144 | 151 | return $this; |
145 | 152 | } |
146 | 153 | |
154 | + /** |
|
155 | + * @param string $name |
|
156 | + */ |
|
147 | 157 | protected function removePropertyValues($name, $values) { |
148 | 158 | $this->removeOldValues($this->properties[$name], $values); |
149 | 159 | return $this; |
150 | 160 | } |
151 | 161 | |
162 | + /** |
|
163 | + * @param string $name |
|
164 | + */ |
|
152 | 165 | protected function removeProperty($name) { |
153 | 166 | if (\array_key_exists($name, $this->properties)) |
154 | 167 | unset($this->properties[$name]); |
155 | 168 | return $this; |
156 | 169 | } |
157 | 170 | |
171 | + /** |
|
172 | + * @param string $name |
|
173 | + * @param string[] $typeCtrl |
|
174 | + */ |
|
158 | 175 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
159 | 176 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
160 | 177 | if (is_array($typeCtrl)) { |
@@ -165,6 +182,9 @@ discard block |
||
165 | 182 | return $this; |
166 | 183 | } |
167 | 184 | |
185 | + /** |
|
186 | + * @param string $name |
|
187 | + */ |
|
168 | 188 | protected function addToMember(&$name, $value, $separator=" ") { |
169 | 189 | $name=str_ireplace($value, "", $name) . $separator . $value; |
170 | 190 | return $this; |
@@ -179,6 +199,9 @@ discard block |
||
179 | 199 | return $this->addToProperty($name, $value); |
180 | 200 | } |
181 | 201 | |
202 | + /** |
|
203 | + * @param string $name |
|
204 | + */ |
|
182 | 205 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
183 | 206 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
184 | 207 | } |
@@ -327,14 +350,23 @@ discard block |
||
327 | 350 | return $this; |
328 | 351 | } |
329 | 352 | |
353 | + /** |
|
354 | + * @param string $event |
|
355 | + */ |
|
330 | 356 | public function getOn($event, $url, $responseElement="", $parameters=array()) { |
331 | 357 | return $this->_ajaxOn("get", $event, $url, $responseElement, $parameters); |
332 | 358 | } |
333 | 359 | |
360 | + /** |
|
361 | + * @param string $url |
|
362 | + */ |
|
334 | 363 | public function getOnClick($url, $responseElement="", $parameters=array()) { |
335 | 364 | return $this->getOn("click", $url, $responseElement, $parameters); |
336 | 365 | } |
337 | 366 | |
367 | + /** |
|
368 | + * @param string $event |
|
369 | + */ |
|
338 | 370 | public function postOn($event, $url, $params="{}", $responseElement="", $parameters=array()) { |
339 | 371 | $parameters["params"]=$params; |
340 | 372 | return $this->_ajaxOn("post", $event, $url, $responseElement, $parameters); |
@@ -344,6 +376,9 @@ discard block |
||
344 | 376 | return $this->postOn("click", $url, $params, $responseElement, $parameters); |
345 | 377 | } |
346 | 378 | |
379 | + /** |
|
380 | + * @param string $event |
|
381 | + */ |
|
347 | 382 | public function postFormOn($event, $url, $form, $responseElement="", $parameters=array()) { |
348 | 383 | $parameters["form"]=$form; |
349 | 384 | return $this->_ajaxOn("postForm", $event, $url, $responseElement, $parameters); |
@@ -371,6 +406,10 @@ discard block |
||
371 | 406 | return null; |
372 | 407 | } |
373 | 408 | |
409 | + /** |
|
410 | + * @param string $propertyName |
|
411 | + * @param string $value |
|
412 | + */ |
|
374 | 413 | protected function getElementByPropertyValue($propertyName,$value, $elements) { |
375 | 414 | if (is_array($elements)) { |
376 | 415 | $flag=false; |
@@ -411,6 +450,9 @@ discard block |
||
411 | 450 | return $value; |
412 | 451 | } |
413 | 452 | |
453 | + /** |
|
454 | + * @param string $jqueryCall |
|
455 | + */ |
|
414 | 456 | public function jsDoJquery($jqueryCall, $param="") { |
415 | 457 | return "$('#" . $this->identifier . "')." . $jqueryCall . "(" . $this->_prep_value($param) . ");"; |
416 | 458 | } |
@@ -55,6 +55,9 @@ discard block |
||
55 | 55 | return $this->_semantic; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param JsUtils $jsUtils |
|
60 | + */ |
|
58 | 61 | public function __construct($params,$jsUtils) { |
59 | 62 | $this->params=array(); |
60 | 63 | foreach ( $params as $key => $val ) { |
@@ -175,7 +178,7 @@ discard block |
||
175 | 178 | * |
176 | 179 | * @param string $element |
177 | 180 | * @param array $options |
178 | - * @return void |
|
181 | + * @return string |
|
179 | 182 | */ |
180 | 183 | public function sortable($element, $options=array()) { |
181 | 184 | if (count($options)>0) { |
@@ -306,6 +309,7 @@ discard block |
||
306 | 309 | |
307 | 310 | /** |
308 | 311 | * A wrapper for writing document.ready() |
312 | + * @param string $js |
|
309 | 313 | * @return string |
310 | 314 | */ |
311 | 315 | public function _document_ready($js) { |
@@ -353,6 +357,9 @@ discard block |
||
353 | 357 | return $value; |
354 | 358 | } |
355 | 359 | |
360 | + /** |
|
361 | + * @param string $input |
|
362 | + */ |
|
356 | 363 | private function minify($input) { |
357 | 364 | if(trim($input) === "") return $input; |
358 | 365 | return preg_replace( |
@@ -11,6 +11,9 @@ |
||
11 | 11 | |
12 | 12 | abstract class HtmlAbsractItem extends HtmlSemDoubleElement { |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $baseClass |
|
16 | + */ |
|
14 | 17 | public function __construct($identifier, $baseClass,$content=NULL) { |
15 | 18 | parent::__construct($identifier, "div", $baseClass); |
16 | 19 | $this->content=array(); |