From 284b73eaf1ace1f072f50ed343511b907f7951e3 Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 10 Apr 2014 20:16:22 -0500 Subject: [PATCH] Destroy method now clears cache & pager rows copy --- addons/pager/jquery.tablesorter.pager.js | 1 + js/jquery.tablesorter.js | 1 + js/widgets/widget-pager.js | 1 + 3 files changed, 3 insertions(+) diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 54d7d38f..0b5ec440 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -594,6 +594,7 @@ p.$container.hide(); // hide pager table.config.appender = null; // remove pager appender function p.initialized = false; + delete table.config.rowsCopy; $(table).unbind('destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager'); if (ts.storage) { ts.storage(table, p.storageKey, ''); diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index aa788ca3..1b0997f2 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -1186,6 +1186,7 @@ $t.toggleClass(ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false); // clear flag in case the plugin is initialized again table.hasInitialized = false; + delete table.config.cache; if (typeof callback === 'function') { callback(table); } diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 5d242574..bd0e5e46 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -785,6 +785,7 @@ tsp = ts.pager = { p.$container.hide(); // hide pager c.appender = null; // remove pager appender function p.initialized = false; + delete table.config.rowsCopy; c.$table.unbind('destroy.pager sortEnd.pager filterEnd.pager enable.pager disable.pager'); if (ts.storage) { ts.storage(table, c.widgetOptions.pager_storageKey, '');