From 3aa9b4a39ce3eead78267be780eccc2fa5e33515 Mon Sep 17 00:00:00 2001 From: Sandy Galloway Date: Mon, 24 Jun 2019 10:49:02 +0000 Subject: [PATCH] Issue DD-704 Changed searchPane.options to be searchPane.values --- features/searchPane/dataTables.searchPane.js | 2 +- .../searchPane/dataTables.searchPane.min.js | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/features/searchPane/dataTables.searchPane.js b/features/searchPane/dataTables.searchPane.js index 723c3f3..c59e925 100644 --- a/features/searchPane/dataTables.searchPane.js +++ b/features/searchPane/dataTables.searchPane.js @@ -357,7 +357,7 @@ if (!col.searchPane) { col.searchPane = {}; } - col.searchPane.options = options; + col.searchPane.values = options; if (ctx.searchPane) { ctx.searchPane.rebuild(); diff --git a/features/searchPane/dataTables.searchPane.min.js b/features/searchPane/dataTables.searchPane.min.js index 43d0b3e..8ca5808 100644 --- a/features/searchPane/dataTables.searchPane.min.js +++ b/features/searchPane/dataTables.searchPane.min.js @@ -12,15 +12,15 @@ SearchPane 0.0.2 2018 SpryMedia Ltd - datatables.net/license */ -var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,d){a instanceof String&&(a=String(a));for(var f=a.length,e=0;e").addClass(this.classes.container)};this.c=a.extend(!0,{},e.defaults, -h);this.s={dt:b};b.settings()[0].searchPane=this;b.columns(this.c.columns).eq(0).each(function(a){g._pane(a)});a(this.dom.container).on("click","li",function(){g._toggle(this)}).on("click","button."+this.classes.clear,function(){g._clear(a(this).closest("div."+g.classes.pane.container))});this._attach()}var m=a.fn.dataTable;a.extend(e.prototype,{rebuild:function(){var a=this;this.s.dt.columns(this.c.columns).eq(0).each(function(b){a._pane(b)})},_attach:function(){var b=this.c.container;b="function"=== -typeof b?b(this.s.dt):b;"prepend"===this.c.insert?a(this.dom.container).prependTo(b):a(this.dom.container).appendTo(b)},_binData:function(a){for(var b={},g=0,d=a.length;g"),l="function"===typeof c.options?c.options(d,b):c.options?new m.Api(null,c.options):k.data();d=this._binData(l.flatten());if(!(this._variance(d)").html(''+l[f]+"").data("filter",l[f]).append(a("").addClass(g.count).html(d[l[f]]));if(c.length){var q=l[f].replace?a.fn.dataTable.util.escapeRegex(l[f]): +h);this.s={dt:b};b.settings()[0].searchPane=this;b.columns(this.c.columns).eq(0).each(function(a){g._pane(a)});a(this.dom.container).on("click","li",function(){g._toggle(this)}).on("click","button."+this.classes.clear,function(){g._clear(a(this).closest("div."+g.classes.pane.container))});this._attach()}var m=a.fn.dataTable;a.extend(e.prototype,{rebuild:function(){var a=this;this.dom.container.empty();this.s.dt.columns(this.c.columns).eq(0).each(function(b){a._pane(b)})},_attach:function(){var b= +this.c.container;b="function"===typeof b?b(this.s.dt):b;"prepend"===this.c.insert?a(this.dom.container).prependTo(b):a(this.dom.container).appendTo(b)},_binData:function(a){for(var b={},g=0,d=a.length;g"),l="function"===typeof c.options?c.options(d,b):c.options?new m.Api(null,c.options):k.data();d=this._binData(l.flatten());if(!(this._variance(d)").html(''+l[f]+"").data("filter",l[f]).append(a("").addClass(g.count).html(d[l[f]]));if(c.length){var q=l[f].replace?a.fn.dataTable.util.escapeRegex(l[f]): l[f];-1!==a.inArray(q,c)&&n.addClass(g.selected)}e.append(n)}g=a("
").data("column",b).addClass(h.container).addClass(c.length?h.active:"").append(a('').addClass(this.classes.clear)).append(a("
").addClass(h.title).html(a(k.header()).text())).append(a("
").addClass(h.scroller).append(e));h=this.dom.container;k=h.children().map(function(){if(a(this).data("column")==b)return this});k.length?k.replaceWith(g):a(h).append(g)}},_getOptions:function(a){return this.s.dt.settings()[0].aoColumns[a].searchPane|| -{}},_toggle:function(b){var c=this.classes,g=c.item.selected,d=this.s.dt;b=a(b);var e=b.closest("div."+c.pane.container),f=e.data("column"),m=this._getOptions(f);b.toggleClass(g,!b.hasClass(g));b=e.find("li."+g);0===b.length?(e.removeClass(c.pane.active),d.column(f).search("").draw()):"any"===m.match?(e.addClass(c.pane.active),d.column(f).search("("+a.map(b,function(b){b=a(b).data("filter").toString();return a.fn.dataTable.util.escapeRegex(b)}).join("|")+")",!0,!1).draw()):(e.addClass(c.pane.active), -d.column(f).search("^("+a.map(b,function(b){b=a(b).data("filter").toString();return a.fn.dataTable.util.escapeRegex(b)}).join("|")+")$",!0,!1).draw())},_variance:function(b){b=a.map(b,function(a,b){return a});for(var c=b.length,g=0,d=0,e=c;d").html(b).text();return a.fn.dataTable.util.escapeRegex(b)}).join("|")+")",!0,!1).draw()): +(e.addClass(c.pane.active),d.column(f).search("^("+a.map(b,function(b){b=a(b).data("filter").toString();b=a("
").html(b).text();return a.fn.dataTable.util.escapeRegex(b)}).join("|")+")$",!0,!1).draw())},_variance:function(b){b=a.map(b,function(a,b){return a});for(var c=b.length,g=0,d=0,e=c;d