mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Core: correct header sort indicators in row/colspans. Fixes #1005
This commit is contained in:
parent
e5bed877ab
commit
faaafe60a9
11
dist/js/jquery.tablesorter.combined.js
vendored
11
dist/js/jquery.tablesorter.combined.js
vendored
@ -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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -569,8 +569,10 @@
|
|||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
// direction = 2 means reset!
|
// direction = 2 means reset!
|
||||||
if (list[i][1] !== 2) {
|
if (list[i][1] !== 2) {
|
||||||
// multicolumn sorting updating - choose the :last in case there are nested columns
|
// multicolumn sorting updating - see #1005
|
||||||
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
|
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) {
|
if (f.length) {
|
||||||
for (j = 0; j < f.length; j++) {
|
for (j = 0; j < f.length; j++) {
|
||||||
if (!f[j].sortDisabled) {
|
if (!f[j].sortDisabled) {
|
||||||
@ -1300,8 +1302,9 @@
|
|||||||
// reference original table headers and find the same cell
|
// reference original table headers and find the same cell
|
||||||
// don't use $headers or IE8 throws an error - see #987
|
// don't use $headers or IE8 throws an error - see #987
|
||||||
temp = $headers.index( $cell );
|
temp = $headers.index( $cell );
|
||||||
|
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
|
||||||
// use column index if $headers is undefined
|
// 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) {
|
if (cell && !cell.sortDisabled) {
|
||||||
initSort(table, cell, e);
|
initSort(table, cell, e);
|
||||||
}
|
}
|
||||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/js/jquery.tablesorter.js
vendored
9
dist/js/jquery.tablesorter.js
vendored
@ -567,8 +567,10 @@
|
|||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
// direction = 2 means reset!
|
// direction = 2 means reset!
|
||||||
if (list[i][1] !== 2) {
|
if (list[i][1] !== 2) {
|
||||||
// multicolumn sorting updating - choose the :last in case there are nested columns
|
// multicolumn sorting updating - see #1005
|
||||||
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
|
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) {
|
if (f.length) {
|
||||||
for (j = 0; j < f.length; j++) {
|
for (j = 0; j < f.length; j++) {
|
||||||
if (!f[j].sortDisabled) {
|
if (!f[j].sortDisabled) {
|
||||||
@ -1298,8 +1300,9 @@
|
|||||||
// reference original table headers and find the same cell
|
// reference original table headers and find the same cell
|
||||||
// don't use $headers or IE8 throws an error - see #987
|
// don't use $headers or IE8 throws an error - see #987
|
||||||
temp = $headers.index( $cell );
|
temp = $headers.index( $cell );
|
||||||
|
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
|
||||||
// use column index if $headers is undefined
|
// 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) {
|
if (cell && !cell.sortDisabled) {
|
||||||
initSort(table, cell, e);
|
initSort(table, cell, e);
|
||||||
}
|
}
|
||||||
|
2
dist/js/jquery.tablesorter.min.js
vendored
2
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/jquery.tablesorter.widgets.js
vendored
2
dist/js/jquery.tablesorter.widgets.js
vendored
@ -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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
2
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -575,8 +575,10 @@
|
|||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
// direction = 2 means reset!
|
// direction = 2 means reset!
|
||||||
if (list[i][1] !== 2) {
|
if (list[i][1] !== 2) {
|
||||||
// multicolumn sorting updating - choose the :last in case there are nested columns
|
// multicolumn sorting updating - see #1005
|
||||||
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
|
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) {
|
if (f.length) {
|
||||||
for (j = 0; j < f.length; j++) {
|
for (j = 0; j < f.length; j++) {
|
||||||
if (!f[j].sortDisabled) {
|
if (!f[j].sortDisabled) {
|
||||||
@ -1306,8 +1308,9 @@
|
|||||||
// reference original table headers and find the same cell
|
// reference original table headers and find the same cell
|
||||||
// don't use $headers or IE8 throws an error - see #987
|
// don't use $headers or IE8 throws an error - see #987
|
||||||
temp = $headers.index( $cell );
|
temp = $headers.index( $cell );
|
||||||
|
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
|
||||||
// use column index if $headers is undefined
|
// 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) {
|
if (cell && !cell.sortDisabled) {
|
||||||
initSort(table, cell, e);
|
initSort(table, cell, e);
|
||||||
}
|
}
|
||||||
|
@ -557,8 +557,10 @@
|
|||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
// direction = 2 means reset!
|
// direction = 2 means reset!
|
||||||
if (list[i][1] !== 2) {
|
if (list[i][1] !== 2) {
|
||||||
// multicolumn sorting updating - choose the :last in case there are nested columns
|
// multicolumn sorting updating - see #1005
|
||||||
f = c.$headers.not('.sorter-false').filter('[data-column="' + list[i][0] + '"]' + (len === 1 ? ':last' : '') );
|
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) {
|
if (f.length) {
|
||||||
for (j = 0; j < f.length; j++) {
|
for (j = 0; j < f.length; j++) {
|
||||||
if (!f[j].sortDisabled) {
|
if (!f[j].sortDisabled) {
|
||||||
@ -1288,8 +1290,9 @@
|
|||||||
// reference original table headers and find the same cell
|
// reference original table headers and find the same cell
|
||||||
// don't use $headers or IE8 throws an error - see #987
|
// don't use $headers or IE8 throws an error - see #987
|
||||||
temp = $headers.index( $cell );
|
temp = $headers.index( $cell );
|
||||||
|
c.lastClickedIndex = ( temp < 0 ) ? $cell.attr('data-column') : temp;
|
||||||
// use column index if $headers is undefined
|
// 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) {
|
if (cell && !cell.sortDisabled) {
|
||||||
initSort(table, cell, e);
|
initSort(table, cell, e);
|
||||||
}
|
}
|
||||||
|
@ -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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
Loading…
Reference in New Issue
Block a user