ComunicWeb/assets/js/pages/logout.js

30 lines
764 B
JavaScript
Raw Normal View History

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();
2017-06-14 09:46:10 +00:00
//Clean all caches
ComunicWeb.common.system.reset(true, "home");
//Remove overlay
screenOverlay.remove();
2017-03-01 14:37:55 +00:00
},
};