mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Site current URI can now be easily updated.
This commit is contained in:
parent
1f636b7a5f
commit
73dfc842af
@ -191,6 +191,11 @@ var ComunicWeb = {
|
||||
*/
|
||||
refresh_current_page: function(){},
|
||||
|
||||
/**
|
||||
* Safely trigger URL update
|
||||
*/
|
||||
update_uri: function(title, uri){},
|
||||
|
||||
/**
|
||||
* Inform of page location update
|
||||
*/
|
||||
|
@ -188,10 +188,7 @@ ComunicWeb.common.page = {
|
||||
|
||||
//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();
|
||||
this.update_uri(document.title, pageURI);
|
||||
|
||||
//Get the main container of the page
|
||||
var mainContainerElem = byId("wrapper");
|
||||
@ -278,6 +275,21 @@ ComunicWeb.common.page = {
|
||||
this.openPage(currentPage, {no_url_update: true});
|
||||
},
|
||||
|
||||
/**
|
||||
* Safely trigger URL update
|
||||
*
|
||||
* @param {String} title The new title of the page
|
||||
* @param {String} uri The new URL
|
||||
*/
|
||||
update_uri: function(title, uri){
|
||||
|
||||
//Trigger URL update
|
||||
ComunicWeb.common.url.changeURI(title, uri);
|
||||
|
||||
//Save new url
|
||||
this._current_url = window.location.href.toString();
|
||||
},
|
||||
|
||||
/**
|
||||
* Inform of page location update
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user