13 abstract public function addEvent($event, $jsCode, $stopPropagation =
false, $preventDefault =
false);
15 abstract public function getOn($event, $url, $responseElement =
"", $parameters = array());
18 return $this->_self->addToProperty($property, $value);
26 $table = $this->_self;
28 $table->addToPropertyCtrl(
"class",
"very", array(
31 return $table->addToPropertyCtrl(
"class",
"basic", array(
37 $table = $this->_self;
39 $table->addToPropertyCtrl(
"class",
"very", array(
42 return $table->addToPropertyCtrl(
"class",
"compact", array(
60 $table = $this->_self;
61 if (isset($colIndex) && $table->hasPart(
"thead")) {
62 $table->getHeader()->sort($colIndex);
64 return $table->addToProperty(
"class",
"sortable");
83 public function onRowClick($jsCode, $stopPropagation =
false, $preventDefault =
false) {
84 return $this->
onRow(
"click", $jsCode, $stopPropagation, $preventDefault);
87 public function onRow($event, $jsCode, $stopPropagation =
false, $preventDefault =
false) {
88 return $this->_self->addEvent($event .
"{{tbody tr}}", $jsCode, $stopPropagation, $preventDefault);
91 public function getOnRow($event, $url, $responseElement =
"", $parameters = array()) {
92 $activeClass = $this->_self->getActiveRowClass();
93 $jsCondition =
'(!$(this).closest("tr").hasClass("' . $activeClass .
'") || event.target.tagName === "TR")';
94 if (isset($parameters[
'jsCondition'])) {
95 $jsCondition =
'(' . $parameters[
'jsCondition'] .
' && ' . $jsCondition .
')';
97 $parameters = \array_merge($parameters, [
98 "stopPropagation" =>
false,
99 "preventDefault" =>
false,
100 "jsCondition" => $jsCondition
102 $selector =
"tbody tr";
103 if (isset($parameters[
"selector"])) {
104 $selector = $parameters[
"selector"];
106 return $this->_self->getOn($event .
"{{" . $selector .
"}}", $url, $responseElement, $parameters);
110 $this->_self->_addEvent(
"pageChange", $jsCode);
115 $this->_self->_addEvent(
"searchTerminate", $jsCode);
120 return $this->_self->getBsComponent()->getScript();
125 $innerScript = $this->_self->getInnerScript();
126 if (! isset($innerScript)) {
127 $this->_self->setInnerScript($script);
setSortable($colIndex=NULL)
getOnRow($event, $url, $responseElement="", $parameters=array())
getOn($event, $url, $responseElement="", $parameters=array())
Performs a get to $url on the event $event on $element and display it in $responseElement.
addToPropertyTable($property, $value)
onSearchTerminate($jsCode)
onRow($event, $jsCode, $stopPropagation=false, $preventDefault=false)
addEvent($event, $jsCode, $stopPropagation=false, $preventDefault=false)
onRowClick($jsCode, $stopPropagation=false, $preventDefault=false)
addEventsOnRun(JsUtils $js=NULL)