Summary: | Make the pickup locations dropdowns use Select2 | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Hold requests | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, david, fridolin.somers, gmcharlt, jonathan.druart, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27863 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement improves the display of the pickup library dropdown list in the holds section for a record, particularly for long lists. Enhancements include being able to start typing the name of the library and search for the library.
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Bug Depends on: | 26988, 27015 | ||
Bug Blocks: | 27732 | ||
Attachments: |
Bug 27016: Make the pickup locations dropdowns use Select2
Bug 27016: Make the pickup locations dropdowns use Select2 Bug 27016: Make the pickup locations dropdowns use Select2 Bug 27016: Make the pickup locations dropdowns use Select2 Bug 27016: (QA follow-up) Move allowClear out of ajax Bug 27016: Use $.fn.select2.defaults.set to set select2's width |
Description
Tomás Cohen Arazi (tcohen)
2020-11-13 13:33:30 UTC
Created attachment 113738 [details] [review] 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 Created attachment 113740 [details] [review] 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 Created attachment 113760 [details] [review] 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 <david@davidnind.com> The only thing I noticed when testing is that for library names with spaces in the name wrap (such as Institut Protestant de Théologie), rather than being on the same 'line'. I'm assuming this is the default behaviour for Select2. (In reply to David Nind from comment #4) > The only thing I noticed when testing is that for library names with spaces > in the name wrap (such as Institut Protestant de Théologie), rather than > being on the same 'line'. > > I'm assuming this is the default behaviour for Select2. Good point. We could fix that. I felt like the experience was better with no geometry changes when the API call gets the results. So I'm open to discuss this. I think it is a great improvement. (In reply to David Nind from comment #6) > I think it is a great improvement. Thanks! Created attachment 113791 [details] [review] 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 <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 113792 [details] [review] Bug 27016: (QA follow-up) Move allowClear out of ajax Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 114807 [details] [review] Bug 27016: Use $.fn.select2.defaults.set to set select2's width See commit ff7318c62ec7097c5b88f7278b71d0cc7feb1f39 Bug 27124: JS error "select2Width is not defined" Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x |