]> git.koha-community.org Git - koha.git/commit
Bug 22811: Add button to clear DataTables filtering
authorOwen Leonard <oleonard@myacpl.org>
Tue, 30 Apr 2019 14:57:59 +0000 (14:57 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 9 May 2019 19:30:05 +0000 (19:30 +0000)
commit94c4a268ac098705c2db703512fc0065fed6a42b
treef7f9b67e2a75f1be00deaa1544414a07106f0d80
parent629b2723cb3c654c57e1db2ab206ea163128ccbb
Bug 22811: Add button to clear DataTables filtering

This patch adds a "clear filter" button to the global
DataTables configuration. The button will appear if:

 - There is no custom DOM configuration applied to the DataTable
   instance.
 - The DataTable has the search form enabled.

The new button should be disabled by default. Entering a search term in
the form should enable it.

To test, apply the patch and clear your browser cache if necessary. View
various pages with various DataTables configurations and confirm that
everything looks correct and the new "Clear filter" button doesn't
appear when there is no DataTable search field. For example:

 - Administration -> Libraries
 - Administration -> Currencies
 - Reports -> Saved reports
 - Circulation -> Check out
 - Tools -> News

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
koha-tmpl/intranet-tmpl/prog/js/datatables.js