mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Wrap socket usage in DOMContentLoaded eventlistener
This commit is contained in:
parent
a51394dddd
commit
970d7024e0
@ -101,8 +101,9 @@
|
||||
|
||||
<script>
|
||||
var corpusList = new RessourceList("corpora", nopaque.foreignCorporaSubscribers, "corpus");
|
||||
var jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers,
|
||||
"job");
|
||||
nopaque.socket.emit("foreign_user_ressources_init", {{ user.id }});
|
||||
var jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers, "job");
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
nopaque.socket.emit("foreign_user_ressources_init", {{ user.id }});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -186,7 +186,9 @@
|
||||
var informationUpdater = new InformationUpdater({{ corpus.id }}, false);
|
||||
{% else %}
|
||||
var informationUpdater = new InformationUpdater({{ corpus.id }}, true);
|
||||
nopaque.socket.emit('subscribe_foreign_user_ressources', {{ corpus.user_id }});
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
nopaque.socket.emit("subscribe_foreign_user_ressources", {{ corpus.user_id }});
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -259,7 +259,9 @@
|
||||
var informationUpdater = new InformationUpdater({{ job.id }}, false);
|
||||
{% else %}
|
||||
var informationUpdater = new InformationUpdater({{ job.id }}, true);
|
||||
nopaque.socket.emit('foreign_user_ressources_init', {{ job.user_id }});
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
nopaque.socket.emit("foreign_user_ressources_init", {{ job.user_id }});
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user