mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Prepare login page
This commit is contained in:
		@@ -246,6 +246,11 @@ var ComunicWeb = {
 | 
				
			|||||||
             * Try to login user
 | 
					             * Try to login user
 | 
				
			||||||
             */
 | 
					             */
 | 
				
			||||||
            loginUser: function(usermail, userpassword, permanentLogin, afterLogin){},
 | 
					            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;
 | 
					        document.title =  pageInfos.pageTitle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Get the main contener of the page
 | 
					        //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 we didn't get anything, clean the page and create a wrapper element
 | 
				
			||||||
        if(!mainContenerElem){
 | 
					        if(!mainContenerElem){
 | 
				
			||||||
            mainContenerElem = this.emptyPage(true);
 | 
					           var mainContenerElem = this.emptyPage(true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //Check if some additionnal data was specified
 | 
					        //Check if some additionnal data was specified
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,12 @@
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * Common homes functions
 | 
					 * Common homes functions
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * @author Pierre HUBERT
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
ComunicWeb.pages.home.home = {
 | 
					ComunicWeb.pages.home.home = {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Open home page
 | 
					     * Open home page
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
     * @param {Object} additionnalData Additionnal data passed in the method
 | 
					     * @param {Object} additionnalData Additionnal data passed in the method
 | 
				
			||||||
     * @param {element} targetElement Where the template will be applied
 | 
					     * @param {element} targetElement Where the template will be applied
 | 
				
			||||||
     * @returns {Boolean} False if it fails
 | 
					     * @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",
 | 
					        methodHandler: "ComunicWeb.pages.home.home.openHomePage",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Login page
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    login: {
 | 
				
			||||||
 | 
					        pageTitle: "Login page",
 | 
				
			||||||
 | 
					        methodHandler: "ComunicWeb.pages.login.openLoginPage",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 404 Page not found
 | 
					     * 404 Page not found
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,6 +49,7 @@ $config['JSfiles'] = array(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    //Pages scripts
 | 
					    //Pages scripts
 | 
				
			||||||
    "%PATH_ASSETS%js/pages/home/home.js",
 | 
					    "%PATH_ASSETS%js/pages/home/home.js",
 | 
				
			||||||
 | 
					    "%PATH_ASSETS%js/pages/login.js",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //Init script
 | 
					    //Init script
 | 
				
			||||||
    "%PATH_ASSETS%js/init.js",
 | 
					    "%PATH_ASSETS%js/init.js",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user