Skip to content

Commit 5f63ee6

Browse files
committed
Test doc overriding
1 parent ff68ab8 commit 5f63ee6

File tree

3 files changed

+54
-35
lines changed

3 files changed

+54
-35
lines changed

Ajax/common/traits/JsUtilsActionsTrait.php

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ abstract public function _add_event($element, $js, $event, $preventDefault=false
1616
* show or hide with effect
1717
*
1818
* @param string $action
19-
* @param string - element
20-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
21-
* @param string - Javascript callback function
19+
* @param string $element element
20+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
21+
* @param string $callback Javascript callback function
2222
* @param boolean $immediatly defers the execution if set to false
2323
* @return string
2424
*/
@@ -162,7 +162,7 @@ public function html($element='this', $value='', $immediatly=false) {
162162
* Outputs a javascript library animate event
163163
*
164164
* @param string $element element
165-
* @param array $params
165+
* @param array|string $params
166166
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
167167
* @param string $extra
168168
* @param boolean $immediatly defers the execution if set to false
@@ -220,9 +220,9 @@ public function prepend($to, $element, $immediatly=false) {
220220
/**
221221
* Execute a javascript library hide action
222222
*
223-
* @param string - element
224-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
225-
* @param string - Javascript callback function
223+
* @param string $element element
224+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
225+
* @param string $callback Javascript callback function
226226
* @param boolean $immediatly defers the execution if set to false
227227
* @return string
228228
*/
@@ -233,9 +233,9 @@ public function fadeIn($element='this', $speed='', $callback='', $immediatly=fal
233233
/**
234234
* Execute a javascript library hide action
235235
*
236-
* @param string - element
237-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
238-
* @param string - Javascript callback function
236+
* @param string $element element
237+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
238+
* @param string $callback Javascript callback function
239239
* @param boolean $immediatly defers the execution if set to false
240240
* @return string
241241
*/
@@ -246,9 +246,9 @@ public function fadeOut($element='this', $speed='', $callback='', $immediatly=fa
246246
/**
247247
* Execute a javascript library slideUp action
248248
*
249-
* @param string - element
250-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
251-
* @param string - Javascript callback function
249+
* @param string $element element
250+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
251+
* @param string $callback Javascript callback function
252252
* @param boolean $immediatly defers the execution if set to false
253253
* @return string
254254
*/
@@ -259,21 +259,21 @@ public function slideUp($element='this', $speed='', $callback='', $immediatly=fa
259259
/**
260260
* Execute a javascript library removeClass action
261261
*
262-
* @param string - element
263-
* @param string - Class to add
262+
* @param string $element element
263+
* @param string $class Class to add
264264
* @param boolean $immediatly defers the execution if set to false
265265
* @return string
266266
*/
267267
public function removeClass($element='this', $class='', $immediatly=false) {
268-
return $this->_genericCall('removeClass',$element, $class, $immediatly);
268+
return $this->_genericCallValue('removeClass',$element, $class, $immediatly);
269269
}
270270

271271
/**
272272
* Execute a javascript library slideDown action
273273
*
274-
* @param string - element
275-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
276-
* @param string - Javascript callback function
274+
* @param string $element element
275+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
276+
* @param string $callback Javascript callback function
277277
* @param boolean $immediatly defers the execution if set to false
278278
* @return string
279279
*/
@@ -284,9 +284,9 @@ public function slideDown($element='this', $speed='', $callback='', $immediatly=
284284
/**
285285
* Execute a javascript library slideToggle action
286286
*
287-
* @param string - element
288-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
289-
* @param string - Javascript callback function
287+
* @param string $element element
288+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
289+
* @param string $callback Javascript callback function
290290
* @param boolean $immediatly defers the execution if set to false
291291
* @return string
292292
*/
@@ -297,9 +297,9 @@ public function slideToggle($element='this', $speed='', $callback='', $immediatl
297297
/**
298298
* Execute a javascript library hide action
299299
*
300-
* @param string - element
301-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
302-
* @param string - Javascript callback function
300+
* @param string $element element
301+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
302+
* @param string $callback Javascript callback function
303303
* @param boolean $immediatly defers the execution if set to false
304304
* @return string
305305
*/
@@ -310,9 +310,9 @@ public function hide($element='this', $speed='', $callback='', $immediatly=false
310310
/**
311311
* Execute a javascript library toggle action
312312
*
313-
* @param string - element
314-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
315-
* @param string - Javascript callback function
313+
* @param string $element element
314+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
315+
* @param string $callback Javascript callback function
316316
* @param boolean $immediatly defers the execution if set to false
317317
* @return string
318318
*/
@@ -323,7 +323,8 @@ public function toggle($element='this', $speed='', $callback='', $immediatly=fal
323323
/**
324324
* Execute a javascript library toggle class action
325325
*
326-
* @param string - element
326+
* @param string $element element
327+
* @param string $class
327328
* @param boolean $immediatly defers the execution if set to false
328329
* @return string
329330
*/
@@ -349,9 +350,9 @@ public function trigger($element='this', $event='click', $immediatly=false) {
349350
/**
350351
* Execute a javascript library show action
351352
*
352-
* @param string - element
353-
* @param string - One of 'slow', 'normal', 'fast', or time in milliseconds
354-
* @param string - Javascript callback function
353+
* @param string $element element
354+
* @param string $speed One of 'slow', 'normal', 'fast', or time in milliseconds
355+
* @param string $callback Javascript callback function
355356
* @param boolean $immediatly defers the execution if set to false
356357
* @return string
357358
*/

Ajax/semantic/html/content/table/HtmlTR.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ protected function createItem($value) {
4848
$td->setContainer($this->_container, $this->_row, $count);
4949
return $td;
5050
}
51+
52+
/**
53+
* @return HtmlTD
54+
*/
55+
public function getItem($index){
56+
return parent::getItem($index);
57+
}
5158

5259
public function setTdTagName($tagName="td") {
5360
$this->_tdTagName=$tagName;

Ajax/semantic/html/content/table/HtmlTableContent.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Ajax\semantic\html\base\HtmlSemCollection;
66
use Ajax\service\JArray;
7+
use Ajax\common\html\HtmlCollection;
8+
use Ajax\common\html\HtmlDoubleElement;
79

810
/**
911
* a table content (thead, tbody or tfoot)
@@ -54,7 +56,7 @@ public function getTdTagName($tagName) {
5456
*/
5557
protected function createItem($value) {
5658
$count=$this->count();
57-
$tr=new HtmlTR("", $value);
59+
$tr=new HtmlTR("");
5860
$tr->setContainer($this, $count);
5961
$tr->setTdTagName($this->_tdTagNames[$this->tagName]);
6062
if (isset($value) === true) {
@@ -82,17 +84,26 @@ public function addRow($colCount) {
8284
public function _addRow($row) {
8385
return $this->addItem($row);
8486
}
87+
88+
/**
89+
* @return HtmlTR
90+
*/
91+
public function getItem($index){
92+
return parent::getItem($index);
93+
}
8594

8695
/**
8796
* Returns the cell (HtmlTD) at position $row,$col
8897
* @param int $row
8998
* @param int $col
90-
* @return HtmlTD
99+
* @return HtmlTD|HtmlDoubleElement
91100
*/
92101
public function getCell($row, $col) {
93102
$row=$this->getItem($row);
94-
if (isset($row)) {
103+
if (isset($row) && $row instanceof HtmlCollection) {
95104
$col=$row->getItem($col);
105+
}else{
106+
$col=$row;
96107
}
97108
return $col;
98109
}

0 commit comments

Comments
 (0)