2017-03-01 14:37:55 +00:00
|
|
|
/**
|
|
|
|
* Logout page main controller
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
|
|
|
ComunicWeb.pages.logout = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Open logout page and perform logout
|
|
|
|
*
|
|
|
|
* @param {Object} additionnalData Additionnal data passed in the method
|
|
|
|
* @param {element} targetElement Where the template will be applied
|
|
|
|
* @returns {Boolean} False if it fails
|
|
|
|
*/
|
|
|
|
openLogoutPage: function(additionnalData, targetElement){
|
|
|
|
//Enable screen overlay
|
|
|
|
var screenOverlay = ComunicWeb.common.page.showTransparentWaitSplashScreen();
|
|
|
|
|
|
|
|
//Perform logout
|
|
|
|
ComunicWeb.user.userLogin.logoutUser();
|
|
|
|
|
|
|
|
//Show a success notification
|
2017-05-26 07:05:14 +00:00
|
|
|
ComunicWeb.common.notificationSystem.showNotification("Good bye, you successfully terminated your session !", "success", 3);
|
2017-03-01 14:37:55 +00:00
|
|
|
|
|
|
|
//Open login page
|
2017-05-24 16:48:52 +00:00
|
|
|
ComunicWeb.common.page.openPage("home");
|
|
|
|
|
|
|
|
//Remove overlay
|
|
|
|
screenOverlay.remove();
|
2017-03-01 14:37:55 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
};
|