From 3174d015189dd4f0b0cd1a6fac9d67d34e33d979 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 9 Apr 2020 08:47:51 +0200 Subject: [PATCH] annulation ancres --- module/gallery/gallery.php | 4 ++-- module/gallery/view/config/config.js.php | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 5eaa7137..5cc67e04 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -74,7 +74,7 @@ class gallery extends common { // Valeurs en sortie //header('Refresh: 0;url='. helper::baseUrl() . $this->getUrl() . '#galleryConfigFilterForm' ); $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl() . '#galleryConfigFilterForm', + 'redirect' => helper::baseUrl() . $this->getUrl() /* . '#galleryConfigFilterForm'*/, 'notification' => 'Modifications enregistrées', 'state' => true ]); @@ -153,7 +153,7 @@ class gallery extends common { ]]); // Valeurs en sortie $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(). '#galleryConfigForm', + 'redirect' => helper::baseUrl() . $this->getUrl() /*. '#galleryConfigForm'*/, 'notification' => 'Modifications enregistrées', 'state' => true ]); diff --git a/module/gallery/view/config/config.js.php b/module/gallery/view/config/config.js.php index 29e35f2e..bfe8bec2 100644 --- a/module/gallery/view/config/config.js.php +++ b/module/gallery/view/config/config.js.php @@ -23,13 +23,22 @@ $( document ).ready(function() { serializeRegexp: "[^\_]*$" }); - /* + +}); + + +/** + * Scroll virer les ancres de l'URL + */ +/* +$( document ).scroll(function() { var href = window.location.href; if(href.indexOf("#") > 0){ - href = href.split("#")[0] + href.split("#")[1]; - window.location.href = href; - }*/ + href = href.split("#")[0]; + window.location.hash = href; + } }); +*/