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.
Created attachment 48185 [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.
Created attachment 48191 [details] [review] [SIGNED-OFF]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
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>
pushed to master - Should be in the May 2016 release. Thanks!