Bug 28910 - Correct eslint errors in OPAC basket.js
Summary: Correct eslint errors in OPAC basket.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23833 28901
  Show dependency treegraph
 
Reported: 2021-08-27 11:26 UTC by Owen Leonard
Modified: 2022-06-06 20:27 UTC (History)
2 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.05


Attachments
Bug 28910: Correct eslint errors in OPAC basket.js (10.35 KB, patch)
2021-09-17 13:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28910: Correct eslint errors in OPAC basket.js (10.40 KB, patch)
2021-10-24 22:24 UTC, David Nind
Details | Diff | Splinter Review
Bug 28910: Correct eslint errors in OPAC basket.js (10.46 KB, patch)
2021-10-31 00:43 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 Owen Leonard 2021-08-27 11:26:42 UTC
Following coding guideline JS8: "Follow guidelines set by ESLint," some errors should be corrected in the OPAC's copy of basket.js
Comment 1 Owen Leonard 2021-09-17 13:35:54 UTC Comment hidden (obsolete)
Comment 2 David Nind 2021-10-24 22:24:38 UTC
Created attachment 126813 [details] [review]
Bug 28910: Correct eslint errors in OPAC basket.js

This patch corrects eslint errors in the OPAC copy of basket.js:
Indentation inconsistencies, undeclared variables, unused functions,
etc.

To test, apply the patch and test the "Cart" functionality in the
OPAC:

- In the OPAC, add an item to the cart.
- A popup message should appear telling you the item has been added.
- The "Add to cart" link should update to read "In your cart."
- The count if cart items in the header should be updated.
- The "In your cart (remove)" link should work correctly.
- Test this process from both the search results and
  detail pages.
- Open the cart.
- The cart should open correctly.
- In the cart, test all the controls:
  - More details
  - Send
  - Download
  - Empty and close
  - Hide window
  - Print
  - Select all / clear all
  - With checked items:
    - Remove
    - Add to list
    - Place hold
    - Tag

The following unused functions were removed: readCookieValue,
AllAreChecked, SelectAll, and quit. A search of the Koha codebase should
return no results from the opac-tmpl directory.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-10-31 00:43:58 UTC
Created attachment 127121 [details] [review]
Bug 28910: Correct eslint errors in OPAC basket.js

This patch corrects eslint errors in the OPAC copy of basket.js:
Indentation inconsistencies, undeclared variables, unused functions,
etc.

To test, apply the patch and test the "Cart" functionality in the
OPAC:

- In the OPAC, add an item to the cart.
- A popup message should appear telling you the item has been added.
- The "Add to cart" link should update to read "In your cart."
- The count if cart items in the header should be updated.
- The "In your cart (remove)" link should work correctly.
- Test this process from both the search results and
  detail pages.
- Open the cart.
- The cart should open correctly.
- In the cart, test all the controls:
  - More details
  - Send
  - Download
  - Empty and close
  - Hide window
  - Print
  - Select all / clear all
  - With checked items:
    - Remove
    - Add to list
    - Place hold
    - Tag

The following unused functions were removed: readCookieValue,
AllAreChecked, SelectAll, and quit. A search of the Koha codebase should
return no results from the opac-tmpl directory.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-11-02 15:53:33 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-11-05 14:44:37 UTC
Pushed to 21.05.x for 21.05.05
Comment 6 Fridolin Somers 2021-11-11 01:22:20 UTC
Removes some methods, I prefer not to push in 20.11.x