From 810601035a462fdbcb3ebbcdf63aba8ae5350f54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Mon, 19 May 2014 16:21:10 +0200 Subject: [PATCH 1/1] =?utf8?q?Ajout=20d'un=20param=C3=A8tre=20=C2=AB=C2=A0?= =?utf8?q?noHistory=C2=A0=C2=BB=20pour=20que=20les=20envoise=20de=20formul?= =?utf8?q?aires=20n'aient=20pas=20d'entr=C3=A9es=20dans=20l'historique.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/ajax_scripts/ajax_form_manager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skins/ajax_scripts/ajax_form_manager.js b/skins/ajax_scripts/ajax_form_manager.js index 8bbd4e7..248f183 100644 --- a/skins/ajax_scripts/ajax_form_manager.js +++ b/skins/ajax_scripts/ajax_form_manager.js @@ -8,12 +8,13 @@ var FormManager; (function(){ -FormManager = function(form, responseTextDest, lazy) { +FormManager = function(form, responseTextDest, lazy, noHistory) { if (form.elements.namedItem("noAjax")) {return;} this.form = form; this.responseTextDest = responseTextDest; this.lazy = lazy; + this.noHistory = noHistory; var thisManager = this; this.form.onsubmit = function(evt) { thisManager.submit(evt); }; this.form.onclick = function(evt) { thisManager.click(evt); }; @@ -436,7 +437,7 @@ FormManager.prototype.loadResponse = function(req) { onAfterPopulate(); this.scrollToPortalMessage(); var url = this.form.action; - history.pushState(url, document.title, url); + if (!this.noHistory){ history.pushState(url, document.title, url); } }; FormManager.prototype.scrollToPortalMessage = function() { -- 2.20.1