Bug 15844 - Correct JSHint errors in staff-global.js
Summary: Correct JSHint errors in staff-global.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 14:53 UTC by Owen Leonard
Modified: 2017-06-14 22:10 UTC (History)
3 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:
Circulation function:


Attachments
Bug 15844 - Correct JSHint errors in staff-global.js (3.32 KB, patch)
2016-02-17 15:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 15844 - Correct JSHint errors in staff-global.js (3.40 KB, patch)
2016-02-17 16:14 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15844 - Correct JSHint errors in staff-global.js (3.47 KB, patch)
2016-02-18 11:40 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-02-17 14:53:22 UTC
Following coding guideline JS8: "Follow guidelines set by JSHint," some errors should be corrected in staff-global.js

staff-global.js: line 7, col 73, Missing semicolon.
staff-global.js: line 7, col 75, Missing semicolon.
staff-global.js: line 16, col 2, Unnecessary semicolon.
staff-global.js: line 103, col 13, 'newin' is already defined.
staff-global.js: line 125, col 39, Use '===' to compare with '0'.
staff-global.js: line 125, col 73, Use '===' to compare with '0'.
Comment 1 Owen Leonard 2016-02-17 15:36:45 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-02-17 16:14:11 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-02-18 11:40:19 UTC
Created attachment 48210 [details] [review]
Bug 15844 - Correct JSHint errors in staff-global.js

This patch corrects minor errors in staff-global.js according to
warnings raised by JSHint.

To test, apply the patch and run JSHint on staff-global.js. No warnings
should be raised.

To confirm that the behavior of the JS is not changed, clear your
browser cache if necessary and:

- Confirm that the "Help" link opens the help window.
- Confirm that audio alerts work with local and remote sound files
- Confirm that the format() method is still working correctly by, for
  instance, opening the detail page for a bibliographic record with
  multiple items and choosing 'Edit -> Delete record' from the menu. The
  error message should read like "2 item(s) are attached to this
  record..."

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. No errors with JSHint CLI (6 errors fixed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Brendan Gallagher 2016-02-24 01:35:03 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 5 Julian Maurice 2016-02-26 15:35:55 UTC
Patch pushed to 3.22.x, will be in 3.22.4