diff --git a/avisstage/static/js/recherche.js b/avisstage/static/js/recherche.js index 56e61c4..06a2eaf 100644 --- a/avisstage/static/js/recherche.js +++ b/avisstage/static/js/recherche.js @@ -15,7 +15,9 @@ function InterfaceRecherche(STATIC_ROOT, API_LIEU, ITEMS_URL, lieux) { function initInterface() { main_container = $("body"); - if (main_container.hasClass("vue-liste")) { + if (sessionStorage && sessionStorage.interface_mode) { + interface_mode = sessionStorage.interface_mode; + } else if (main_container.hasClass("vue-liste")) { interface_mode = "liste"; } else if (main_container.hasClass("vue-carte")) { interface_mode = "carte"; @@ -67,6 +69,9 @@ function InterfaceRecherche(STATIC_ROOT, API_LIEU, ITEMS_URL, lieux) { interface_mode = mode; main_container.removeClass("vue-carte vue-hybride vue-liste") .addClass("vue-"+mode); + if (sessionStorage) { + sessionStorage.interface_mode = mode; + } if (mode=="hybride" || mode=="carte") { initCarte(); map.invalidateSize(); diff --git a/avisstage/templates/avisstage/recherche/recherche.html b/avisstage/templates/avisstage/recherche/recherche.html index 102bd4d..6400225 100644 --- a/avisstage/templates/avisstage/recherche/recherche.html +++ b/avisstage/templates/avisstage/recherche/recherche.html @@ -3,7 +3,7 @@ {% block title %}Chercher un stage - ExperiENS{% endblock %} -{% block extra_content_class %}recherche{% endblock %} +{% block bodyclass %}recherche{% endblock %} {% block content %}