add js behaviors to koha
when you create a new js file, you put it in the
koha-tmpl/WHERE-tmpl/prog/en/js/foo.js # WHERE can be intranet or opac
now, in your template:
<script type="text/javascript" src="koha-tmpl/WHERE-tmpl/prog/en/js/foo.js"></script>
will fail if you use a translation. so write:
<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/behaviors.js"></script>
themelang is added in template C4::Output::gettemplate function (as you can easily see in the documentation)
Related posts: