Call client-side logout hooks when the logout button is triggered

This commit is contained in:
Hadi Nategh 2019-10-16 12:46:44 +02:00
parent 474796c9bb
commit 10632f886d

View File

@ -403,6 +403,23 @@
*/ */
et2_loadingFinished: function() { et2_loadingFinished: function() {
this.checkTabOverflow(); this.checkTabOverflow();
var $logout = jQuery('#topmenu_logout');
if (!$logout.hasClass('onLogout'))
{
$logout.on('click', function(e){
e.preventDefault();
var apps = Object.keys(framework.applications);
for(var i in apps)
{
if (app[apps[i]] && typeof app[apps[i]].onLogout === "function")
{
app[apps[i]].onLogout.call(e);
}
}
window.framework.redirect(this.href);
});
$logout.addClass('onLogout');
}
}, },
/** /**