Bug 15843 - Move MARC subfields structure JavaScript into separate file
Summary: Move MARC subfields structure JavaScript into separate file
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 14:31 UTC by Owen Leonard
Modified: 2017-06-14 22:05 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:


Attachments
Bug 15843 - Move MARC subfields structure JavaScript into separate file (14.23 KB, patch)
2016-02-17 14:41 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15843: Move MARC subfields structure JavaScript into separate file (14.28 KB, patch)
2016-02-17 16:04 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 15843: Move MARC subfields structure JavaScript into separate file (14.33 KB, patch)
2016-02-18 11:36 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:31:09 UTC
Coding guideline JS1 (https://wiki.koha-community.org/wiki/Coding_Guidelines#JS1:_Embedding_JavaScript_blocks_in_templates) says "Whenever possible JavaScript should be placed in a separate file."

The JavaScript embedded in admin/marc_subfields_structure.tt is not dependent on template processing, so it can be safely moved to a separate file.
Comment 1 Owen Leonard 2016-02-17 14:41:21 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-02-17 16:04:57 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-02-18 11:36:58 UTC
Created attachment 48209 [details] [review]
Bug 15843: Move MARC subfields structure JavaScript into separate file

The JavaScript embedded in the MARC subfields structure template is not
dependent on template processing and can safely be moved to a separate
file. This patch does so. Removed in the process is some lines which
were commented out.

To test, apply the patch and go to Administration -> MARC framworks.

 - Click 'MARC structure' for a framework you can edit.
 - Click 'subfields' for a tag you can edit.
 - Click 'Edit' for a subfield you can edit.
 - Confirm that tabs and accordian sections work correctly.
 - Make changes under Advanced constraints -> Visibility and confirm
   that they are saved correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Brendan Gallagher 2016-02-24 01:44:23 UTC
pushed to master - Should be in the May 2016 release.  Thanks!