mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
add option to toggle behavior of long clicks
This commit is contained in:
parent
fe8b7a17b5
commit
0790d0e042
3
dist/js/jquery.tablesorter.js
vendored
3
dist/js/jquery.tablesorter.js
vendored
@ -59,6 +59,7 @@
|
|||||||
delayInit : false, // if false, the parsed table contents will not update until the first sort
|
delayInit : false, // if false, the parsed table contents will not update until the first sort
|
||||||
serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
|
serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
|
||||||
resort : true, // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed
|
resort : true, // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed
|
||||||
|
ignoreLongClick : true, // if true, ignore clicks longer than 250ms in case of column resizing widget, disable for sorting on slower devices
|
||||||
|
|
||||||
// *** sort options
|
// *** sort options
|
||||||
headers : {}, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
|
headers : {}, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
|
||||||
@ -1353,7 +1354,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ignore long clicks (prevents resizable widget from initializing a sort)
|
// ignore long clicks (prevents resizable widget from initializing a sort)
|
||||||
if (type === 'mouseup' && external !== true && (new Date().getTime() - downTime > 250)) { return; }
|
if (type === 'mouseup' && external !== true && (new Date().getTime() - downTime > 250) && c.ignoreLongClick) { return; }
|
||||||
// set timer on mousedown
|
// set timer on mousedown
|
||||||
if (type === 'mousedown') {
|
if (type === 'mousedown') {
|
||||||
downTime = new Date().getTime();
|
downTime = new Date().getTime();
|
||||||
|
4
dist/js/jquery.tablesorter.min.js
vendored
4
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -59,6 +59,7 @@
|
|||||||
delayInit : false, // if false, the parsed table contents will not update until the first sort
|
delayInit : false, // if false, the parsed table contents will not update until the first sort
|
||||||
serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
|
serverSideSorting: false, // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
|
||||||
resort : true, // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed
|
resort : true, // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed
|
||||||
|
ignoreLongClick : true, // if true, ignore clicks longer than 250ms in case of column resizing widget, disable for sorting on slower devices
|
||||||
|
|
||||||
// *** sort options
|
// *** sort options
|
||||||
headers : {}, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
|
headers : {}, // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
|
||||||
@ -1353,7 +1354,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ignore long clicks (prevents resizable widget from initializing a sort)
|
// ignore long clicks (prevents resizable widget from initializing a sort)
|
||||||
if (type === 'mouseup' && external !== true && (new Date().getTime() - downTime > 250)) { return; }
|
if (type === 'mouseup' && external !== true && (new Date().getTime() - downTime > 250) && c.ignoreLongClick) { return; }
|
||||||
// set timer on mousedown
|
// set timer on mousedown
|
||||||
if (type === 'mousedown') {
|
if (type === 'mousedown') {
|
||||||
downTime = new Date().getTime();
|
downTime = new Date().getTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user