Bug 15850: Correct eslint errors in cataloging.js
authorOwen Leonard <oleonard@myacpl.org>
Mon, 6 Jan 2020 16:26:33 +0000 (16:26 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 17 Feb 2020 10:45:23 +0000 (10:45 +0000)
commit94393690ef6a17d70890bde445b3ef1c700cb06d
tree881cff87ab23a51fbedbf6dca1d17014533ef9d3
parent82716a01727f143ba2c167cd86233a531f330390
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/js/cataloging.js