[Bug 15850] New: Correct JSHint errors in cataloging.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Bug ID: 15850 Summary: Correct JSHint errors in cataloging.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: koha-bugs@lists.koha-community.org, m.de.rooy@rijksmuseum.nl, testopia@bugs.koha-community.org Following coding guideline JS8: "Follow guidelines set by JSHint," some errors should be corrected in cataloging.js koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 43, col 31, The array literal notation [] is preferable. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 49, col 72, Use '!==' to compare with ''. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 99, col 13, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 116, col 17, 'id_input' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 182, col 37, 'olddiv' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 183, col 37, 'oldcontrol' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 108, col 18, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 108, col 26, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 108, col 46, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 109, col 27, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 109, col 59, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 110, col 28, 'j' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 220, col 21, 'inputs' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 226, col 25, 'anchors' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 227, col 30, 'j' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 176, col 21, 'CloneButtonPlus' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 280, col 13, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 280, col 17, 'len' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 287, col 13, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 287, col 17, 'len' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 296, col 13, 'oldcontrol' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 315, col 21, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 409, col 15, 'line' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 425, col 34, 'line' used out of scope. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 465, col 13, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 465, col 17, 'len' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 471, col 13, 'i' is already defined. koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js: line 471, col 17, 'len' is already defined. -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23183 Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |oleonard@myacpl.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23183 [Bug 23183] Reindent cataloging.js -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Correct JSHint errors in |Correct eslint errors in |cataloging.js |cataloging.js -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 96859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96859&action=edit Bug 15850: Correct eslint errors in cataloging.js This patch makes corrections to cataloging.js so that there are no issues flagged by eslint. The fewer eslint warnings we have to see makes it more likely that real problems will be noticed. Some functions were unused have been removed. To test, apply the patch and clear your browser cache if necessary. - Open a MARC record for editing in the basic cataloging editor. - Test the JavaScript-driven functionality affected by the changed file: - Open the authority browser from a field (e.g. 100a) which is linked to an authority type. - Clone a repeatable tag. - Clone a repeatable subfield - "Unclone" a tag or subfield: This should remove the tag or subfield (if possible) or clear the contents of the tag or subfield if not. - Clone a subfield on the item edit page (In my MARC21 installation I had to modify the default framework in order to have a repeatable item subfield to test with). -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96859|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 98916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98916&action=edit Bug 15850: Correct eslint errors in cataloging.js This patch makes corrections to cataloging.js so that there are no issues flagged by eslint. The fewer eslint warnings we have to see makes it more likely that real problems will be noticed. Some functions were unused have been removed. To test, apply the patch and clear your browser cache if necessary. - Open a MARC record for editing in the basic cataloging editor. - Test the JavaScript-driven functionality affected by the changed file: - Open the authority browser from a field (e.g. 100a) which is linked to an authority type. - Clone a repeatable tag. - Clone a repeatable subfield - "Unclone" a tag or subfield: This should remove the tag or subfield (if possible) or clear the contents of the tag or subfield if not. - Clone a subfield on the item edit page (In my MARC21 installation I had to modify the default framework in order to have a repeatable item subfield to test with). Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98916|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 98957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98957&action=edit Bug 15850: Correct eslint errors in cataloging.js This patch makes corrections to cataloging.js so that there are no issues flagged by eslint. The fewer eslint warnings we have to see makes it more likely that real problems will be noticed. Some functions were unused have been removed. To test, apply the patch and clear your browser cache if necessary. - Open a MARC record for editing in the basic cataloging editor. - Test the JavaScript-driven functionality affected by the changed file: - Open the authority browser from a field (e.g. 100a) which is linked to an authority type. - Clone a repeatable tag. - Clone a repeatable subfield - "Unclone" a tag or subfield: This should remove the tag or subfield (if possible) or clear the contents of the tag or subfield if not. - Clone a subfield on the item edit page (In my MARC21 installation I had to modify the default framework in order to have a repeatable item subfield to test with). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #5 from Joy Nelson <joy@bywatersolutions.com> --- does not apply to 19.11.x. not backported -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25353 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25353 [Bug 25353] Correct eslint errors in additems.js -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15850 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|25353 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25353 [Bug 25353] Correct eslint errors in additems.js -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org