From ec17681560019a371309ad4c11e32dc798adc64d Mon Sep 17 00:00:00 2001 From: afornerot Date: Thu, 2 Jan 2020 14:36:26 +0100 Subject: [PATCH] rester sur la page sur un F5 (fixes #70) --- .../PortalBundle/Resources/views/Page/pages.html.twig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig index bc0124de..dc88fd38 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig @@ -219,7 +219,6 @@ {% block localjavascript %} var idpage; - $('document').ready(function(){ {% for page in pagesadmin %} {% if page.id==entity.id %} @@ -241,6 +240,7 @@ {% endfor %} {% endfor %} + // Rendre les pages user déplacable $("#pagesuser").sortable({ axis: "x", @@ -369,6 +369,8 @@ // Sauvegarder la page en cours idpage=id; + + // Cacher toutes les pages $(".pageframereload").remove(); $(".pageframe").hide(); @@ -382,6 +384,10 @@ url=url.replace('yy',usage); url=url.replace('zz',groupid); + passurl="{{ path('cadoles_core_home',{id:'xx'}) }}"; + passurl=passurl.replace('xx',id); + history.pushState('data to be passed', 'Title of the page', passurl); + // Si force le rechargement et frame existante on la détruit if(forcereload&&$("#page-"+id).length) $("#page-"+id).remove();