mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Login/logout system OK
This commit is contained in:
@ -335,7 +335,17 @@ var ComunicWeb = {
|
||||
* Perform user login
|
||||
*/
|
||||
loginSubmit: function(){},
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Logout controller
|
||||
*/
|
||||
logout: {
|
||||
/**
|
||||
* Open logout page and perform logout
|
||||
*/
|
||||
openLogoutPage: function(additionnalData, targetElement){},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
@ -4,7 +4,6 @@
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
|
||||
ComunicWeb.common.network = {
|
||||
|
||||
/**
|
||||
|
@ -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];
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user