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:
Yohan Boniface 2024-02-08 15:38:17 +01:00 committed by GitHub
commit c64ac2786f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,10 +1,12 @@
<script type="text/javascript"> <script type="text/javascript">
{% for m in messages %} window.addEventListener('DOMContentLoaded', (event) => {
{% 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>