33 lines
861 B
JavaScript
Raw Normal View History

2017-03-01 15:37:55 +01: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
*/
2021-02-13 15:28:48 +01:00
openLogoutPage: async function(additionnalData, targetElement){
2017-03-01 15:37:55 +01:00
//Enable screen overlay
var screenOverlay = ComunicWeb.common.page.showTransparentWaitSplashScreen();
//Perform logout
2021-02-13 15:28:48 +01:00
await UserLogin.logoutUser();
2017-03-01 15:37:55 +01:00
//Reset notifications number
ComunicWeb.common.pageTitle.setNotificationsNumber(0);
2017-06-14 11:46:10 +02:00
//Clean all caches
ComunicWeb.common.system.reset(true, "home");
//Remove overlay
screenOverlay.remove();
2017-03-01 15:37:55 +01:00
},
};