mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
SaveSort: Fix JS error. See #1525
This commit is contained in:
parent
745229d7ff
commit
38b0f90431
@ -16,7 +16,8 @@
|
||||
<!-- Tablesorter: required -->
|
||||
<link rel="stylesheet" href="../css/theme.blue.css">
|
||||
<script src="../js/jquery.tablesorter.js"></script>
|
||||
<script src="../js/jquery.tablesorter.widgets.js"></script>
|
||||
<script src="../js/widgets/widget-storage.js"></script>
|
||||
<script src="../js/widgets/widget-saveSort.js"></script>
|
||||
<script src="../js/parsers/parser-ignore-articles.js"></script>
|
||||
|
||||
<script id="js">$(function() {
|
||||
@ -26,7 +27,11 @@
|
||||
theme: 'blue',
|
||||
|
||||
// use save sort widget
|
||||
widgets: ["saveSort", "zebra"]
|
||||
widgets: ["saveSort", "zebra"],
|
||||
widgetOptions: {
|
||||
// enable/disable saveSort dynamically
|
||||
saveSort: true
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||
/*! Widget: saveSort - updated 2018-03-19 (v2.30.1) *//*
|
||||
* Requires tablesorter v2.16+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
function getStoredSortList(c) {
|
||||
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : [];
|
||||
}
|
||||
|
||||
function sortListChanged(c, sortList) {
|
||||
|
Loading…
Reference in New Issue
Block a user