1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-04-25 03:30:53 +02:00

Continued stateful class

This commit is contained in:
Max Guglielmi 2016-03-15 18:18:51 +11:00
parent 975dc35059
commit b55bd0119a
12 changed files with 239 additions and 115 deletions

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
.activeHeader{background-color:#66afe9 !important;color:#fff !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
table.TF{border-left:1px solid #ccc;border-top:none;border-right:none;border-bottom:none;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;border-left:1px solid #fff;border-top:1px solid #fff;color:#333}table.TF td{border-bottom:1px dotted #999;padding:5px}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#999 !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
table.TF{border-left:1px dotted #81963b;border-top:none;border-right:0;border-bottom:none;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x;border-bottom:0;border-right:1px dotted #d0d0d0;border-left:0;border-top:0;color:#fff}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#81963b !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.0 by Max Guglielmi
* build date: 2016-03-14T05:50:30.144Z
* build date: 2016-03-15T05:28:00.528Z
* MIT License
*/
table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important}

View file

@ -173,7 +173,7 @@ return /******/ (function(modules) { // webpackBootstrap
var _noResults = __webpack_require__(25);
var _state = __webpack_require__(26);
var _stateful = __webpack_require__(26);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@ -668,10 +668,10 @@ return /******/ (function(modules) { // webpackBootstrap
}
if (this.isStateful) {
if (!Mod.state) {
Mod.state = new _state.State(tf);
if (!Mod.stateful) {
Mod.stateful = new _stateful.Stateful(tf);
}
Mod.state.init();
Mod.stateful.init();
}
if (this.hasPersistence) {
@ -7695,12 +7695,18 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.State = undefined;
exports.Stateful = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _feature = __webpack_require__(11);
var _string = __webpack_require__(3);
var _string2 = _interopRequireDefault(_string);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@ -7708,36 +7714,40 @@ return /******/ (function(modules) { // webpackBootstrap
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var global = window;
var JSON = global.JSON;
var location = global.location;
var hasHashChange = function hasHashChange() {
var docMode = global.documentMode;
return 'onhashchange' in global && (docMode === undefined || docMode > 7);
};
var State = exports.State = function (_Feature) {
_inherits(State, _Feature);
var Stateful = exports.Stateful = function (_Feature) {
_inherits(Stateful, _Feature);
/**
* Makes selected features stateful via URL hash
* Makes features stateful via URL hash
* @param {Object} tf TableFilter instance
*/
function State(tf) {
_classCallCheck(this, State);
function Stateful(tf) {
_classCallCheck(this, Stateful);
//configuration object
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(State).call(this, tf, 'state'));
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Stateful).call(this, tf, 'stateful'));
var cfg = _this.config.stateful;
_this.filters = cfg.filters === false ? false : true;
_this.persistFilters = cfg.filters === false ? false : true;
_this.persistPageNumber = Boolean(cfg.page_number);
_this.pageNb = null;
_this.lastHash = null;
_this.hashObj = {};
_this.state = {};
_this.prfxCol = 'col_';
_this.prfxPageNb = 'page';
return _this;
}
_createClass(State, [{
_createClass(Stateful, [{
key: 'init',
value: function init() {
var _this2 = this;
@ -7746,59 +7756,117 @@ return /******/ (function(modules) { // webpackBootstrap
return;
}
// subscribe to after-filtering event
this.emitter.on(['initialized'], function () {
return _this2.sync();
});
this.emitter.on(['after-filtering'], function () {
return _this2.update();
});
this.emitter.on(['after-changing-page'], function () {
return _this2.update();
});
this.initialized = true;
}
}, {
key: 'formatHash',
value: function formatHash() {
key: 'format',
value: function format() {
var _this3 = this;
if (this.filters) {
var filterValues = this.tf.getFiltersValue();
var tf = this.tf;
if (this.persistFilters) {
var filterValues = tf.getFiltersValue();
filterValues.forEach(function (val, idx) {
_this3.hashObj['col_' + idx] = _this3.hashObj['col_' + idx] || {};
_this3.hashObj['col_' + idx]['flt'] = val;
var key = '' + _this3.prfxCol + idx;
if (_string2.default.isEmpty(val)) {
if (_this3.state.hasOwnProperty(key)) {
_this3.state[key] = undefined;
}
} else {
_this3.state[key] = _this3.state[key] || {};
_this3.state[key].flt = val;
}
});
}
return '#' + JSON.stringify(this.hashObj);
if (this.persistPageNumber) {
var pageNumber = tf.feature('paging').getPage();
this.state[this.prfxPageNb] = pageNumber;
}
return '#' + JSON.stringify(this.state);
}
}, {
key: 'parse',
value: function parse(hash) {
if (hash.indexOf('#') === 0) {
hash = hash.substr(1);
} else {
hash = '{}';
}
return JSON.parse(hash);
}
}, {
key: 'update',
value: function update() {
var hash = this.formatHash();
var hash = this.format();
console.log(hash, this.lastHash, this.lastHash === hash);
if (this.lastHash === hash) {
return;
}
global.location.hash = hash;
location.hash = hash;
this.lastHash = hash;
}
}, {
key: 'sync',
value: function sync() {
var _this4 = this;
var state = this.parse(location.hash);
var tf = this.tf;
if (this.persistFilters) {
Object.keys(state).forEach(function (key) {
if (key.indexOf(_this4.prfxCol) !== -1) {
var colIdx = parseInt(key.replace(_this4.prfxCol, ''));
var val = state[key].flt;
tf.setFilterValue(colIdx, val);
}
});
tf.filter();
}
if (this.persistPageNumber) {
var pageNumber = state[this.prfxPageNb];
tf.feature('paging').setPage(pageNumber);
}
}
}, {
key: 'destroy',
value: function destroy() {
var _this4 = this;
var _this5 = this;
if (!this.initialized) {
return;
}
this.emitter.on(['initialized'], function () {
return _this5.sync();
});
this.emitter.off(['after-filtering'], function () {
return _this4.update();
return _this5.update();
});
this.initialized = false;
}
}]);
return State;
return Stateful;
}(_feature.Feature);
/***/ }

View file

@ -58,8 +58,8 @@ webpackJsonp([1],{
"./modules/popupFilter.js": 14,
"./modules/rowsCounter": 19,
"./modules/rowsCounter.js": 19,
"./modules/state": 26,
"./modules/state.js": 26,
"./modules/stateful": 26,
"./modules/stateful.js": 26,
"./modules/statusBar": 20,
"./modules/statusBar.js": 20,
"./modules/store": 8,

View file

@ -1,71 +0,0 @@
import {Feature} from './feature';
const global = window;
const hasHashChange = ()=> {
var docMode = global.documentMode;
return ('onhashchange' in global) && (docMode === undefined || docMode > 7);
};
export class State extends Feature{
/**
* Makes selected features stateful via URL hash
* @param {Object} tf TableFilter instance
*/
constructor(tf){
super(tf, 'state');
//configuration object
let cfg = this.config.stateful;
this.filters = cfg.filters === false ? false : true;
this.lastHash = null;
this.hashObj = {};
}
init(){
if(this.initialized || !hasHashChange()){
return;
}
// subscribe to after-filtering event
this.emitter.on(['after-filtering'], ()=> this.update());
this.initialized = true;
}
formatHash(){
if(this.filters){
let filterValues = this.tf.getFiltersValue();
filterValues.forEach((val, idx)=> {
this.hashObj['col_' + idx] = this.hashObj['col_' + idx] || {};
this.hashObj['col_' + idx]['flt'] = val;
});
}
return `#${JSON.stringify(this.hashObj)}`;
}
update(){
let hash = this.formatHash();
console.log(hash, this.lastHash, this.lastHash === hash);
if(this.lastHash === hash){
return;
}
global.location.hash = hash;
this.lastHash = hash;
}
destroy(){
if(!this.initialized){
return;
}
this.emitter.off(['after-filtering'], ()=> this.update());
this.initialized = false;
}
}

126
src/modules/stateful.js Normal file
View file

@ -0,0 +1,126 @@
import {Feature} from './feature';
import Str from '../string';
const global = window;
const JSON = global.JSON;
const location = global.location;
const hasHashChange = ()=> {
var docMode = global.documentMode;
return ('onhashchange' in global) && (docMode === undefined || docMode > 7);
};
export class Stateful extends Feature{
/**
* Makes features stateful via URL hash
* @param {Object} tf TableFilter instance
*/
constructor(tf){
super(tf, 'stateful');
let cfg = this.config.stateful;
this.persistFilters = cfg.filters === false ? false : true;
this.persistPageNumber = Boolean(cfg.page_number);
this.pageNb = null;
this.lastHash = null;
this.state = {};
this.prfxCol = 'col_';
this.prfxPageNb = 'page';
}
init(){
if(this.initialized || !hasHashChange()){
return;
}
this.emitter.on(['initialized'], ()=> this.sync());
this.emitter.on(['after-filtering'], ()=> this.update());
this.emitter.on(['after-changing-page'], ()=> this.update());
this.initialized = true;
}
format(){
let tf = this.tf;
if(this.persistFilters){
let filterValues = tf.getFiltersValue();
filterValues.forEach((val, idx)=> {
let key = `${this.prfxCol}${idx}`;
if(Str.isEmpty(val)){
if(this.state.hasOwnProperty(key)){
this.state[key] = undefined;
}
} else {
this.state[key] = this.state[key] || {};
this.state[key].flt = val;
}
});
}
if(this.persistPageNumber){
let pageNumber = tf.feature('paging').getPage();
this.state[this.prfxPageNb] = pageNumber;
}
return `#${JSON.stringify(this.state)}`;
}
parse(hash){
if(hash.indexOf('#') === 0){
hash = hash.substr(1);
} else {
hash = '{}';
}
return JSON.parse(hash);
}
update(){
let hash = this.format();
console.log(hash, this.lastHash, this.lastHash === hash);
if(this.lastHash === hash){
return;
}
location.hash = hash;
this.lastHash = hash;
}
sync(){
let state = this.parse(location.hash);
let tf = this.tf;
if(this.persistFilters){
Object.keys(state).forEach((key)=> {
if(key.indexOf(this.prfxCol) !== -1){
let colIdx = parseInt(key.replace(this.prfxCol, ''));
let val = state[key].flt;
tf.setFilterValue(colIdx, val);
}
});
tf.filter();
}
if(this.persistPageNumber){
let pageNumber = state[this.prfxPageNb];
tf.feature('paging').setPage(pageNumber);
}
}
destroy(){
if(!this.initialized){
return;
}
this.emitter.on(['initialized'], ()=> this.sync());
this.emitter.off(['after-filtering'], ()=> this.update());
this.initialized = false;
}
}

View file

@ -21,7 +21,7 @@ import {ClearButton} from './modules/clearButton';
import {Help} from './modules/help';
import {AlternateRows} from './modules/alternateRows';
import {NoResults} from './modules/noResults';
import {State} from './modules/state';
import {Stateful} from './modules/stateful';
let global = window,
doc = global.document;
@ -503,10 +503,10 @@ export class TableFilter {
}
if(this.isStateful){
if(!Mod.state){
Mod.state = new State(tf);
if(!Mod.stateful){
Mod.stateful = new Stateful(tf);
}
Mod.state.init();
Mod.stateful.init();
}
if(this.hasPersistence){

View file

@ -30,11 +30,12 @@
<script data-config>
var filtersConfig = {
base_path: '../dist/tablefilter/',
stateful: { page_number: true },
paging: true,
results_per_page: ['Records: ', [10,25,50,100]],
remember_grid_values: true,
remember_page_number: true,
remember_page_length: true,
// remember_grid_values: true,
// remember_page_number: true,
// remember_page_length: true,
alternate_rows: true,
btn_reset: true,
rows_counter: true,