Bug 27847 - Don't obscure page when checkin modal is non-blocking
Summary: Don't obscure page when checkin modal is non-blocking
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 23007
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-03 10:52 UTC by Fridolin Somers
Modified: 2022-06-06 20:24 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.03,20.11.09


Attachments
Bug 27847: Don't obscure page when checkin modal is non-blocking (3.57 KB, patch)
2021-04-19 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27847: Don't obscure page when checkin modal is non-blocking (3.62 KB, patch)
2021-07-31 21:01 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 27847: Don't obscure page when checkin modal is non-blocking (3.68 KB, patch)
2021-08-10 14:10 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-03-03 10:52:58 UTC
Bug 23007 added a way to make dialogs in returns.pl optionally modal.
If preference system TransfersBlockCirc is off you can continue scanning barcodes even with a modal dialog displayed.

We should add some tip text to say one can continue scanning.
Like there is one in checkouts page.
Comment 1 Fridolin Somers 2021-03-05 13:12:44 UTC
We could also not use the darkening of background behind modal popup.
It will indicate that the popup is not blocking.
Comment 2 Owen Leonard 2021-04-19 12:06:53 UTC
Created attachment 119846 [details] [review]
Bug 27847: Don't obscure page when checkin modal is non-blocking

This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.

There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.

The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
  focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
  "blocking" behavior: The modal must be dismissed by clicking one of
  its buttons (not the backdrop) and the page behind the modal should be
  darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
  belonging to another library should trigger the "blocking" modal
  behavior.
- Test that other checkins still work correctly.
Comment 3 Lucas Gass 2021-07-31 21:01:00 UTC
Created attachment 123354 [details] [review]
Bug 27847: Don't obscure page when checkin modal is non-blocking

This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.

There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.

The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
  focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
  "blocking" behavior: The modal must be dismissed by clicking one of
  its buttons (not the backdrop) and the page behind the modal should be
  darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
  belonging to another library should trigger the "blocking" modal
  behavior.
- Test that other checkins still work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2021-08-10 14:10:29 UTC
Created attachment 123696 [details] [review]
Bug 27847: Don't obscure page when checkin modal is non-blocking

This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.

There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.

The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
  focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
  "blocking" behavior: The modal must be dismissed by clicking one of
  its buttons (not the backdrop) and the page behind the modal should be
  darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
  belonging to another library should trigger the "blocking" modal
  behavior.
- Test that other checkins still work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2021-08-10 14:54:18 UTC
Because I got a question about this bug off-bugzila:

What I saw in testing:

* When checking in an item with no holds, the transfer prompt would pop up, but I could still continue scanning. The background remained accessible and unlocked.
* When checking in an item with a hold, the background would lock up and I had to take care of the hold first.
Comment 6 Jonathan Druart 2021-08-11 11:23:50 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-08-13 11:58:01 UTC
Pushed to 21.05.x for 21.05.03
Comment 8 Fridolin Somers 2021-08-13 20:20:13 UTC
Pushed to 20.11.x for 20.11.09
Comment 9 Victor Grousset/tuxayo 2021-08-16 21:10:43 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.