|
@@ -7,12 +7,12 @@ discard block |
|
|
block discarded – undo |
|
7
|
7
|
* @author jc |
|
8
|
8
|
* @property HtmlTable $_self |
|
9
|
9
|
*/ |
|
10
|
|
-trait TableTrait{ |
|
|
10
|
+trait TableTrait { |
|
11
|
11
|
|
|
12
|
12
|
abstract public function addEvent($event, $jsCode, $stopPropagation=false, $preventDefault=false); |
|
13
|
13
|
abstract public function getOn($event, $url, $responseElement="", $parameters=array()); |
|
14
|
14
|
|
|
15
|
|
- protected function addToPropertyTable($property,$value){ |
|
|
15
|
+ protected function addToPropertyTable($property, $value) { |
|
16
|
16
|
return $this->_self->addToProperty($property, $value); |
|
17
|
17
|
} |
|
18
|
18
|
|
|
@@ -23,15 +23,15 @@ discard block |
|
|
block discarded – undo |
|
23
|
23
|
public function setBasic($very=false) { |
|
24
|
24
|
$table=$this->_self; |
|
25
|
25
|
if ($very) |
|
26
|
|
- $table->addToPropertyCtrl("class", "very", array ("very" )); |
|
27
|
|
- return $table->addToPropertyCtrl("class", "basic", array ("basic" )); |
|
|
26
|
+ $table->addToPropertyCtrl("class", "very", array("very")); |
|
|
27
|
+ return $table->addToPropertyCtrl("class", "basic", array("basic")); |
|
28
|
28
|
} |
|
29
|
29
|
|
|
30
|
30
|
public function setCompact($very=false) { |
|
31
|
31
|
$table=$this->_self; |
|
32
|
32
|
if ($very) |
|
33
|
|
- $table->addToPropertyCtrl("class", "very", array ("very" )); |
|
34
|
|
- return $table->addToPropertyCtrl("class", "compact", array ("compact" )); |
|
|
33
|
+ $table->addToPropertyCtrl("class", "very", array("very")); |
|
|
34
|
+ return $table->addToPropertyCtrl("class", "compact", array("compact")); |
|
35
|
35
|
} |
|
36
|
36
|
|
|
37
|
37
|
public function setCollapsing() { |
|
@@ -70,16 +70,16 @@ discard block |
|
|
block discarded – undo |
|
70
|
70
|
return $this->addToPropertyTable("class", "striped"); |
|
71
|
71
|
} |
|
72
|
72
|
|
|
73
|
|
- public function onRowClick($jsCode, $stopPropagation=false, $preventDefault=false){ |
|
74
|
|
- return $this->onRow("click", $jsCode,$stopPropagation,$preventDefault); |
|
|
73
|
+ public function onRowClick($jsCode, $stopPropagation=false, $preventDefault=false) { |
|
|
74
|
+ return $this->onRow("click", $jsCode, $stopPropagation, $preventDefault); |
|
75
|
75
|
} |
|
76
|
76
|
|
|
77
|
|
- public function onRow($event,$jsCode, $stopPropagation=false, $preventDefault=false){ |
|
78
|
|
- return $this->_self->addEvent($event."{{tr}}",$jsCode,$stopPropagation,$preventDefault); |
|
|
77
|
+ public function onRow($event, $jsCode, $stopPropagation=false, $preventDefault=false) { |
|
|
78
|
+ return $this->_self->addEvent($event."{{tr}}", $jsCode, $stopPropagation, $preventDefault); |
|
79
|
79
|
} |
|
80
|
80
|
|
|
81
|
|
- public function getOnRow($event, $url, $responseElement="", $parameters=array()){ |
|
82
|
|
- $parameters=\array_merge($parameters,["stopPropagation"=>false,"preventDefault"=>false]); |
|
83
|
|
- return $this->_self->getOn($event."{{tbody tr}}", $url,$responseElement,$parameters); |
|
|
81
|
+ public function getOnRow($event, $url, $responseElement="", $parameters=array()) { |
|
|
82
|
+ $parameters=\array_merge($parameters, ["stopPropagation"=>false, "preventDefault"=>false]); |
|
|
83
|
+ return $this->_self->getOn($event."{{tbody tr}}", $url, $responseElement, $parameters); |
|
84
|
84
|
} |
|
85
|
85
|
} |