[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Wainui Witika-Park changed: What|Removed |Added Status|Pushed to stable|Needs documenting --- Comment #41 from Wainui Witika-Park --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Fridolin Somers changed: What|Removed |Added Version(s)|25.05.00|25.05.00,24.11.08 released in|| Status|Pushed to main |Pushed to stable CC||[email protected] ||m -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #40 from Fridolin Somers --- Pushed to 24.11.x for 24.11.08 I bet this one is very important for future backports :D -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Fridolin Somers changed: What|Removed |Added Blocks||39680 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39680 [Bug 39680] The navigation item "Clear” in search history doesn't delete searches -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #39 from Katrin Fischer --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Katrin Fischer changed: What|Removed |Added Version(s)||25.05.00 released in|| Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #38 from Katrin Fischer --- Please have a look at bug 39553 for QA! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Martin Renvoize (ashimema) changed: What|Removed |Added CC||[email protected] ||o.uk QA Contact|[email protected] |[email protected] |y.org |o.uk Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #182237|0 |1 is obsolete|| --- Comment #37 from Martin Renvoize (ashimema) --- Created attachment 182289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182289&action=edit Bug 39567: Run JS change in separate file ESM as per JS1 As per JS1 in the coding guidelines, I've moved the inline JS from the template into a separate file. Signed-off-by: David Nind Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #182236|0 |1 is obsolete|| --- Comment #36 from Martin Renvoize (ashimema) --- Created attachment 182288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182288&action=edit Bug 39567: Remove form-submit includes from tt files Now that the form-submit code has been added to the global js-includes files for both the staff interface and OPAC, it no longer needs to be included directly in each template file. To test: 1. Apply patch 2. Clear browser cache 3. git grep "form-submit.js" --> Confirm that all imports of the form-submit.js asset have been removed, and the only results are the comment in global.js and staff-global.js 4. Test OPAC > Account page > Renew a checkout to confirm the link submission still works as expected in the OPAC i. Check out an item to a patron ii. Set a known password for that patron iii. Log into that patron's account in the OPAC iv. Click the "Renew" link next to that checkout in the checkouts table on the patron's OPAC account page --> Confirm the item is renewed as expected 5. Test some of the following buttons to confirm the link submission still works as expected in the staff interface: - Bib record > Holds > Revert transit/waiting status on a hold - Acquisitions > Basket > Create EDIFACT order - Acquisitions > Invoices > detail for a specific invoice > Delete - Acquisitions > Invoices > perform actions on invoices using the action drop-down - Acquisitions > Invoices > open/close invoices by selecting the checkboxes - Administration > Additional fields > Delete an additional field - Administration > Background jobs > Cancel a background job - Edit an item > scroll up > Actions drop-down > Print label - Cataloging > Label creator > Manage label batches > Edit a batch > Delete batch - Cataloging > Label creator > Manage label batches > Delete a batch - Patron account > holds > delete a hold - Tools > Patron lists > delete a list from the Actions drop-down - Reports > Saved reports > Preview SQL on a report > Delete - Reports > Saved reports > Delete a report from the actions drop-down - Rotating collections > Delete a collection from the actions drop-down - Stock rotations > move item to the next stage - Stock rotations > remove item from a rota - Stock rotations > Add/remove "In demand" - More > Lists > edit a specific list > Edit drop-down > Delete Signed-off-by: David Nind Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #182235|0 |1 is obsolete|| --- Comment #35 from Martin Renvoize (ashimema) --- Created attachment 182287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182287&action=edit Bug 39567: Include form-submit code from opac-bottom.inc (OPAC) Import the form-submit.js script in the global includes file for the OPAC, so that all pages have access to it without needing to import it directly. This patch also aligns the OPAC copy of form-submit.js to the staff interface copy, as the OPAC copy is missing 3 lines to support opening the link in a new tab (added to the staff interface copy in bug 37192). Signed-off-by: David Nind Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #182234|0 |1 is obsolete|| --- Comment #34 from Martin Renvoize (ashimema) --- Created attachment 182286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182286&action=edit Bug 39567: Include form-submit code from js_includes.inc (staff interface) Import the form-submit.js script in the global includes file for the staff interface, so that all pages have access to it without needing to import it directly. Signed-off-by: David Nind Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Attachment #182169|0 |1 is obsolete|| --- Comment #30 from David Nind --- Created attachment 182235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182235&action=edit Bug 39567: Include form-submit code from opac-bottom.inc (OPAC) Import the form-submit.js script in the global includes file for the OPAC, so that all pages have access to it without needing to import it directly. This patch also aligns the OPAC copy of form-submit.js to the staff interface copy, as the OPAC copy is missing 3 lines to support opening the link in a new tab (added to the staff interface copy in bug 37192). Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Text to go in the||This moves form-submit release notes||JavaScript from individual ||template files and adds it ||to the global JavaScript ||include files for the staff ||interface and OPAC. --- Comment #33 from David Nind --- Testing notes (using KTD): 1. All the things I tried worked as expected (I tested most of the things listed in the test plan). 2. Create EDIFACT order: - Enable EDIFACT system preference - Add a Libray EAN (Koha administration > Acquisition parameters > Library EANs - Add an EDI account (Koha administration > Acquisition parameters > EDI accounts) - For a basket (even if it has no items) there is now a "Create EDIFACT order" action 3. Rotating collections: Tools > Patrons and circulation > Rotating collections 4. Stock rotation: - Enable the StockRotation system preference - Go to Cataloguing > Automation > Stock rotation - Add a rota: + New rota - Add stages: Manage > Stages > + Add a stage (from the actions list, for the list of rotas) - Add items to the rota: Manage > Items > + Add items -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Attachment #182171|0 |1 is obsolete|| --- Comment #32 from David Nind --- Created attachment 182237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182237&action=edit Bug 39567: Run JS change in separate file ESM as per JS1 As per JS1 in the coding guidelines, I've moved the inline JS from the template into a separate file. Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Attachment #182170|0 |1 is obsolete|| --- Comment #31 from David Nind --- Created attachment 182236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182236&action=edit Bug 39567: Remove form-submit includes from tt files Now that the form-submit code has been added to the global js-includes files for both the staff interface and OPAC, it no longer needs to be included directly in each template file. To test: 1. Apply patch 2. Clear browser cache 3. git grep "form-submit.js" --> Confirm that all imports of the form-submit.js asset have been removed, and the only results are the comment in global.js and staff-global.js 4. Test OPAC > Account page > Renew a checkout to confirm the link submission still works as expected in the OPAC i. Check out an item to a patron ii. Set a known password for that patron iii. Log into that patron's account in the OPAC iv. Click the "Renew" link next to that checkout in the checkouts table on the patron's OPAC account page --> Confirm the item is renewed as expected 5. Test some of the following buttons to confirm the link submission still works as expected in the staff interface: - Bib record > Holds > Revert transit/waiting status on a hold - Acquisitions > Basket > Create EDIFACT order - Acquisitions > Invoices > detail for a specific invoice > Delete - Acquisitions > Invoices > perform actions on invoices using the action drop-down - Acquisitions > Invoices > open/close invoices by selecting the checkboxes - Administration > Additional fields > Delete an additional field - Administration > Background jobs > Cancel a background job - Edit an item > scroll up > Actions drop-down > Print label - Cataloging > Label creator > Manage label batches > Edit a batch > Delete batch - Cataloging > Label creator > Manage label batches > Delete a batch - Patron account > holds > delete a hold - Tools > Patron lists > delete a list from the Actions drop-down - Reports > Saved reports > Preview SQL on a report > Delete - Reports > Saved reports > Delete a report from the actions drop-down - Rotating collections > Delete a collection from the actions drop-down - Stock rotations > move item to the next stage - Stock rotations > remove item from a rota - Stock rotations > Add/remove "In demand" - More > Lists > edit a specific list > Edit drop-down > Delete Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Attachment #182168|0 |1 is obsolete|| --- Comment #29 from David Nind --- Created attachment 182234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182234&action=edit Bug 39567: Include form-submit code from js_includes.inc (staff interface) Import the form-submit.js script in the global includes file for the staff interface, so that all pages have access to it without needing to import it directly. Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Attachment #180986|0 |1 is obsolete|| --- Comment #24 from Emily Lamancusa (emlam) --- Created attachment 182168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182168&action=edit Bug 39567: Include form-submit code from js_includes.inc (staff interface) Import the form-submit.js script in the global includes file for the staff interface, so that all pages have access to it without needing to import it directly. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Status|Patch doesn't apply |Needs Signoff --- Comment #28 from Emily Lamancusa (emlam) --- Rebased for the current main -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Attachment #180988|0 |1 is obsolete|| --- Comment #26 from Emily Lamancusa (emlam) --- Created attachment 182170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182170&action=edit Bug 39567: Remove form-submit includes from tt files Now that the form-submit code has been added to the global js-includes files for both the staff interface and OPAC, it no longer needs to be included directly in each template file. To test: 1. Apply patch 2. Clear browser cache 3. git grep "form-submit.js" --> Confirm that all imports of the form-submit.js asset have been removed, and the only results are the comment in global.js and staff-global.js 4. Test OPAC > Account page > Renew a checkout to confirm the link submission still works as expected in the OPAC i. Check out an item to a patron ii. Set a known password for that patron iii. Log into that patron's account in the OPAC iv. Click the "Renew" link next to that checkout in the checkouts table on the patron's OPAC account page --> Confirm the item is renewed as expected 5. Test some of the following buttons to confirm the link submission still works as expected in the staff interface: - Bib record > Holds > Revert transit/waiting status on a hold - Acquisitions > Basket > Create EDIFACT order - Acquisitions > Invoices > detail for a specific invoice > Delete - Acquisitions > Invoices > perform actions on invoices using the action drop-down - Acquisitions > Invoices > open/close invoices by selecting the checkboxes - Administration > Additional fields > Delete an additional field - Administration > Background jobs > Cancel a background job - Edit an item > scroll up > Actions drop-down > Print label - Cataloging > Label creator > Manage label batches > Edit a batch > Delete batch - Cataloging > Label creator > Manage label batches > Delete a batch - Patron account > holds > delete a hold - Tools > Patron lists > delete a list from the Actions drop-down - Reports > Saved reports > Preview SQL on a report > Delete - Reports > Saved reports > Delete a report from the actions drop-down - Rotating collections > Delete a collection from the actions drop-down - Stock rotations > move item to the next stage - Stock rotations > remove item from a rota - Stock rotations > Add/remove "In demand" - More > Lists > edit a specific list > Edit drop-down > Delete -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Attachment #181235|0 |1 is obsolete|| --- Comment #27 from Emily Lamancusa (emlam) --- Created attachment 182171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182171&action=edit Bug 39567: Run JS change in separate file ESM as per JS1 As per JS1 in the coding guidelines, I've moved the inline JS from the template into a separate file. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Attachment #180987|0 |1 is obsolete|| --- Comment #25 from Emily Lamancusa (emlam) --- Created attachment 182169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182169&action=edit Bug 39567: Include form-submit code from opac-bottom.inc (OPAC) Import the form-submit.js script in the global includes file for the OPAC, so that all pages have access to it without needing to import it directly. This patch also aligns the OPAC copy of form-submit.js to the staff interface copy, as the OPAC copy is missing 3 lines to support opening the link in a new tab (added to the staff interface copy in bug 37192). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Nind changed: What|Removed |Added Status|Needs Signoff |Patch doesn't apply CC||[email protected] --- Comment #23 from David Nind --- The patches no longer apply for me 8-(... git bz apply 39567 Bug 39567 - Move form-submit js into js includes files 180986 - Bug 39567: Include form-submit code from js_includes.inc (staff interface) 180987 - Bug 39567: Include form-submit code from opac-bottom.inc (OPAC) 180988 - Bug 39567: Remove form-submit includes from tt files 181235 - Bug 39567: Run JS change in separate file ESM as per JS1 Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 39567: Include form-submit code from js_includes.inc (staff interface) Applying: Bug 39567: Include form-submit code from opac-bottom.inc (OPAC) Applying: Bug 39567: Remove form-submit includes from tt files Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt M koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt M koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt M koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt M koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt M koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt M koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt M koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt M koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 39567: Remove form-submit includes from tt files -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #22 from Emily Lamancusa (emlam) --- s/dependent patch/dependent bug -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #21 from Emily Lamancusa (emlam) --- Thanks for the input, Paul and David! (In reply to David Cook from comment #18) > I've gone ahead and attached my suggested changes as an additional patch. > Hopefully that makes things clearer? That definitely helps! I'm fine with moving forward with this patch - it doesn't sound like there are objections, and I don't want to hold up the dependent patch too long looking for a perfect solution. > Speaking of JS guidelines, I suppose we'll need to update JS16... Good catch, thanks! Adding it to my to-do list for when this patch gets pushed. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #20 from David Cook --- Speaking of JS guidelines, I suppose we'll need to update JS16... I'm not sure if JS15 is getting enforced... (Just noticed JS9 kind of gives some conflicting advice with JS1 with its example...) -- In any case, I think we're in a transitional time regarding best practices for organising Javascript code and implementing its execution (apart from using separate files). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567
--- Comment #19 from David Cook ---
(In reply to Paul Derscheid from comment #16)
> If we decided not to export the function, you could also just wrap it with
> (() => {
>
> })();
> and have it as an IIFE rather than a module. Which would then also shorten
> the Asset.js call to:
> [% Asset.js("js/form-submit.js") | $raw %]
>
> But that really depends on whether the exported function is in use outside
> of the context of form-submit.js itself. Maybe an IIFE is more fitting and
> can later be replaced by an exported function if the need arises?
That's also true. There's nothing about this code currently that necessarily
requires the use of a module. We don't need to export the function, and we're
not importing anything from a different module.
I suppose the handy thing with the IIFE or the module is the scoping. With
either option, we don't have to worry about the function "submit_form"
conflicting with another function of the same name defined somewhere out there.
I think both options are equal in this case.
That said, I think you've already done all this work. I've just tweaked it to
fit JS1.
But since I've added a patch, I'll leave it to QA to determine what the best
way to go is.
--
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #18 from David Cook --- I've gone ahead and attached my suggested changes as an additional patch. Hopefully that makes things clearer? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #17 from David Cook --- Created attachment 181235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181235&action=edit Bug 39567: Run JS change in separate file ESM as per JS1 As per JS1 in the coding guidelines, I've moved the inline JS from the template into a separate file. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567
--- Comment #16 from Paul Derscheid ---
You could just replace this:
import { submit_form } from "/intranet-tmpl/prog/js/form-submit.js";
$("body").on("click", ".submit-form-link", function (e) {
e.preventDefault();
submit_form(this);
});
with this:
[% Asset.js("js/form-submit.js", { 'type' => 'module' }) | $raw %]
And then call it within form-submit.js:
$("body").on("click", ".submit-form-link", function (e) {
e.preventDefault();
submit_form(this);
});
... rest of the code
That way we still have this module but no inline code is required in
js_includes.inc for example.
David's suggestion regarding an esm path and a caller makes sense, but I think
just for this one function, introducing that is not necessary.
If we decided not to export the function, you could also just wrap it with
(() => {
})();
and have it as an IIFE rather than a module. Which would then also shorten the
Asset.js call to:
[% Asset.js("js/form-submit.js") | $raw %]
But that really depends on whether the exported function is in use outside of
the context of form-submit.js itself. Maybe an IIFE is more fitting and can
later be replaced by an exported function if the need arises?
--
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 --- Comment #15 from Emily Lamancusa (emlam) --- Posted https://chat.koha-community.org/koha-community/pl/wp1sk3une3rjzkju1kwxqfw39r for discussion and consensus -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39567] Move form-submit js into js includes files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 Emily Lamancusa (emlam) changed: What|Removed |Added Summary|Move form-submit js into|Move form-submit js into js |global js |includes files --- Comment #14 from Emily Lamancusa (emlam) --- Thank you for the feedback! I'm afraid I'm not completely following it, though - I'm not very familiar with JS modularization, to be honest! If there's a discussion on best practices to be had, I'm going to need some help on this one. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
