2015-11-10 21:27:30 +00:00
|
|
|
/*! Widget: grouping - updated 11/10/2015 (v2.24.4) *//*
|
2013-03-26 21:08:44 +00:00
|
|
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
|
|
|
* by Rob Garrison
|
|
|
|
*/
|
2013-04-13 02:15:57 +00:00
|
|
|
/*jshint browser:true, jquery:true, unused:false */
|
2013-03-26 21:08:44 +00:00
|
|
|
/*global jQuery: false */
|
|
|
|
;(function($){
|
2015-07-23 04:29:51 +00:00
|
|
|
'use strict';
|
2015-11-02 07:21:29 +00:00
|
|
|
var ts = $.tablesorter,
|
2013-03-26 21:08:44 +00:00
|
|
|
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg = ts.grouping = {
|
2013-11-14 01:55:43 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
types : {
|
2015-11-02 07:21:29 +00:00
|
|
|
number : function(c, $column, txt, num) {
|
|
|
|
var word, result,
|
|
|
|
ascSort = $column.hasClass( ts.css.sortAsc );
|
|
|
|
if ( num > 1 && txt !== '' ) {
|
|
|
|
if ( ascSort ) {
|
|
|
|
result = Math.floor( parseFloat( txt ) / num ) * num;
|
2015-07-23 04:29:51 +00:00
|
|
|
} else {
|
2015-11-02 07:21:29 +00:00
|
|
|
result = Math.ceil( parseFloat( txt ) / num ) * num;
|
2015-07-23 04:29:51 +00:00
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
// show range
|
|
|
|
result += ' - ' + ( result + ( num - 1 ) * ( ascSort ? 1 : -1 ) );
|
2013-12-18 06:34:22 +00:00
|
|
|
} else {
|
2015-11-02 07:21:29 +00:00
|
|
|
result = parseFloat( txt ) || txt;
|
2013-12-18 06:34:22 +00:00
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
return result;
|
2015-07-23 04:29:51 +00:00
|
|
|
},
|
2015-11-02 07:21:29 +00:00
|
|
|
separator : function(c, $column, txt, num) {
|
2015-07-23 04:29:51 +00:00
|
|
|
var word = (txt + '').split(c.widgetOptions.group_separator);
|
2015-11-02 07:21:29 +00:00
|
|
|
// return $.trim(word && num > 0 && word.length >= num ? word[(num || 1) - 1] : '');
|
|
|
|
return $.trim( word[ num - 1 ] || '' );
|
2015-07-23 04:29:51 +00:00
|
|
|
},
|
2015-11-02 07:21:29 +00:00
|
|
|
text : function( c, $column, txt ) {
|
|
|
|
return txt;
|
2015-07-23 04:29:51 +00:00
|
|
|
},
|
2015-11-02 07:21:29 +00:00
|
|
|
word : function(c, $column, txt, num) {
|
|
|
|
var word = (txt + ' ').match(/\w+/g) || [];
|
|
|
|
// return word && word.length >= num ? word[num - 1] : txt || '';
|
|
|
|
return word[ num - 1 ] || '';
|
|
|
|
},
|
|
|
|
letter : function(c, $column, txt, num) {
|
2015-07-23 04:29:51 +00:00
|
|
|
return txt ? (txt + ' ').substring(0, num) : '';
|
|
|
|
},
|
2015-11-02 07:21:29 +00:00
|
|
|
date : function(c, $column, txt, part, group) {
|
2015-10-26 01:10:43 +00:00
|
|
|
var year, month,
|
|
|
|
wo = c.widgetOptions,
|
|
|
|
time = new Date(txt || '');
|
|
|
|
// check for valid date
|
|
|
|
if ( time instanceof Date && isFinite( time ) ) {
|
|
|
|
year = time.getFullYear();
|
2015-11-02 07:21:29 +00:00
|
|
|
month = tsg.findMonth( wo, time.getMonth() );
|
2015-10-26 01:10:43 +00:00
|
|
|
return part === 'year' ? year :
|
|
|
|
part === 'month' ? month :
|
|
|
|
part === 'monthyear' ? month + ' ' + year :
|
|
|
|
part === 'day' ? month + ' ' + time.getDate() :
|
2015-11-02 07:21:29 +00:00
|
|
|
part === 'week' ? tsg.findWeek( wo, time.getDay() ) :
|
|
|
|
part === 'time' ? tsg.findTime( wo, time ) :
|
2015-10-26 01:10:43 +00:00
|
|
|
wo.group_dateString( time, c, $column );
|
|
|
|
} else {
|
|
|
|
return wo.group_dateInvalid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// group date type functions to allow using this widget with Globalize
|
|
|
|
findMonth : function( wo, month ) {
|
|
|
|
// CLDR returns an object { 1: "Jan", 2: "Feb", 3: "Mar", ..., 12: "Dec" }
|
|
|
|
return wo.group_months[ month + ( ( wo.group_months[0] || '' ) === '' ? 1 : 0 ) ];
|
|
|
|
},
|
|
|
|
findWeek : function( wo, day ) {
|
|
|
|
if ( $.isArray( wo.group_week ) ) {
|
|
|
|
return wo.group_week[ day ];
|
|
|
|
} else if ( !$.isEmptyObject( wo.group_week ) ) {
|
|
|
|
// CLDR returns { sun: "Sun", mon: "Mon", tue: "Tue", wed: "Wed", thu: "Thu", ... }
|
|
|
|
var cldrWeek = [ 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat' ];
|
|
|
|
return wo.group_week[ cldrWeek[ day ] ];
|
2013-10-02 02:30:12 +00:00
|
|
|
}
|
2013-12-18 06:34:22 +00:00
|
|
|
},
|
2015-10-26 01:10:43 +00:00
|
|
|
findTime : function( wo, time ) {
|
|
|
|
var suffix,
|
|
|
|
// CLDR returns { am: "AM", pm: "PM", ... }
|
|
|
|
isObj = wo.group_time.am && wo.group_time.pm,
|
2015-11-02 07:21:29 +00:00
|
|
|
h = time.getHours(),
|
|
|
|
period = h >= 12 ? 1 : 0,
|
|
|
|
p24 = wo.group_time24Hour && h > 12 ? h - 12 :
|
|
|
|
wo.group_time24Hour && h === 0 ? h + 12 : h,
|
|
|
|
hours = ( '00' + p24 ).slice(-2),
|
2015-10-26 01:10:43 +00:00
|
|
|
min = ( '00' + time.getMinutes() ).slice(-2);
|
|
|
|
suffix = wo.group_time[ isObj ? [ 'am', 'pm' ][ period ] : period ];
|
|
|
|
return hours + ':' + min + ( wo.group_time24Hour ? '' : ' ' + ( suffix || '' ) );
|
|
|
|
},
|
2013-10-21 01:10:33 +00:00
|
|
|
|
2015-11-02 07:21:29 +00:00
|
|
|
update : function(table, c, wo) {
|
2015-07-23 04:29:51 +00:00
|
|
|
if ($.isEmptyObject(c.cache)) { return; }
|
2015-11-02 07:21:29 +00:00
|
|
|
var hasSort = typeof c.sortList[0] !== 'undefined',
|
|
|
|
data = {},
|
2015-10-05 15:42:40 +00:00
|
|
|
column = $.isArray( wo.group_forceColumn ) && typeof wo.group_forceColumn[0] !== 'undefined' ?
|
2015-08-24 15:50:07 +00:00
|
|
|
( wo.group_enforceSort && !hasSort ? -1 : wo.group_forceColumn[0] ) :
|
|
|
|
( hasSort ? c.sortList[0][0] : -1 );
|
2015-07-23 04:29:51 +00:00
|
|
|
c.$table
|
|
|
|
.find('tr.group-hidden').removeClass('group-hidden').end()
|
|
|
|
.find('tr.group-header').remove();
|
|
|
|
if (wo.group_collapsible) {
|
|
|
|
// clear pager saved spacer height (in case the rows are collapsed)
|
|
|
|
c.$table.data('pagerSavedHeight', 0);
|
|
|
|
}
|
2015-08-24 15:50:07 +00:00
|
|
|
if (column >= 0 && column < c.columns && !c.$headerIndexed[column].hasClass('group-false')) {
|
2015-11-02 07:21:29 +00:00
|
|
|
wo.group_collapsedGroup = ''; // save current groups
|
|
|
|
wo.group_collapsedGroups = {};
|
2014-03-04 17:26:20 +00:00
|
|
|
|
2015-11-02 07:21:29 +00:00
|
|
|
data.column = column;
|
2015-07-23 04:29:51 +00:00
|
|
|
// group class finds 'group-{word/separator/letter/number/date/false}-{optional:#/year/month/day/week/time}'
|
2015-11-02 07:21:29 +00:00
|
|
|
data.groupClass = (c.$headerIndexed[column].attr('class') || '').match(/(group-\w+(-\w+)?)/g);
|
2015-07-23 04:29:51 +00:00
|
|
|
// grouping = [ 'group', '{word/separator/letter/number/date/false}', '{#/year/month/day/week/time}' ]
|
2015-11-02 07:21:29 +00:00
|
|
|
data.grouping = data.groupClass ? data.groupClass[0].split('-') : [ 'group', 'letter', 1 ]; // default to letter 1
|
2014-03-04 17:26:20 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
// save current grouping
|
2015-11-02 07:21:29 +00:00
|
|
|
data.savedGroup = tsg.saveCurrentGrouping( c, wo, data );
|
|
|
|
|
|
|
|
// find column groups
|
|
|
|
tsg.findColumnGroups( c, wo, data );
|
|
|
|
tsg.processHeaders( c, wo, data );
|
|
|
|
|
2015-12-02 01:38:56 +00:00
|
|
|
c.$table.triggerHandler(wo.group_complete);
|
2015-11-02 07:21:29 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
processHeaders : function( c, wo, data ) {
|
|
|
|
var index, isHidden, $label, name, $rows, $row,
|
|
|
|
$headers = c.$table.find( 'tr.group-header' ),
|
|
|
|
len = $headers.length;
|
|
|
|
|
|
|
|
$headers.bind( 'selectstart', false );
|
|
|
|
for ( index = 0; index < len; index++ ) {
|
|
|
|
$row = $headers.eq( index );
|
|
|
|
$rows = $row.nextUntil( 'tr.group-header' ).filter( ':visible' );
|
|
|
|
|
|
|
|
// add group count (only visible rows!)
|
|
|
|
if ( wo.group_count || $.isFunction( wo.group_callback ) ) {
|
|
|
|
$label = $row.find( '.group-count' );
|
|
|
|
if ( $label.length ) {
|
|
|
|
if ( wo.group_count ) {
|
|
|
|
$label.html( wo.group_count.replace( /\{num\}/g, $rows.length ) );
|
2013-03-26 21:08:44 +00:00
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
if ( $.isFunction( wo.group_callback ) ) {
|
|
|
|
wo.group_callback( $row.find( 'td' ), $rows, data.column, c.table );
|
2013-10-18 16:19:30 +00:00
|
|
|
}
|
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// save collapsed groups
|
|
|
|
if ( wo.group_saveGroups &&
|
|
|
|
!$.isEmptyObject( wo.group_collapsedGroups ) &&
|
|
|
|
wo.group_collapsedGroups[ wo.group_collapsedGroup ].length ) {
|
|
|
|
|
|
|
|
name = $row.find( '.group-name' ).text().toLowerCase() + $row.attr( 'data-group-index' );
|
|
|
|
isHidden = $.inArray( name, wo.group_collapsedGroups[ wo.group_collapsedGroup ] ) > -1;
|
|
|
|
$row.toggleClass( 'collapsed', isHidden );
|
|
|
|
$rows.toggleClass( 'group-hidden', isHidden );
|
|
|
|
} else if ( wo.group_collapsed && wo.group_collapsible ) {
|
|
|
|
$row.addClass( 'collapsed' );
|
|
|
|
$rows.addClass( 'group-hidden' );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
groupHeaderHTML : function( c, wo, data ) {
|
|
|
|
return '<tr class="group-header ' + c.selectorRemove.slice(1) +
|
|
|
|
'" unselectable="on" ' + ( c.tabIndex ? 'tabindex="0" ' : '' ) + 'data-group-index="' +
|
|
|
|
( data.groupIndex++ ) + '">' +
|
|
|
|
'<td colspan="' + c.columns + '">' +
|
|
|
|
( wo.group_collapsible ? '<i/>' : '' ) +
|
|
|
|
'<span class="group-name">' + data.currentGroup + '</span>' +
|
|
|
|
'<span class="group-count"></span>' +
|
|
|
|
'</td></tr>';
|
|
|
|
},
|
|
|
|
saveCurrentGrouping : function( c, wo, data ) {
|
|
|
|
// save current grouping
|
|
|
|
var saveName, direction,
|
|
|
|
savedGroup = false;
|
|
|
|
if (wo.group_collapsible && wo.group_saveGroups && ts.storage) {
|
|
|
|
wo.group_collapsedGroups = ts.storage( c.table, 'tablesorter-groups' ) || {};
|
|
|
|
// include direction when saving groups (reversed numbers shows different range values)
|
|
|
|
direction = 'dir' + c.sortList[0][1];
|
|
|
|
// combine column, sort direction & grouping as save key
|
|
|
|
saveName = wo.group_collapsedGroup = '' + c.sortList[0][0] + direction + data.grouping.join('');
|
|
|
|
if (!wo.group_collapsedGroups[saveName]) {
|
|
|
|
wo.group_collapsedGroups[saveName] = [];
|
|
|
|
} else {
|
|
|
|
savedGroup = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return savedGroup;
|
|
|
|
},
|
|
|
|
findColumnGroups : function( c, wo, data ) {
|
|
|
|
var tbodyIndex, norm_rows, $row, rowIndex, end,
|
|
|
|
hasPager = ts.hasWidget( c.table, 'pager' );
|
|
|
|
data.groupIndex = 0;
|
|
|
|
for ( tbodyIndex = 0; tbodyIndex < c.$tbodies.length; tbodyIndex++ ) {
|
|
|
|
norm_rows = c.cache[ tbodyIndex ].normalized;
|
|
|
|
data.group = ''; // clear grouping across tbodies
|
|
|
|
rowIndex = hasPager ? c.pager.startRow - 1 : 0;
|
|
|
|
end = hasPager ? c.pager.endRow : norm_rows.length;
|
|
|
|
for ( ; rowIndex < end; rowIndex++ ) {
|
|
|
|
data.rowData = norm_rows[ rowIndex ];
|
|
|
|
data.$row = data.rowData[ c.columns ].$row;
|
|
|
|
// fixes #438
|
|
|
|
if ( data.$row.is( ':visible' ) && tsg.types[ data.grouping[ 1 ] ] ) {
|
|
|
|
tsg.insertGroupHeader( c, wo, data );
|
2015-07-23 04:29:51 +00:00
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
insertGroupHeader: function( c, wo, data ) {
|
|
|
|
var $header = c.$headerIndexed[ data.column ],
|
|
|
|
txt = data.rowData[ data.column ],
|
|
|
|
num = /date/.test( data.groupClass ) ? data.grouping[ 2 ] : parseInt( data.grouping[ 2 ] || 1, 10 ) || 1;
|
|
|
|
data.currentGroup = data.rowData ?
|
|
|
|
tsg.types[ data.grouping[ 1 ] ]( c, $header, txt, num, data.group ) :
|
|
|
|
data.currentGroup;
|
|
|
|
if ( data.group !== data.currentGroup ) {
|
|
|
|
data.group = data.currentGroup;
|
|
|
|
if ( $.isFunction( wo.group_formatter ) ) {
|
2015-11-06 19:28:25 +00:00
|
|
|
data.currentGroup = wo.group_formatter( ( data.group || '' ).toString(), data.column, c.table, c, wo, data ) || data.group;
|
2015-11-02 07:21:29 +00:00
|
|
|
}
|
|
|
|
data.$row.before( tsg.groupHeaderHTML( c, wo, data ) );
|
|
|
|
if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) {
|
|
|
|
// all groups start collapsed
|
|
|
|
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup );
|
|
|
|
}
|
2015-07-23 04:29:51 +00:00
|
|
|
}
|
|
|
|
},
|
2014-03-04 17:26:20 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
bindEvents : function(table, c, wo){
|
|
|
|
if (wo.group_collapsible) {
|
2015-11-02 07:21:29 +00:00
|
|
|
wo.group_collapsedGroups = [];
|
2015-07-23 04:29:51 +00:00
|
|
|
// .on() requires jQuery 1.7+
|
|
|
|
c.$table.on('click toggleGroup keyup', 'tr.group-header', function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
// pressing enter will toggle the group
|
|
|
|
if (event.type === 'keyup' && event.which !== 13) { return; }
|
|
|
|
var isCollapsed, $groups, indx,
|
|
|
|
$this = $(this),
|
2015-08-24 15:50:07 +00:00
|
|
|
name = $this.find('.group-name').text().toLowerCase() + $this.attr('data-group-index');
|
2015-07-23 04:29:51 +00:00
|
|
|
// use shift-click to toggle ALL groups
|
|
|
|
if (event.shiftKey && (event.type === 'click' || event.type === 'keyup')) {
|
|
|
|
$this.siblings('.group-header').trigger('toggleGroup');
|
2014-03-04 17:26:20 +00:00
|
|
|
}
|
2015-07-23 04:29:51 +00:00
|
|
|
$this.toggleClass('collapsed');
|
|
|
|
// nextUntil requires jQuery 1.4+
|
|
|
|
$this.nextUntil('tr.group-header').toggleClass('group-hidden', $this.hasClass('collapsed') );
|
|
|
|
// save collapsed groups
|
|
|
|
if (wo.group_saveGroups && ts.storage) {
|
|
|
|
$groups = c.$table.find('.group-header');
|
|
|
|
isCollapsed = $this.hasClass('collapsed');
|
2015-11-02 07:21:29 +00:00
|
|
|
if (!wo.group_collapsedGroups[wo.group_collapsedGroup]) {
|
|
|
|
wo.group_collapsedGroups[wo.group_collapsedGroup] = [];
|
2014-03-04 17:26:20 +00:00
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
if (isCollapsed && wo.group_collapsedGroup) {
|
|
|
|
wo.group_collapsedGroups[wo.group_collapsedGroup].push( name );
|
|
|
|
} else if (wo.group_collapsedGroup) {
|
|
|
|
indx = $.inArray( name, wo.group_collapsedGroups[wo.group_collapsedGroup] );
|
2015-07-23 04:29:51 +00:00
|
|
|
if (indx > -1) {
|
2015-11-02 07:21:29 +00:00
|
|
|
wo.group_collapsedGroups[wo.group_collapsedGroup].splice( indx, 1 );
|
2015-07-23 04:29:51 +00:00
|
|
|
}
|
|
|
|
}
|
2015-11-02 07:21:29 +00:00
|
|
|
ts.storage( table, 'tablesorter-groups', wo.group_collapsedGroups );
|
2014-03-04 17:26:20 +00:00
|
|
|
}
|
2015-07-23 04:29:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
$(wo.group_saveReset).on('click', function(){
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg.clearSavedGroups(table);
|
2014-03-04 17:26:20 +00:00
|
|
|
});
|
2015-07-23 04:29:51 +00:00
|
|
|
c.$table.on('pagerChange.tsgrouping', function(){
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg.update(table, c, wo);
|
2015-07-23 04:29:51 +00:00
|
|
|
});
|
|
|
|
},
|
2014-03-04 17:26:20 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
clearSavedGroups: function(table){
|
|
|
|
if (table && ts.storage) {
|
|
|
|
ts.storage(table, 'tablesorter-groups', '');
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg.update(table, table.config, table.config.widgetOptions);
|
2015-07-23 04:29:51 +00:00
|
|
|
}
|
2014-03-04 17:26:20 +00:00
|
|
|
}
|
2013-12-18 06:34:22 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
};
|
2013-12-18 06:34:22 +00:00
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
ts.addWidget({
|
|
|
|
id: 'group',
|
|
|
|
priority: 100,
|
|
|
|
options: {
|
|
|
|
group_collapsible : true, // make the group header clickable and collapse the rows below it.
|
|
|
|
group_collapsed : false, // start with all groups collapsed
|
|
|
|
group_saveGroups : true, // remember collapsed groups
|
|
|
|
group_saveReset : null, // element to clear saved collapsed groups
|
|
|
|
group_count : ' ({num})', // if not false, the '{num}' string is replaced with the number of rows in the group
|
|
|
|
group_separator : '-', // group name separator; used when group-separator-# class is used.
|
|
|
|
group_formatter : null, // function(txt, column, table, c, wo) { return txt; }
|
|
|
|
group_callback : null, // function($cell, $rows, column, table){}, callback allowing modification of the group header labels
|
|
|
|
group_complete : 'groupingComplete', // event triggered on the table when the grouping widget has finished work
|
2013-12-18 06:34:22 +00:00
|
|
|
|
2015-08-24 15:50:07 +00:00
|
|
|
// apply the grouping widget only to selected column
|
|
|
|
group_forceColumn : [], // only the first value is used; set as an array for future expansion
|
|
|
|
group_enforceSort : true, // only apply group_forceColumn when a sort is applied to the table
|
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
// checkbox parser text used for checked/unchecked values
|
|
|
|
group_checkbox : [ 'checked', 'unchecked' ],
|
|
|
|
// change these default date names based on your language preferences
|
|
|
|
group_months : [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
|
|
|
|
group_week : [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
|
|
|
|
group_time : [ 'AM', 'PM' ],
|
2015-10-26 01:10:43 +00:00
|
|
|
|
|
|
|
// use 12 vs 24 hour time
|
|
|
|
group_time24Hour : false,
|
|
|
|
// group header text added for invalid dates
|
|
|
|
group_dateInvalid : 'Invalid Date',
|
|
|
|
|
2015-07-23 04:29:51 +00:00
|
|
|
// this function is used when 'group-date' is set to create the date string
|
|
|
|
// you can just return date, date.toLocaleString(), date.toLocaleDateString() or d.toLocaleTimeString()
|
|
|
|
// reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Conversion_getter
|
|
|
|
group_dateString : function(date) { return date.toLocaleString(); }
|
|
|
|
},
|
|
|
|
init: function(table, thisWidget, c, wo){
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg.bindEvents(table, c, wo);
|
2015-07-23 04:29:51 +00:00
|
|
|
},
|
|
|
|
format: function(table, c, wo) {
|
2015-11-02 07:21:29 +00:00
|
|
|
tsg.update(table, c, wo);
|
2015-07-23 04:29:51 +00:00
|
|
|
},
|
|
|
|
remove : function(table, c, wo){
|
|
|
|
c.$table
|
|
|
|
.off('click', 'tr.group-header')
|
|
|
|
.off('pagerChange.tsgrouping')
|
|
|
|
.find('.group-hidden').removeClass('group-hidden').end()
|
|
|
|
.find('tr.group-header').remove();
|
|
|
|
}
|
|
|
|
});
|
2013-03-26 21:08:44 +00:00
|
|
|
|
|
|
|
})(jQuery);
|