Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade
Summary: 'Show all details' checkbox triggers JS error after jQuery upgrade
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/acqui/basket.pl?basketno=X
Keywords:
Depends on: 15883
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-21 16:37 UTC by Owen Leonard
Modified: 2016-12-05 21:25 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade (1.51 KB, patch)
2016-04-21 16:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade (3.45 KB, patch)
2016-04-21 17:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade (3.47 KB, patch)
2016-04-26 08:54 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade (3.54 KB, patch)
2016-04-26 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-04-21 16:37:30 UTC
When viewing a basket in acquisitions, if you have existing orders there is a checkbox you can click to display more columns in the table. Clicking it triggers an JavaScript error now.
Comment 1 Owen Leonard 2016-04-21 16:44:59 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-04-21 16:46:58 UTC
Found two more instances of the same syntax. I will revise my patch to include them.
Comment 3 Owen Leonard 2016-04-21 17:35:30 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2016-04-26 08:54:35 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-04-26 16:29:17 UTC
Created attachment 50730 [details] [review]
Bug 16321 - 'Show all details' checkbox triggers JS error after jQuery upgrade

This patch fixes problems with show/hide actions on a few pages
caused by some problematic jQuery syntax.

To test, apply the patch and go to Acquisitions.

Testing basket.tt:

- Locate a vendor which has an open basket with multiple orders.
- View the details of that basket.
- Click the 'Show all details' checkbox above the table of orders.
  - Checking the box should trigger the display of additional columns in
    the table.
  - Unchecking the box should hide them again.

Testing invoice.tt:

- Go to Acquisitions -> Invoices and perform an invoice search.
- Click to view an invoice which includes one or more received records.
- Click the 'Show all details' checkbox above the table of titles and
  confirm that it fuctions as described above.

Testing newordersubscription.tt:

- Go to Acquisitions and locate a vendor which is linked to a
  subscription
- Create or add to a basket for that vendor.
- Add an order using the 'From a subscription' option.
- Perform a search for subscriptions.
- In the table of subscriptions search results, checking or
  unchecking the "Show only renewed" checkbox should work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Brendan Gallagher 2016-04-26 23:16:14 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 7 Julian Maurice 2016-05-16 08:18:10 UTC
It's not strictly needed in 3.22.x, but it works with jQuery 1.7.2 too, and improves code readability.

Patch pushed to 3.22.x, will be in 3.22.7