Manually reformat JS parts for djLint

This commit is contained in:
David Larlet 2023-06-20 10:05:28 -04:00
parent be5d27d292
commit de37721c40
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
4 changed files with 16 additions and 11 deletions

View file

@ -1,19 +1,16 @@
{% load i18n %} {% load i18n %}
<h3>{% trans "You are logged in. Continuing..." %}</h3> <h3>{% trans "You are logged in. Continuing..." %}</h3>
<script type="text/javascript"> <script type="text/javascript">
function proceed() {
function proceed()
{
if (window.opener && window.opener.umap_proceed) { if (window.opener && window.opener.umap_proceed) {
window.opener.umap_proceed(); window.opener.umap_proceed()
} else { } else {
// Trade off as Twitter does not allow us to access window.opener // Trade off as Twitter does not allow us to access window.opener
window.location.href = '{{ request.user.get_url }}' window.location.href = '{{ request.user.get_url }}'
} }
} }
proceed(); proceed()
// To handle errors, this template should be integrated into your authentication error message page // To handle errors, this template should be integrated into your authentication error message page
// Note that you can call any window.opener function like window.opener.func // Note that you can call any window.opener function like window.opener.func

View file

@ -1,3 +1,7 @@
{% load umap_tags %} {% load umap_tags %}
<div id="{{ unique_id }}" class="map_fragment"></div> <div id="{{ unique_id }}" class="map_fragment"></div>
<script type="text/javascript">new L.U.Map("{{ unique_id }}", {{ map_settings|notag|safe }});</script> <!-- djlint:off -->
<script type="text/javascript">
new L.U.Map("{{ unique_id }}", {{ map_settings|notag|safe }})
</script>
<!-- djlint:on -->

View file

@ -1,3 +1,7 @@
{% load umap_tags %} {% load umap_tags %}
<div id="map"></div> <div id="map"></div>
<script type="text/javascript">var MAP = new L.U.Map("map", {{ map_settings|notag|safe }});</script> <!-- djlint:off -->
<script type="text/javascript">
let MAP = new L.U.Map("map", {{ map_settings|notag|safe }})
</script>
<!-- djlint:on -->

View file

@ -1,10 +1,10 @@
<script type="text/javascript"> <script type="text/javascript">
{% 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', { L.U.fire('ui:alert', {
content: "{{ m }}", content: "{{ m }}",
level: "{{ m.tags }}", level: "{{ m.tags }}",
duration: 100000 duration: 100000
}); })
{% endfor %} {% endfor %}
</script> </script>