Bug 28522 - Correct eslint errors in staff-global.js
Summary: Correct eslint errors in staff-global.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23833
  Show dependency treegraph
 
Reported: 2021-06-07 12:25 UTC by Owen Leonard
Modified: 2022-06-06 20:24 UTC (History)
4 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:
21.11.00,21.05.02,20.11.08


Attachments
Bug 28522: Correct eslint errors in staff-global.js (5.00 KB, patch)
2021-06-07 12:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28522: Correct eslint errors in staff-global.js (5.05 KB, patch)
2021-06-07 21:58 UTC, David Nind
Details | Diff | Splinter Review
Bug 28522: Correct eslint errors in staff-global.js (5.12 KB, patch)
2021-06-11 15:31 UTC, Nick Clemens
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-06-07 12:25:15 UTC
Following coding guideline JS8: "Follow guidelines set by ESLint," some errors should be corrected in staff-global.js.
Comment 1 Owen Leonard 2021-06-07 12:53:20 UTC
Created attachment 121668 [details] [review]
Bug 28522: Correct eslint errors in staff-global.js

This patch makes minor corrections to staff-global.js in order to quiet
warnings from ESLint. This includes:

- Remove unused variables
- Declare undeclared variables
- Update list of global and exported variables and functions
- Correct whitespace
- Remove an unused function (paramOfUrl)

To test, apply the patch and clear your browser cache if necessary.

- Confirm that the first search header form field has focus when
  switching bewteen pages.
- Confirm that text entered in any search header form field persists
  when you switch search header form tabs, e.g. a word typed into the
  "Check out" tab is copied to the "Check in" form when you switch to
  that tab.
- Perform a search from the "Search the catalog" tab in the header. On
  the search results page and any following detail page your search term
  should remain in the header search form.
- From a bibliographic detail page, confirm that selecting a list from
  the "Add to list" button menu correctly triggers a popup window.
Comment 2 David Nind 2021-06-07 21:58:04 UTC
Created attachment 121697 [details] [review]
Bug 28522: Correct eslint errors in staff-global.js

This patch makes minor corrections to staff-global.js in order to quiet
warnings from ESLint. This includes:

- Remove unused variables
- Declare undeclared variables
- Update list of global and exported variables and functions
- Correct whitespace
- Remove an unused function (paramOfUrl)

To test, apply the patch and clear your browser cache if necessary.

- Confirm that the first search header form field has focus when
  switching bewteen pages.
- Confirm that text entered in any search header form field persists
  when you switch search header form tabs, e.g. a word typed into the
  "Check out" tab is copied to the "Check in" form when you switch to
  that tab.
- Perform a search from the "Search the catalog" tab in the header. On
  the search results page and any following detail page your search term
  should remain in the header search form.
- From a bibliographic detail page, confirm that selecting a list from
  the "Add to list" button menu correctly triggers a popup window.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens 2021-06-11 15:31:23 UTC
Created attachment 121857 [details] [review]
Bug 28522: Correct eslint errors in staff-global.js

This patch makes minor corrections to staff-global.js in order to quiet
warnings from ESLint. This includes:

- Remove unused variables
- Declare undeclared variables
- Update list of global and exported variables and functions
- Correct whitespace
- Remove an unused function (paramOfUrl)

To test, apply the patch and clear your browser cache if necessary.

- Confirm that the first search header form field has focus when
  switching bewteen pages.
- Confirm that text entered in any search header form field persists
  when you switch search header form tabs, e.g. a word typed into the
  "Check out" tab is copied to the "Check in" form when you switch to
  that tab.
- Perform a search from the "Search the catalog" tab in the header. On
  the search results page and any following detail page your search term
  should remain in the header search form.
- From a bibliographic detail page, confirm that selecting a list from
  the "Add to list" button menu correctly triggers a popup window.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Jonathan Druart 2021-06-21 10:06:40 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-07-02 13:24:06 UTC
Pushed to 21.05.x for 21.05.02
Comment 6 Fridolin Somers 2021-07-10 03:24:35 UTC
Pushed to 20.11.x for 20.11.08
Comment 7 Victor Grousset/tuxayo 2021-07-11 02:35:10 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.