mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-25 23:41:04 +00:00
25 lines
673 B
Twig
25 lines
673 B
Twig
|
{% for file in files %}
|
||
|
<script data-cfasync="false" type="text/javascript" src="js/{{ file.filename }}
|
||
|
{{- '.php' in file.filename ? get_common(file.params|merge({'v': version})) : '?v=' ~ version|url_encode }}"></script>
|
||
|
{% endfor %}
|
||
|
|
||
|
<script data-cfasync="false" type="text/javascript">
|
||
|
// <![CDATA[
|
||
|
{{ code|raw }}
|
||
|
{% if files is not empty %}
|
||
|
AJAX.scriptHandler
|
||
|
{% for file in files %}
|
||
|
.add('{{ file.filename|escape_js_string }}', {{ file.has_onload ? 1 : 0 }})
|
||
|
{% endfor %}
|
||
|
;
|
||
|
$(function() {
|
||
|
{% for file in files %}
|
||
|
{% if file.has_onload %}
|
||
|
AJAX.fireOnload('{{ file.filename|escape_js_string }}');
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
});
|
||
|
{% endif %}
|
||
|
// ]]>
|
||
|
</script>
|