Core: correct header sort indicators in row/colspans. Fixes #1005

This commit is contained in:
Mottie 2015-09-01 10:35:55 -05:00
parent e5bed877ab
commit faaafe60a9
9 changed files with 32 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 08-31-2015 (v2.23.2)*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -569,8 +569,10 @@
for (i = 0; i < len; i++) {
// direction = 2 means reset!
if (list[i][1] !== 2) {
// multicolumn sorting updating - choose the :last in case there are nested columns
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
// multicolumn sorting updating - see #1005
f = c.lastClickedIndex > 0 ? c.$headers.filter(':gt(' + ( c.lastClickedIndex - 1 ) + ')') : c.$headers;
// choose the :last in case there are nested columns
f = f.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
if (f.length) {
for (j = 0; j < f.length; j++) {
if (!f[j].sortDisabled) {
@ -1300,8 +1302,9 @@
// reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell );
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
// use column index if $headers is undefined
cell = c.$headers[ ( temp < 0 ) ? $cell.attr('data-column') : temp ];
cell = c.$headers[ c.lastClickedIndex ];
if (cell && !cell.sortDisabled) {
initSort(table, cell, e);
}

File diff suppressed because one or more lines are too long

View File

@ -567,8 +567,10 @@
for (i = 0; i < len; i++) {
// direction = 2 means reset!
if (list[i][1] !== 2) {
// multicolumn sorting updating - choose the :last in case there are nested columns
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
// multicolumn sorting updating - see #1005
f = c.lastClickedIndex > 0 ? c.$headers.filter(':gt(' + ( c.lastClickedIndex - 1 ) + ')') : c.$headers;
// choose the :last in case there are nested columns
f = f.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
if (f.length) {
for (j = 0; j < f.length; j++) {
if (!f[j].sortDisabled) {
@ -1298,8 +1300,9 @@
// reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell );
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
// use column index if $headers is undefined
cell = c.$headers[ ( temp < 0 ) ? $cell.attr('data-column') : temp ];
cell = c.$headers[ c.lastClickedIndex ];
if (cell && !cell.sortDisabled) {
initSort(table, cell, e);
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 08-31-2015 (v2.23.2)*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 08-31-2015 (v2.23.2)*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -575,8 +575,10 @@
for (i = 0; i < len; i++) {
// direction = 2 means reset!
if (list[i][1] !== 2) {
// multicolumn sorting updating - choose the :last in case there are nested columns
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
// multicolumn sorting updating - see #1005
f = c.lastClickedIndex > 0 ? c.$headers.filter(':gt(' + ( c.lastClickedIndex - 1 ) + ')') : c.$headers;
// choose the :last in case there are nested columns
f = f.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
if (f.length) {
for (j = 0; j < f.length; j++) {
if (!f[j].sortDisabled) {
@ -1306,8 +1308,9 @@
// reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell );
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
// use column index if $headers is undefined
cell = c.$headers[ ( temp < 0 ) ? $cell.attr('data-column') : temp ];
cell = c.$headers[ c.lastClickedIndex ];
if (cell && !cell.sortDisabled) {
initSort(table, cell, e);
}

View File

@ -557,8 +557,10 @@
for (i = 0; i < len; i++) {
// direction = 2 means reset!
if (list[i][1] !== 2) {
// multicolumn sorting updating - choose the :last in case there are nested columns
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
// multicolumn sorting updating - see #1005
f = c.lastClickedIndex > 0 ? c.$headers.filter(':gt(' + ( c.lastClickedIndex - 1 ) + ')') : c.$headers;
// choose the :last in case there are nested columns
f = f.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
if (f.length) {
for (j = 0; j < f.length; j++) {
if (!f[j].sortDisabled) {
@ -1288,8 +1290,9 @@
// reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell );
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
// use column index if $headers is undefined
cell = c.$headers[ ( temp < 0 ) ? $cell.attr('data-column') : temp ];
cell = c.$headers[ c.lastClickedIndex ];
if (cell && !cell.sortDisabled) {
initSort(table, cell, e);
}

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 08-31-2015 (v2.23.2)*/
/*! tablesorter (FORK) - updated 09-01-2015 (v2.23.2)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {