[Bug 27732] New: JavaScript error on place hold page in the staff interface
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Bug ID: 27732 Summary: JavaScript error on place hold page in the staff interface Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: minor Priority: P5 - low Component: Hold requests Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 27016 If you begin the process of placing a hold on a title which has existing holds, there is an error in the console: Uncaught ReferenceError: $ is not defined The "select2.defaults" script block comes before jQuery is loaded. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27016 [Bug 27016] Make the pickup locations dropdowns use Select2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 117086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117086&action=edit Bug 27732: JavaScript error on place hold page in the staff interface This patch moves the "$.fn.select2.defaults" definition from the top of the page to the bottom so that jQuery will be loaded first. The patch also changes the "dropdownAutoWidth" default so that the dropdown is sized correctly for its contents, regardless of the width of the initial <select>. To test, apply the patch and place a hold in the staff interface for a title which already has existing holds. - On the "Place a hold" page, before selecting a patron, you should see a table of exising holds. Test the "Pickup library" dropdown. It should work correctly. - The width of the dropdown should accommodate its contents without forcing any library name to wrap. - There should be no errors in the browser console. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27733 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27733 [Bug 27733] Sort pickup locations by library name instead of branchcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117086|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 117102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117102&action=edit Bug 27732: JavaScript error on place hold page in the staff interface This patch moves the "$.fn.select2.defaults" definition from the top of the page to the bottom so that jQuery will be loaded first. The patch also changes the "dropdownAutoWidth" default so that the dropdown is sized correctly for its contents, regardless of the width of the initial <select>. To test, apply the patch and place a hold in the staff interface for a title which already has existing holds. - On the "Place a hold" page, before selecting a patron, you should see a table of exising holds. Test the "Pickup library" dropdown. It should work correctly. - The width of the dropdown should accommodate its contents without forcing any library name to wrap. - There should be no errors in the browser console. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes: - The console error appeared for me even if no holds had been placed (that is, there were no holds on the item). - This improves the display of items in the dropdown list. However, if a shorter library name is displayed, some longer library names are still wrapped when the dropdown list is selected (such as Institut Protestant de Théologie), however it is much improved from what it was before. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117102|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117157&action=edit Bug 27732: JavaScript error on place hold page in the staff interface This patch moves the "$.fn.select2.defaults" definition from the top of the page to the bottom so that jQuery will be loaded first. The patch also changes the "dropdownAutoWidth" default so that the dropdown is sized correctly for its contents, regardless of the width of the initial <select>. To test, apply the patch and place a hold in the staff interface for a title which already has existing holds. - On the "Place a hold" page, before selecting a patron, you should see a table of exising holds. Test the "Pickup library" dropdown. It should work correctly. - The width of the dropdown should accommodate its contents without forcing any library name to wrap. - There should be no errors in the browser console. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works well, QA scripts pass.. a solid improvement. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch fixes the cause release notes| |of a JavaScript console | |error ("Uncaught | |ReferenceError: $ is not | |defined") when placing a | |hold using the staff | |interface. It: | |- Moves the | |"$.fn.select2.defaults" | |definition from the top of | |the page to the bottom so | |that jQuery is loaded | |first. | |- Improves the | |display of the dropdown | |list for the pickup library | |so that the width is wider. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27732 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 27016 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org