mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Group: use non-cached variables when added after core init. Fixes #1158
This commit is contained in:
parent
4c1ce278ef
commit
9361bf7aa3
2
dist/js/widgets/widget-grouping.min.js
vendored
2
dist/js/widgets/widget-grouping.min.js
vendored
File diff suppressed because one or more lines are too long
@ -92,9 +92,11 @@
|
|||||||
return hours + ':' + min + ( wo.group_time24Hour ? '' : ' ' + ( suffix || '' ) );
|
return hours + ':' + min + ( wo.group_time24Hour ? '' : ' ' + ( suffix || '' ) );
|
||||||
},
|
},
|
||||||
|
|
||||||
update : function(table, c, wo) {
|
update : function(table) {
|
||||||
if ($.isEmptyObject(c.cache)) { return; }
|
if ($.isEmptyObject(table.config.cache)) { return; }
|
||||||
var hasSort = typeof c.sortList[0] !== 'undefined',
|
var c = table.config,
|
||||||
|
wo = c.widgetOptions,
|
||||||
|
hasSort = typeof c.sortList[0] !== 'undefined',
|
||||||
data = {},
|
data = {},
|
||||||
column = $.isArray( wo.group_forceColumn ) && typeof wo.group_forceColumn[0] !== 'undefined' ?
|
column = $.isArray( wo.group_forceColumn ) && typeof wo.group_forceColumn[0] !== 'undefined' ?
|
||||||
( wo.group_enforceSort && !hasSort ? -1 : wo.group_forceColumn[0] ) :
|
( wo.group_enforceSort && !hasSort ? -1 : wo.group_forceColumn[0] ) :
|
||||||
@ -278,14 +280,14 @@
|
|||||||
tsg.clearSavedGroups(table);
|
tsg.clearSavedGroups(table);
|
||||||
});
|
});
|
||||||
c.$table.on('pagerChange.tsgrouping', function(){
|
c.$table.on('pagerChange.tsgrouping', function(){
|
||||||
tsg.update(table, c, wo);
|
tsg.update(table);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
clearSavedGroups: function(table){
|
clearSavedGroups: function(table){
|
||||||
if (table && ts.storage) {
|
if (table && ts.storage) {
|
||||||
ts.storage(table, 'tablesorter-groups', '');
|
ts.storage(table, 'tablesorter-groups', '');
|
||||||
tsg.update(table, table.config, table.config.widgetOptions);
|
tsg.update(table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +332,7 @@
|
|||||||
tsg.bindEvents(table, c, wo);
|
tsg.bindEvents(table, c, wo);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo) {
|
format: function(table, c, wo) {
|
||||||
tsg.update(table, c, wo);
|
tsg.update(table);
|
||||||
},
|
},
|
||||||
remove : function(table, c, wo){
|
remove : function(table, c, wo){
|
||||||
c.$table
|
c.$table
|
||||||
|
Loading…
Reference in New Issue
Block a user