mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Invalid group class now fails silently. Fixes #438
This commit is contained in:
parent
78600307de
commit
7d100b4663
@ -114,6 +114,8 @@ ts.addWidget({
|
||||
groupClass = (c.$headers.eq(column).attr('class') || '').match(/(group-\w+(-\w+)?)/g);
|
||||
// grouping = [ 'group', '{word/separator/letter/number/date/false}', '{#/year/month/day/week/time}' ]
|
||||
grouping = groupClass ? groupClass[0].split('-') : ['','letter',1]; // default to letter 1
|
||||
// fixes #438
|
||||
if (ts.grouping[grouping[1]]) {
|
||||
currentGroup = cache[rowIndex] ?
|
||||
ts.grouping[grouping[1]]( c, c.$headers.eq(column), cache[rowIndex][column], /date/.test(groupClass) ?
|
||||
grouping[2] : parseInt(grouping[2] || 1, 10) || 1, group, lang ) : currentGroup;
|
||||
@ -135,6 +137,7 @@ ts.addWidget({
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$rows = c.$table.find('tr.group-header').bind('selectstart', false);
|
||||
if (wo.group_count || $.isFunction(wo.group_callback)) {
|
||||
$rows.each(function(){
|
||||
|
Loading…
Reference in New Issue
Block a user