From 4eaa841037e407719f45424c41bbe3576bc2ba21 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 --- .../prog/en/modules/reserve/request.tt | 36 ++++++++++++++++++- koha-tmpl/intranet-tmpl/prog/js/holds.js | 31 ---------------- 2 files changed, 35 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 f479387c7ef..4a0fb57eb46 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' %]