[Bug 39323] New: Print dropdown in members toolbar should auto close
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Bug ID: 39323 Summary: Print dropdown in members toolbar should auto close Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: jrobb@sekls.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When using the Print dropdown to print something from the patron's account (summary, slip, etc.) the dropdown no longer closes automatically when clicking an option. This leads to an awkward extra click to clear it away after closing the print dialog. To replicate - 1 - Pull up a patron 2 - Click Print > Print summary in the toolbar 3 - Close the print dialog 4 - The Print dropdown menu is still open -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 --- Comment #1 from Jason Robb <jrobb@sekls.org> --- This is the JS I'm using in the meantime to make the dropdown go away after an item is clicked: if (window.location.href.indexOf("borrowernumber=") > -1) { $('.dropdown-item').on('click', function() { $(this).parent().parent().removeClass('show'); }); } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Carolyn Hughesman <chughesman@cclsny.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chughesman@cclsny.org --- Comment #2 from Carolyn Hughesman <chughesman@cclsny.org> --- We are experiencing this as well. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 179729 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179729&action=edit Bug 39323: Print dropdown in members toolbar should auto close The upgrade to Bootstrap 5 broke some code which was designed to close a dropdown menu: $(".btn-group").removeClass("open"); This doesn't work in Bootstrap 5. You have to use: $(".dropdown-menu").removeClass("show"); However, I found that in most cases this extra code wasn't needed if we adjust the way we do the click handlers. Using "e.preventDefault()" instead of "return false" seems to be the preferred practice. This patch also makes a minor change to CSS to fix a display issue with dropdown menus. To test apply the patch and rebuild the staff interface CSS. - Clear your browser cache if necessary. - Search the catalog and click "Edit record" on one of the results. - In the basic MARC editor click the dropdown menu on the "Save" button. - Test the three options there: "Save and view record", "Save and edit items", and "Save and continue editing". - In each case clicking one of those options should result in the menu closing before the page redirects. - The main "Save" button should still work correctly. - Perform a patron search which will return results. - Check one or more patrons in the result and then click the "Add to patron list" button. The dropdown menu should look consistent with other dropdowns. - View the detail page for one of the patron in your results. - Test each of the options under the "Print" dropdown menu. In each case the menu should close itself when you click one of the menu items. - Test the "Renew patron" and "Update child to adult patron" - Click "Search to hold" and perform a catalog search which will return results. - Check one or more results and test the "Place hold" dropdown menu items. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Brendan Gallagher <brendan@bywatersolutions.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=39323 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179729|0 |1 is obsolete| | --- Comment #4 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 180056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180056&action=edit Bug 39323: Print dropdown in members toolbar should auto close The upgrade to Bootstrap 5 broke some code which was designed to close a dropdown menu: $(".btn-group").removeClass("open"); This doesn't work in Bootstrap 5. You have to use: $(".dropdown-menu").removeClass("show"); However, I found that in most cases this extra code wasn't needed if we adjust the way we do the click handlers. Using "e.preventDefault()" instead of "return false" seems to be the preferred practice. This patch also makes a minor change to CSS to fix a display issue with dropdown menus. To test apply the patch and rebuild the staff interface CSS. - Clear your browser cache if necessary. - Search the catalog and click "Edit record" on one of the results. - In the basic MARC editor click the dropdown menu on the "Save" button. - Test the three options there: "Save and view record", "Save and edit items", and "Save and continue editing". - In each case clicking one of those options should result in the menu closing before the page redirects. - The main "Save" button should still work correctly. - Perform a patron search which will return results. - Check one or more patrons in the result and then click the "Add to patron list" button. The dropdown menu should look consistent with other dropdowns. - View the detail page for one of the patron in your results. - Test each of the options under the "Print" dropdown menu. In each case the menu should close itself when you click one of the menu items. - Test the "Renew patron" and "Update child to adult patron" - Click "Search to hold" and perform a catalog search which will return results. - Check one or more results and test the "Place hold" dropdown menu items. Sponsored-by: Athens County Public Libraries Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please explain this deletion: diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js - $("#addtoshelf").click(function () { - addToShelf(); - $(".btn-group").removeClass("open"); - return false; - }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Marcel de Rooy from comment #5)
Please explain this deletion:
There is no element with the id "addtoshelf" (nor even any instance of the string "addtoshelf") in the staff interface templates. The code should have been removed when the element was changed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180056|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 181248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181248&action=edit Bug 39323: Print dropdown in members toolbar should auto close The upgrade to Bootstrap 5 broke some code which was designed to close a dropdown menu: $(".btn-group").removeClass("open"); This doesn't work in Bootstrap 5. You have to use: $(".dropdown-menu").removeClass("show"); However, I found that in most cases this extra code wasn't needed if we adjust the way we do the click handlers. Using "e.preventDefault()" instead of "return false" seems to be the preferred practice. This patch also makes a minor change to CSS to fix a display issue with dropdown menus. To test apply the patch and rebuild the staff interface CSS. - Clear your browser cache if necessary. - Search the catalog and click "Edit record" on one of the results. - In the basic MARC editor click the dropdown menu on the "Save" button. - Test the three options there: "Save and view record", "Save and edit items", and "Save and continue editing". - In each case clicking one of those options should result in the menu closing before the page redirects. - The main "Save" button should still work correctly. - Perform a patron search which will return results. - Check one or more patrons in the result and then click the "Add to patron list" button. The dropdown menu should look consistent with other dropdowns. - View the detail page for one of the patron in your results. - Test each of the options under the "Print" dropdown menu. In each case the menu should close itself when you click one of the menu items. - Test the "Renew patron" and "Update child to adult patron" - Click "Search to hold" and perform a catalog search which will return results. - Check one or more results and test the "Place hold" dropdown menu items. Sponsored-by: Athens County Public Libraries Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.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=39323 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed CC| |jonathan.druart@gmail.com --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- t/db_dependent/selenium/update_child_to_adult.t .. # Failed test 'Current window has a "#" in the URL, event has been triggered' # at t/db_dependent/selenium/update_child_to_adult.t line 125. # 'http://koha:8081/cgi-bin/koha//members/moremember.pl?borrowernumber=111' # doesn't match '(?^u:/members/moremember\.pl\?borrowernumber=111\#$)' # Looks like you failed 1 test of 3. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please prioritize fixing Jenkins tests, we still want a lot of patches included for 25.05... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 181655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181655&action=edit Bug 39323: Fix selenium/update_child_to_adult.t This test is not really needed. It the new window opens correctly the next test will pass. And should fail if it does not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Follow-up pushed to main! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39323 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Hard to apply on 24.11.x Minor so I skip -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org