mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-26 10:58:49 +00:00
Prepare login page
This commit is contained in:
parent
1fb2507742
commit
7ead57ce24
@ -246,6 +246,11 @@ var ComunicWeb = {
|
||||
* Try to login user
|
||||
*/
|
||||
loginUser: function(usermail, userpassword, permanentLogin, afterLogin){},
|
||||
|
||||
/**
|
||||
* Logout user
|
||||
*/
|
||||
logoutUser: function(afterLogout){},
|
||||
},
|
||||
|
||||
/**
|
||||
@ -278,5 +283,15 @@ var ComunicWeb = {
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Login controller
|
||||
*/
|
||||
login:{
|
||||
/**
|
||||
* Open login page
|
||||
*/
|
||||
openLoginPage: function(additionnalData, targetElement){},
|
||||
}
|
||||
|
||||
},
|
||||
}
|
@ -94,11 +94,11 @@ ComunicWeb.common.page = {
|
||||
document.title = pageInfos.pageTitle;
|
||||
|
||||
//Get the main contener of the page
|
||||
var mainContenerElem = document.getElementById("wrapper");
|
||||
//var mainContenerElem = document.getElementById("wrapper");
|
||||
|
||||
//If we didn't get anything, clean the page and create a wrapper element
|
||||
if(!mainContenerElem){
|
||||
mainContenerElem = this.emptyPage(true);
|
||||
var mainContenerElem = this.emptyPage(true);
|
||||
}
|
||||
|
||||
//Check if some additionnal data was specified
|
||||
|
@ -1,9 +1,12 @@
|
||||
/**
|
||||
* Common homes functions
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
ComunicWeb.pages.home.home = {
|
||||
/**
|
||||
* Open home page
|
||||
*
|
||||
* @param {Object} additionnalData Additionnal data passed in the method
|
||||
* @param {element} targetElement Where the template will be applied
|
||||
* @returns {Boolean} False if it fails
|
||||
|
18
assets/js/pages/login.js
Normal file
18
assets/js/pages/login.js
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Login page controller
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
ComunicWeb.pages.login = {
|
||||
/**
|
||||
* Open login page
|
||||
*
|
||||
* @param {Object} additionnalData Additionnal data passed in the method
|
||||
* @param {element} targetElement Where the template will be applied
|
||||
* @returns {Boolean} False if it fails
|
||||
*/
|
||||
openLoginPage: function(additionnalData, targetElement){
|
||||
alert("login page to open !");
|
||||
}
|
||||
};
|
@ -13,6 +13,14 @@ ComunicWeb.pagesList = {
|
||||
methodHandler: "ComunicWeb.pages.home.home.openHomePage",
|
||||
},
|
||||
|
||||
/**
|
||||
* Login page
|
||||
*/
|
||||
login: {
|
||||
pageTitle: "Login page",
|
||||
methodHandler: "ComunicWeb.pages.login.openLoginPage",
|
||||
},
|
||||
|
||||
/**
|
||||
* 404 Page not found
|
||||
*/
|
||||
|
@ -49,6 +49,7 @@ $config['JSfiles'] = array(
|
||||
|
||||
//Pages scripts
|
||||
"%PATH_ASSETS%js/pages/home/home.js",
|
||||
"%PATH_ASSETS%js/pages/login.js",
|
||||
|
||||
//Init script
|
||||
"%PATH_ASSETS%js/init.js",
|
||||
|
Loading…
Reference in New Issue
Block a user