phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
ActiveRow.php
Go to the documentation of this file.
1<?php
2
4
10class ActiveRow {
14 private $table;
15 private $class;
16 private $event;
17 private $multiple;
24 public function __construct($table,$class="active",$event="click",$multiple=false){
25 $this->table=$table;
26 $this->class=$class;
27 $this->event=$event;
28 $this->multiple=$multiple;
29 }
30
31 public function getClass() {
32 return $this->class;
33 }
34
35 public function setClass($class) {
36 $this->class=$class;
37 return $this;
38 }
39
40 public function getEvent() {
41 return $this->event;
42 }
43
44 public function setEvent($event) {
45 $this->event=$event;
46 return $this;
47 }
48
49 public function getMultiple() {
50 return $this->multiple;
51 }
52
53 public function setMultiple($multiple) {
54 $this->multiple=$multiple;
55 return $this;
56 }
57
58 public function run(){
59 $multiple="";
60 if(!$this->multiple){
61 $multiple="$(this).closest('tbody').children('tr').removeClass('".$this->class."');";
62 }
63 $this->table->onRow($this->event, $multiple."$(this).toggleClass('".$this->class."');".$this->table->jsTrigger("activeRowChange","[this]"),false,false);
64 }
65
66}
A class for row selection in Table or DataTable.
Definition ActiveRow.php:10
__construct($table, $class="active", $event="click", $multiple=false)
Definition ActiveRow.php:24