git-svn-id: https://beef.googlecode.com/svn/trunk@908 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
20 lines
409 B
JavaScript
20 lines
409 B
JavaScript
DoLogout = function() {
|
|
|
|
var button = Ext.get('do-logout-menu');
|
|
|
|
after_logout = function() {
|
|
// will redirect the UA to the login
|
|
window.location.href = '/ui/panel'
|
|
}
|
|
|
|
button.on('click', function(){
|
|
Ext.Ajax.request({
|
|
url: '/ui/authentication/logout',
|
|
method: 'POST',
|
|
params: 'nonce=' + Ext.get("nonce").dom.value,
|
|
success: after_logout,
|
|
failure: after_logout
|
|
});
|
|
|
|
})
|
|
}; |