From ff5c61a2a90bbaff7bc25bcf9796f64318bf60d0 Mon Sep 17 00:00:00 2001 From: Devinim Date: Tue, 12 Nov 2019 09:58:37 +0000 Subject: [PATCH] Bug 22773: The deprecated plugin is removed Signed-off-by: Kelly McElligott Signed-off-by: Christopher Kellermeyer Signed-off-by: Katrin Fischer --- .../lib/jquery/plugins/dataTables.fnFilterAll.js | 39 ---------------------- .../prog/en/modules/acqui/invoices.tt | 17 +++++----- 2 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/dataTables.fnFilterAll.js diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/dataTables.fnFilterAll.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/dataTables.fnFilterAll.js deleted file mode 100644 index 91c9d2093e..0000000000 --- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/dataTables.fnFilterAll.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Apply the same filter to all DataTable instances on a particular page. The - * function call exactly matches that used by `fnFilter()` so regular expression - * and individual column sorting can be used. - * - * DataTables 1.10+ provides this ability through its new API, which is able to - * to control multiple tables at a time. - * `$('.dataTable').DataTable().search( ... )` for example will apply the same - * filter to all tables on the page. The new API should be used in preference - * to this older method if at all possible. - * - * @name fnFilterAll - * @summary Apply a common filter to all DataTables on a page - * @author [Kristoffer Karlström](http://www.kmmtiming.se/) - * @deprecated - * - * @param {string} sInput Filtering input - * @param {integer} [iColumn=null] Column to apply the filter to - * @param {boolean} [bRegex] Regular expression flag - * @param {boolean} [bSmart] Smart filtering flag - * - * @example - * $(document).ready(function() { - * var table = $(".dataTable").dataTable(); - * - * $("#search").keyup( function () { - * // Filter on the column (the index) of this element - * table.fnFilterAll(this.value); - * } ); - * }); - */ - -jQuery.fn.dataTableExt.oApi.fnFilterAll = function(oSettings, sInput, iColumn, bRegex, bSmart) { - var settings = $.fn.dataTableSettings; - - for ( var i=0 ; iInvoices [% IF ( do_search ) %] [% IF invoices %] - [% BLOCK invoices_table %] [% IF closed %] [% SET tab = 'closed' %] [% ELSE %] [% SET tab = 'opened' %] [% END %] + @@ -357,13 +357,14 @@ autoWidth: false })); - $("#show_only_subscription").prop("checked", false); + $(".show_only_subscription").prop("checked", false); - $("#show_only_subscription").click(function(){ + $(".show_only_subscription").click(function(){ + var table_id = $(this).attr("data-tableid"); if ( $(this).prop("checked") ) { - resultst.fnFilterAll( "1", 0, true ); + $('#'+table_id).dataTable().fnFilter( "1", 0, true ); } else { - resultst.fnFilterAll( '', 0 ); + $('#'+table_id).dataTable().fnFilter( '', 0 ); } }); -- 2.11.0