From b412214976322fe4bca003b3bd1ab4c7e58b23a0 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 12 May 2018 12:34:39 +0200 Subject: [PATCH] Made easier to leave the website --- assets/js/common/page.js | 7 ++++--- assets/js/common/system.js | 7 ++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/assets/js/common/page.js b/assets/js/common/page.js index d16f4d45..f6dd80aa 100644 --- a/assets/js/common/page.js +++ b/assets/js/common/page.js @@ -186,8 +186,9 @@ ComunicWeb.common.page = { //Change page title document.title = pageInfos.pageTitle; - //Change page URL - ComunicWeb.common.url.changeURI(document.title, pageURI); + //Change page URL, if required + if(additionnalData.no_url_update ? !additionnalData.no_url_update : true) + ComunicWeb.common.url.changeURI(document.title, pageURI); //Save new url this._current_url = window.location.href.toString(); @@ -274,7 +275,7 @@ ComunicWeb.common.page = { var currentPage = ComunicWeb.common.url.getCurrentWebsiteURL(); //Open a page - this.openPage(currentPage); + this.openPage(currentPage, {no_url_update: true}); }, /** diff --git a/assets/js/common/system.js b/assets/js/common/system.js index f6cd2025..c9cfb56e 100644 --- a/assets/js/common/system.js +++ b/assets/js/common/system.js @@ -52,11 +52,8 @@ ComunicWeb.common.system = { * Open a page */ if(!openPage){ - //Get current page URI - var currentPage = ComunicWeb.common.url.getCurrentWebsiteURL(); - - //Open a page - ComunicWeb.common.page.openPage(currentPage); + //Refresh current page + ComunicWeb.common.page.refresh_current_page(); } else //Open specified page