[Bug 25354] New: Clean up JavaScript markup in cataloging plugin scripts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Bug ID: 25354 Summary: Clean up JavaScript markup in cataloging plugin scripts Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org I have an idea for how to move JavaScript in additem.tt and addbiblio.tt to the footer, but the JavaScript generated by the plugin scripts needs some cleanup before that can happen. Specifically, single line JS comments (// ... ) will break the script if whitespace in the script is collapsed. These will be changed to multi-line comments (/* ... */). While I'm making changes I'll be removing the <script> tag's "type" attribute and obsolete "//<![CDATA[" markers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 104239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104239&action=edit Bug 25354: Clean up JavaScript markup in cataloging plugin scripts This patch makes some minor changes to the JavaScript generated by the cataloging plugins: <script> "type" attribute removed; single-line comments converted to multi-line style; obsolete //<![CDATA[ marks removed. These changes help the JavaScript conform to current coding guidelines. The comment style change allows for whitespace in the scripts to be collapsed by the Template::Toolkit "collapse" filter. Since the patch makes small cosmetic changes to many files it may be easiest to test this patch by visually inspecting the changes. It's also simple to test some plugins which are enabled by default (at least in MARC21): In the basic MARC editor, the leader, 007, and 008. In the item editor, subfield d - Date acquired. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104239|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 109857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109857&action=edit Bug 25354: Clean up JavaScript markup in cataloging plugin scripts This patch makes some minor changes to the JavaScript generated by the cataloging plugins: <script> "type" attribute removed; single-line comments converted to multi-line style; obsolete //<![CDATA[ marks removed. These changes help the JavaScript conform to current coding guidelines. The comment style change allows for whitespace in the scripts to be collapsed by the Template::Toolkit "collapse" filter. Since the patch makes small cosmetic changes to many files it may be easiest to test this patch by visually inspecting the changes. It's also simple to test some plugins which are enabled by default (at least in MARC21): In the basic MARC editor, the leader, 007, and 008. In the item editor, subfield d - Date acquired. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109857|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 111047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111047&action=edit Bug 25354: Clean up JavaScript markup in cataloging plugin scripts This patch makes some minor changes to the JavaScript generated by the cataloging plugins: <script> "type" attribute removed; single-line comments converted to multi-line style; obsolete //<![CDATA[ marks removed. These changes help the JavaScript conform to current coding guidelines. The comment style change allows for whitespace in the scripts to be collapsed by the Template::Toolkit "collapse" filter. Since the patch makes small cosmetic changes to many files it may be easiest to test this patch by visually inspecting the changes. It's also simple to test some plugins which are enabled by default (at least in MARC21): In the basic MARC editor, the leader, 007, and 008. In the item editor, subfield d - Date acquired. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111047|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111537&action=edit Bug 25354: Clean up JavaScript markup in cataloging plugin scripts This patch makes some minor changes to the JavaScript generated by the cataloging plugins: <script> "type" attribute removed; single-line comments converted to multi-line style; obsolete //<![CDATA[ marks removed. These changes help the JavaScript conform to current coding guidelines. The comment style change allows for whitespace in the scripts to be collapsed by the Template::Toolkit "collapse" filter. Since the patch makes small cosmetic changes to many files it may be easiest to test this patch by visually inspecting the changes. It's also simple to test some plugins which are enabled by default (at least in MARC21): In the basic MARC editor, the leader, 007, and 008. In the item editor, subfield d - Date acquired. 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25354 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- enhancement will not be backported to 20.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org