From 4d3d7fd7a257bd34a3a1846c88223bf2923f4d90 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 17 Nov 2020 12:08:39 -0300 Subject: [PATCH] Bug 27016: Make the pickup locations dropdowns use Select2 On the shoulders of bug 27015, this patch makes the pickup locations dropdowns use Select2 to handle both fetching the pickup location on-deman through the API, and also searching for them. This provides a better user experience for really big lists. To test: 1. Have some holds on a biblio => SUCCESS: Bug 26988 works, made it load the data when you click on the dropdowns. 2. Apply this patch 3. Reload the page => SUCCESS: Similar-ish behaviour => SUCCESS: Notice you can search for branch names and make the list shrink 4. Sign off :-D Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../prog/en/modules/reserve/request.tt | 37 ++++++++++++++++++- koha-tmpl/intranet-tmpl/prog/js/holds.js | 31 ---------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index f479387c7e..95f55fd960 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -19,6 +19,9 @@ + [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %] @@ -985,7 +988,7 @@ [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/hc-sticky.js") | $raw %] [% Asset.js("js/circ-patron-search-results.js") | $raw %] - [% Asset.js("js/holds.js") | $raw %] + [% INCLUDE 'select2.inc' %]