Login/logout system OK

This commit is contained in:
Pierre
2017-03-01 15:37:55 +01:00
parent 92413b3667
commit 60cbfd020d
13 changed files with 134 additions and 17 deletions

View File

@ -335,7 +335,17 @@ var ComunicWeb = {
* Perform user login
*/
loginSubmit: function(){},
}
},
/**
* Logout controller
*/
logout: {
/**
* Open logout page and perform logout
*/
openLogoutPage: function(additionnalData, targetElement){},
},
},
}

View File

@ -4,7 +4,6 @@
* @author Pierre HUBERT
*/
ComunicWeb.common.network = {
/**

View File

@ -92,13 +92,18 @@ ComunicWeb.common.page = {
//Extract the first part of the URL
var firstPartURI = pageURI.toString();
//Check if there are hashtag for the URL
if(firstPartURI.indexOf("#") != -1){
firstPartURI = firstPartURI.split("#")[0];
}
//Check if pageURI is empty
if(firstPartURI == ""){
firstPartURI = "home";
}
//Check if there is also subfolders
if(firstPartURI.indexOf("/") != "/"){
if(firstPartURI.indexOf("/") != -1){
firstPartURI = firstPartURI.split("/")[0];
}

View File

@ -32,9 +32,9 @@ ComunicWeb.common.url = {
//Determine the new URL
var newURL = ComunicWeb.__config.siteURL + newURI;
//Apply it
window.history.pushState("object or string", newTitle, newURI);
window.history.pushState("object or string", newTitle, newURL);
//Everything is OK
return true;