Bug 15849 - Correct JSHint errors in additem.js
Summary: Correct JSHint errors in additem.js
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 17:44 UTC by Owen Leonard
Modified: 2016-02-17 17:44 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-02-17 17:44:25 UTC
Following coding guideline JS8: "Follow guidelines set by JSHint," some errors should be corrected in acq.js

koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 5, col 41, Use '!==' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 10, col 76, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 19, col 17, Bad line breaking before '||'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 35, col 97, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 51, col 9, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 53, col 9, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 54, col 9, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 57, col 9, Creating global 'for' variable. Should be 'for (var i ...'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 68, col 25, Use '===' to compare with 'undefined'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 88, col 41, Use '!==' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 95, col 24, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 99, col 67, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 103, col 31, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 103, col 73, Use '===' to compare with '0'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 113, col 37, The array literal notation [] is preferable.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 115, col 13, 'dont_copy_fields' is already defined.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 116, col 13, Creating global 'for' variable. Should be 'for (var i ...'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 122, col 58, Missing semicolon.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 174, col 17, Use '===' to compare with 'null'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 195, col 26, The object literal notation {} is preferable.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 196, col 9, ['field'] is better written in dot notation.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 196, col 30, The array literal notation [] is preferable.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 197, col 9, ['value'] is better written in dot notation.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 197, col 30, The array literal notation [] is preferable.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 202, col 11, Creating global 'for' variable. Should be 'for (var field ...'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 204, col 23, Use '===' to compare with ''.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 207, col 31, The array literal notation [] is preferable.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 212, col 21, ['field'] is better written in dot notation.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 213, col 21, ['value'] is better written in dot notation.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 208, col 69, Don't make functions within a loop.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 222, col 21, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 223, col 21, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 230, col 18, Use '===' to compare with 'false'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 241, col 18, Creating global 'for' variable. Should be 'for (var field ...'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 247, col 25, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 248, col 29, Bad line breaking before '||'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 249, col 25, Bad line breaking before '+'.
koha-tmpl/intranet-tmpl/prog/en/js/additem.js: line 256, col 18, Use '===' to compare with 'false'.