Merge pull request #1588 from umap-project/fix-map-messages
fix: messages coming from Django where never displayed in map view
This commit is contained in:
commit
c64ac2786f
1 changed files with 4 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
window.addEventListener('DOMContentLoaded', (event) => {
|
||||||
{% for m in messages %}
|
{% for m in messages %}
|
||||||
{# We have just one, but we need to loop, as for messages API #}
|
{# We have just one, but we need to loop, as for messages API #}
|
||||||
L.U.fire('ui:alert', {
|
MAP.ui.alert({
|
||||||
content: "{{ m }}",
|
content: "{{ m }}",
|
||||||
level: "{{ m.tags }}",
|
level: "{{ m.tags }}",
|
||||||
duration: 100000
|
duration: 100000
|
||||||
})
|
})
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue