Bug 22942 - Inclusion of Javascript file references with IntranetUserJS or OPACUserJS
Summary: Inclusion of Javascript file references with IntranetUserJS or OPACUserJS
Status: RESOLVED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-20 08:17 UTC by dominique.rouger
Modified: 2023-09-23 16:09 UTC (History)
1 user (show)

See Also:
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 (174.61 KB, image/jpeg)
2019-05-20 08:17 UTC, dominique.rouger
Details

Note You need to log in before you can comment on or make changes to this bug.
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>