mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
15 lines
560 B
Twig
15 lines
560 B
Twig
// TODO: We need to find a clean way to launch this script only once the JS scripts are loaded
|
|
{% if (oUIBlock.GetOnClickJsCode() is not empty) or (oUIBlock.GetJsCode() is not empty) %}
|
|
document.addEventListener("DOMContentLoaded", function(){
|
|
setTimeout(function(){
|
|
{% if oUIBlock.GetOnClickJsCode() is not empty %}
|
|
$('#{{ oUIBlock.GetId() }}').on('click', function(){
|
|
{{ oUIBlock.GetOnClickJsCode() }}
|
|
})
|
|
{% endif %}
|
|
{% if oUIBlock.GetJsCode() is not empty %}
|
|
{{ oUIBlock.GetJsCode() }}
|
|
{% endif %}
|
|
}, 500);
|
|
});
|
|
{% endif %} |