From 0f8778dc1b5fc63fa639e6e01a4e7e092d08eb4e Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 19 Feb 2019 23:54:17 +0100 Subject: [PATCH] Module redirection : test du menu surgissant avec nouvelle formulation --- module/redirection/redirection.php | 2 +- module/redirection/view/index/index.js.php | 39 ++++++++++------------ 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/module/redirection/redirection.php b/module/redirection/redirection.php index 48286e11..7cccd2ab 100755 --- a/module/redirection/redirection.php +++ b/module/redirection/redirection.php @@ -19,7 +19,7 @@ class redirection extends common { 'index' => self::GROUP_VISITOR ]; - const REDIRECTION_VERSION = '1.1'; + const REDIRECTION_VERSION = '1.2'; /** * Configuration diff --git a/module/redirection/view/index/index.js.php b/module/redirection/view/index/index.js.php index 22debcaf..62160b56 100755 --- a/module/redirection/view/index/index.js.php +++ b/module/redirection/view/index/index.js.php @@ -11,26 +11,21 @@ * @license GNU General Public License, version 3 * @link http://zwiicms.com/ * - * - * - * - * if (document.referrer.indexOf("edit") === -1) - * { - * core.confirm( - * "Souhaitez-vous accéder à l'interface de modification de la page ? En cas de refus, vous serez redirigé vers l'URL saisie dans le module de redirection.", - * function() { - * $(location).attr("href", "page/edit/getUrl(0); ?>"); - * }, - * function() { - * $(location).attr("href", "getUrl(); ?>/force"); - * } - * ); - * } - * else - * { - * $(location).attr("href", ""); - * } -**/ + **/ - -self.location='page/edit/getUrl(0); ?>'; +if (document.referrer.indexOf("edit") === -1) +{ + core.confirm( + "OUI pour accéder à l\'écran d'édition du module - NON pour tester le lien saisi.", + function() { + $(location).attr("href", "page/edit/getUrl(0); ?>"); + }, + function() { + $(location).attr("href", "getUrl(); ?>/force"); + } + ); +} +else +{ + $(location).attr("href", ""); +}