Bug 22942

Summary: Inclusion of Javascript file references with IntranetUserJS or OPACUserJS
Product: Koha Reporter: dominique.rouger
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: RESOLVED WORKSFORME QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: example of adding javascript code

Description dominique.rouger 2019-05-20 08:17:29 UTC
Created attachment 89925 [details]
example of adding javascript code

Currently the javascript code added from the system preferences, is done according to the scheme:
 <script type="text/javascript">
    //<![CDATA[
    code from the system preference
    //]]>
    </script>

It would be more flexible to allow an inclusion of the form 
 <script src="/my_path/my_file.js"></script>

NB simply by allowing direct entry of the code, without addition, but requiring compliance with one or the other of these syntaxes

And always at the end of the javasript code written by koha (and not in the middle of it)
Comment 1 Katrin Fischer 2023-09-23 16:09:18 UTC
Hi, you can do it like this to make it work in *UserJs

</script>

your embedded js files

<script>