* fix: multi lines and spaces issues * fix: eslint operator-linebreak issue * fix: eslint quotes issue * fix: remaining quotes issues * fix: eslint object curly newline issue * fix: eslint object curly spacing issue * fix: eslint brace-style issues * fix: react jsx indent and props issues * fix: eslint trailing spaces issues * fix: eslint linbreak style issue * fix: eslint space unary operator issue * fix: eslint line around directives issue * fix: void and typeof space unary ops issue
16 lines
587 B
JavaScript
16 lines
587 B
JavaScript
$(document).ajaxError(function(event, jXHR) {
|
|
if (jXHR.status === 403 && jXHR.responseText === 'Unauthenticated') {
|
|
var message = gettext(
|
|
'You have been logged out of your account. '
|
|
+ 'Click Okay to log in again now. '
|
|
+ 'Click Cancel to stay on this page '
|
|
+ '(you must log in again to save your work).'
|
|
);
|
|
|
|
if (window.confirm(message)) {
|
|
var currentLocation = window.location.pathname;
|
|
window.location.href = '/login?next=' + encodeURIComponent(currentLocation);
|
|
}
|
|
}
|
|
});
|