Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix templates: remove javascript errors #404

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
29 changes: 29 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,35 @@ CHANGELOG

- Correction et amélioration de l'affichage de la fenêtre listant les sous-taxons aggrégés (#558 par @jpm-cbna)

⚠️ **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
Loading