This commit is contained in:
Julian Lam
2014-11-18 14:54:54 -05:00
parent 4f38a33702
commit deac12c540
20 changed files with 93 additions and 64 deletions

View File

@@ -149,6 +149,10 @@ var socket,
app.cacheBuster = config['cache-buster'];
require(['csrf'], function(csrf) {
csrf.set(data.csrf_token);
});
bootbox.setDefaults({
locale: config.userLang
});
@@ -164,8 +168,16 @@ var socket,
};
app.logout = function() {
$.post(RELATIVE_PATH + '/logout', function() {
window.location.href = RELATIVE_PATH + '/';
require(['csrf'], function(csrf) {
$.ajax(RELATIVE_PATH + '/logout', {
type: 'POST',
headers: {
'x-csrf-token': csrf.get()
},
success: function() {
window.location.href = RELATIVE_PATH + '/';
}
});
});
};