[Bug 21091] New: Move add item template JavaScript to a separate file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Bug ID: 21091 Summary: Move add item template JavaScript to a separate file 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 would like to modify the add item template (additem.tt) to move JavaScript from the <head> to separate files: cataloging_additem.js and cataloging_additem.inc (for defining translatable strings used in the js). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 77135 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77135&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Claire Gravely <claire_gravely@hotmail.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=21091 Claire Gravely <claire_gravely@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77135|0 |1 is obsolete| | --- Comment #2 from Claire Gravely <claire_gravely@hotmail.com> --- Created attachment 77876 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77876&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please rebase on top of bug 13618. I do not think we should move the declaration of columns_settings in the .inc, it should be stay close to the datatables init. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Owen, can you please rebase and take a look at Jonathan's comment#3? Thx! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77876|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82707&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82707|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=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=21091 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82708&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Jonathan Druart from comment #3)
I do not think we should move the declaration of columns_settings in the .inc, it should be stay close to the datatables init.
I don't think it makes sense to create a whole new <script> block for columns_settings when it can be included in the include file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 José-Mario Monteiro-Santos <jose-mario.monteiro-santos@inlibro.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=21091 José-Mario Monteiro-Santos <jose-mario.monteiro-santos@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82708|0 |1 is obsolete| | --- Comment #8 from José-Mario Monteiro-Santos <jose-mario.monteiro-santos@inlibro.com> --- Created attachment 85205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85205&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 José-Mario Monteiro-Santos <jose-mario.monteiro-santos@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jose-mario.monteiro-santos@ | |inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Owen, there are some 'red flags' in the QA script, can you please take a look and fix/comment? In testing it did work well so far: FAIL koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc OK filters OK forbidden patterns OK git manipulation FAIL js_in_body A <script> tag found inside head, must be moved to the body (see bug 17858) OK spelling OK tt_valid FAIL valid_template : filter not found -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Katrin Fischer from comment #9)
FAIL js_in_body A <script> tag found inside head, must be moved to the body (see bug 17858)
This looks to me like it's a bug in the QA script?
OK spelling OK tt_valid FAIL valid_template : filter not found
I don't understand this error... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am with you... I am not sure what to make of those 2 either. @Jonathan - Can you help? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #9)
FAIL koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc FAIL js_in_body A <script> tag found inside head, must be moved to the body (see bug 17858)
This is a bug indeed, I will try to fix it.
OK spelling OK tt_valid FAIL valid_template : filter not found
This is not a bug, [% USE raw %] is missing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 85499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85499&action=edit Bug 22015: Add missing USE raw statement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85499|0 |1 is obsolete| | --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 85500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85500&action=edit Bug 21091: Add missing USE raw statement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #12)
(In reply to Katrin Fischer from comment #9)
FAIL koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc FAIL js_in_body A <script> tag found inside head, must be moved to the body (see bug 17858)
This is a bug indeed, I will try to fix it.
See https://gitlab.com/koha-community/qa-test-tools/issues/12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85205|0 |1 is obsolete| | Attachment #85500|0 |1 is obsolete| | --- Comment #17 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 85626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85626&action=edit Bug 21091: Move add item template JavaScript to a separate file This patch moves the JavaScript in the add item template to separate files: 1 JS file and 1 include file containing translatable strings. While moving the JS to cataloging_additem.js I have made some changes to quiet ESLint warnings (spacing, variable definition). To test, apply the patch and open the add item page for an existing record. Test the various JS-driven functionalities: - Table sorting - Table column configuration - Table searching - Table inline edit/delete links (click anywhere in the table row) - Add multiple item form show/hide - Add multiple item warning when adding 100+ items Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> Signed-off-by: Josef Moravec <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=21091 --- Comment #18 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 85627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85627&action=edit Bug 21091: Add missing USE raw statement Signed-off-by: Josef Moravec <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=21091 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | 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=21091 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement will not be backported to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21091 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28689 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28689 [Bug 28689] Extra %s in alert message when saving an items -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org