Bug 18545

Summary: Remove use of onclick from OPAC Cart
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: OPACAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jesse, katrin.fischer, kyle, m.de.rooy, mik, mtj, nick, veron
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18546
Change sponsored?: Sponsored Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 18546    
Attachments: Bug 18545: Remove use of onclick from OPAC cart
Bug 18545: Remove use of onclick from OPAC cart
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart
Bug 18545: Remove use of onclick from OPAC cart
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart
Bug 18545: Re-add call to enableCheckboxActions

Description Aleisha Amohia 2017-05-05 03:59:32 UTC

    
Comment 1 Aleisha Amohia 2017-05-05 04:02:18 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2017-05-05 04:29:49 UTC
Created attachment 63156 [details] [review]
Bug 18545: Remove use of onclick from OPAC cart

To test:
1) Apply patch and add one or more items to your cart
2) Confirm that clicking the following things still works as expected:
 - more details
 - brief display
 - send
 - download
 - print
 - select all
 - clear all
 - selecting by clicking checkbox
 - remove title
 - add title to list
 - place hold
 - add tag
 - empty and close

Sponsored-by: Catalyst IT

Followed test plan, works as expected. Resolves issue with two
print dialogues from Bug 18544.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Marc Véron 2017-05-05 04:36:18 UTC
Changing status to bug (minor) because of issue with print dialogues, see Bug 18544
Comment 4 Marc Véron 2017-05-05 04:39:48 UTC
*** Bug 18544 has been marked as a duplicate of this bug. ***
Comment 5 Marcel de Rooy 2017-05-12 06:48:51 UTC
If I add two items to the cart, and I select them both by clicking All, and than deselect the first one, and than click Remove, all items are cleared from the cart.

Failed QA
Comment 6 Owen Leonard 2017-06-09 15:54:43 UTC
Created attachment 64158 [details] [review]
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart

This patch makes a few corrections:

- Use 'e.preventDefault()' instead of 'return false' in changed
  sections.
- Modify the event handler on checkboxes to successfully handle the
  un-check action as well as the check action. (QA comment 5).

To test, follow the original test plan.
Comment 7 Aleisha Amohia 2017-06-13 00:04:50 UTC
Created attachment 64242 [details] [review]
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart

This patch makes a few corrections:

- Use 'e.preventDefault()' instead of 'return false' in changed
  sections.
- Modify the event handler on checkboxes to successfully handle the
  un-check action as well as the check action. (QA comment 5).

To test, follow the original test plan.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 8 Kyle M Hall 2017-06-15 14:15:15 UTC
I'm still seeing the same issue as Marcel.
Comment 9 Aleisha Amohia 2017-06-27 03:35:01 UTC
(In reply to Kyle M Hall from comment #8)
> I'm still seeing the same issue as Marcel.

Sorry Kyle, I'm not seeing the issue after my last patch. Can someone else please test?
Comment 10 Jesse Maseto 2017-07-06 17:52:29 UTC
This patch works as described when applied. I'm going to sign off.
Comment 11 Jesse Maseto 2017-07-06 17:54:43 UTC
Created attachment 64861 [details] [review]
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Comment 12 Nick Clemens 2017-07-21 11:28:58 UTC
Created attachment 65172 [details] [review]
Bug 18545: Remove use of onclick from OPAC cart

To test:
1) Apply patch and add one or more items to your cart
2) Confirm that clicking the following things still works as expected:
 - more details
 - brief display
 - send
 - download
 - print
 - select all
 - clear all
 - selecting by clicking checkbox
 - remove title
 - add title to list
 - place hold
 - add tag
 - empty and close

Sponsored-by: Catalyst IT

Followed test plan, works as expected. Resolves issue with two
print dialogues from Bug 18544.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Nick Clemens 2017-07-21 11:29:02 UTC
Created attachment 65173 [details] [review]
Bug 18545 [Follow-up] Remove use of onclick from OPAC Cart

This patch makes a few corrections:

- Use 'e.preventDefault()' instead of 'return false' in changed
  sections.
- Modify the event handler on checkboxes to successfully handle the
  un-check action as well as the check action. (QA comment 5).

To test, follow the original test plan.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens 2017-07-21 11:29:29 UTC
All worked well for me, I could not recreate the issue Marcel and Kyle mentioned
Comment 15 Jonathan Druart 2017-07-24 17:26:07 UTC
Created attachment 65202 [details] [review]
Bug 18545: Re-add call to enableCheckboxActions

This call is used to refresh the page correctly
Comment 16 Jonathan Druart 2017-07-24 19:02:30 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 17 Fridolin SOMERS 2017-07-31 08:06:49 UTC
Pushed to 17.05.x, will be in 17.05.03.
Comment 18 Katrin Fischer 2017-08-01 05:52:09 UTC
These patches have been pushed to 16.11.x and will be in 16.11.11.
Comment 19 Mason James 2017-08-24 13:56:06 UTC
Pushed to 16.05.x, for 16.05.16 release