https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #13 from David Cook <[email protected]> --- I'm digging the move to using an ES module. However, as per JS1 from the coding guidelines, I think we should keep all the relevant JS code in a separate file. You can do that with the following: [% Asset.js("js/form-submit.js",{'type' => 'module'}) | $raw %] Then rather than exporting the function, you can just run it in koha-tmpl/intranet-tmpl/prog/js/form-submit.js Alternatively, if we think we do want to export it for whatever reason, then I'd suggest we make something like koha-tmpl/intranet-tmpl/prog/js/esm/form-submit.js to store the module and have koha-tmpl/intranet-tmpl/prog/js/form-submit.js stay as the initiator script which invokes the function at load time. -- Also, could we get a name change on this bug report to reflect its current nature? -- 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/
