[Bug 42291] New: Tidy all script tags - shelves
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Bug ID: 42291 Summary: Tidy all script tags - shelves Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Blocks: 42094 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42094 [Bug 42094] Tidy all script tags (except value_builder) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196799&action=edit Bug 42291: Tidy all script tags - shelves In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag. This patch focuses on the virtual shelves module. Trivial changes, the existing JS variables are moved in a separate script tag. We could have gone further with the list of shelves (the build_dropdown function) , but that's for another day... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196800 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196800&action=edit Bug 42291: Tidy all script tags - shelves (auto tidy) Patch from commit fb5d9d4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196799|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196917&action=edit Bug 42291: Tidy all script tags - shelves In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag. This patch focuses on the virtual shelves module. Trivial changes, the existing JS variables are moved in a separate script tag. We could have gone further with the list of shelves (the build_dropdown function) , but that's for another day... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196800|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196918&action=edit Bug 42291: Tidy all script tags - shelves (auto tidy) Patch from commit ac1692e -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41653 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41653 [Bug 41653] Stores for permissions and sysprefs should be under the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Paul Derscheid <paul.derscheid@lmscloud.de> 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=42291 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196917|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196918|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 197672 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197672&action=edit Bug 42291: Tidy all script tags - shelves In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag. This patch focuses on the virtual shelves module. Trivial changes, the existing JS variables are moved in a separate script tag. We could have gone further with the list of shelves (the build_dropdown function) , but that's for another day... Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 197673 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197673&action=edit Bug 42291: Tidy all script tags - shelves (auto tidy) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |bibliothek@th-wildau.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197672|0 |1 is obsolete| | Attachment #197673|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #7 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 200076 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200076&action=edit Bug 42291: Tidy all script tags - shelves In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag. This patch focuses on the virtual shelves module. Trivial changes, the existing JS variables are moved in a separate script tag. We could have gone further with the list of shelves (the build_dropdown function) , but that's for another day... Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #8 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 200077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200077&action=edit Bug 42291: Tidy all script tags - shelves (auto tidy) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #9 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 200113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200113&action=edit Bug 42291: (follow-up) Move remaining JS to non TT script block This removes all TT interpolations from the build_dropdown function and moves it to the non TT script block. To test: a) create several private or public lists via /cgi-bin/koha/virtualshelves/shelves.pl b) either the number of private or public list should be > 10 to c) add some items to a list d) on this lists content site click 'Add to' to open drop down menu e) the menu should offer up to 10 private or 10 public list options and a [ more lists ] option -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #10 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to Jonathan Druart from comment #1)
Created attachment 196799 [details] [review] Bug 42291: Tidy all script tags - shelves
In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag.
This patch focuses on the virtual shelves module.
Trivial changes, the existing JS variables are moved in a separate script tag. We could have gone further with the list of shelves (the build_dropdown function) , but that's for another day...
Hi Jonathan and Paul I removed the remaining TT stuff from build_dropdown and moved it to the non TT JS block. Could you have a short look at it so this can remain passed QA? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200113|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200126&action=edit Bug 42291: (follow-up) Move remaining JS to non TT script block This removes all TT interpolations from the build_dropdown function and moves it to the non TT script block. To test: a) create several private or public lists via /cgi-bin/koha/virtualshelves/shelves.pl b) either the number of private or public list should be > 10 to c) add some items to a list d) on this lists content site click 'Add to' to open drop down menu e) the menu should offer up to 10 private or 10 public list options and a [ more lists ] option Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200127 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200127&action=edit Bug 42291: Prevent XSS Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200127|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200130&action=edit Bug 42291: Prevent XSS Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200130|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200131&action=edit Bug 42291: Prevent XSS Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200131|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #15 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 200138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200138&action=edit Bug 42291: Prevent XSS Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42291 --- Comment #16 from Jan Kissig <bibliothek@th-wildau.de> --- Thanx Jonathan for the fix -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org