Skip to content

Commit

Permalink
Fix templates: remove JS errors
Browse files Browse the repository at this point in the history
Fix #403.
  • Loading branch information
jpm-cbna committed Dec 7, 2023
1 parent 5a918b1 commit 4beebfe
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 16 deletions.
13 changes: 0 additions & 13 deletions atlas/static/custom/templates/footer.html.sample
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,3 @@
ga('send', 'pageview');
</script>
{% endif %}

<script>
var prevScrollpos = window.pageYOffset;
window.onscroll = function () {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementById("collapseFooter").style.top = "-100px";
} else {
document.getElementById("collapseFooter").style.top = "0px";
}
prevScrollpos = currentScrollPos;
}
</script>
8 changes: 5 additions & 3 deletions atlas/templates/home/_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
url_limit_territory = "{{url_for('static', filename='custom/territoire.json') }}";
</script>
<script src="{{ url_for('static', filename='main.js') }}"></script>
<script src="{{ url_for('static', filename='custom/maps-custom.js') }}"></script>
<script src="{{ url_for('static', filename='mapGenerator.js') }}"></script>
<script src="{{ url_for('static', filename='mapHome.js') }}"></script>
{% if configuration.AFFICHAGE_DERNIERES_OBS %}
<script src="{{ url_for('static', filename='custom/maps-custom.js') }}"></script>
<script src="{{ url_for('static', filename='mapGenerator.js') }}"></script>
<script src="{{ url_for('static', filename='mapHome.js') }}"></script>
{% endif %}
<script src="{{ url_for('static', filename='main.js') }}"></script>
<script>
// load lazy the images
Expand Down
35 changes: 35 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@
CHANGELOG
=========

1.6.2 (?)
---------

🐛 **Corrections**

⚠️ **Notes de version**

Si vous mettez à jour GeoNature-atlas :

- Vous pouvez passer directement à cette version, mais en suivant les notes de versions intermédiaires
- Si vous avez l'erreur suivante sur la page d'accueil après avoir scrollé sur la page :

::

(index):1041 Uncaught TypeError: Cannot read properties of null (reading 'style')
at window.onscroll ((index):1041:54)

- Supprimer dans votre fichier ``atlas/static/custom/templates/footer.html`` le code situé à la fin suivant :

::

<script>
var prevScrollpos = window.pageYOffset;
window.onscroll = function () {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementById("collapseFooter").style.top = "-100px";
} else {
document.getElementById("collapseFooter").style.top = "0px";
}
prevScrollpos = currentScrollPos;
}
</script>


1.6.1 (2023-10-16)
------------------

Expand Down

0 comments on commit 4beebfe

Please sign in to comment.