Skip to content

Commit

Permalink
show popup before reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Aug 30, 2024
1 parent bcf8883 commit 0f9af1c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.50.1 2024-08-30 12:27:22 +0200 Tobias Oetiker <[email protected]>

- show a popup before reloading the page

0.50.0 2024-08-29 17:12:41 +0200 Tobias Oetiker <[email protected]>

- reload the browser window when an exception with status 7 is returned
Expand Down
2 changes: 1 addition & 1 deletion lib/CallBackery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use CallBackery::Database;
use CallBackery::User;
use Scalar::Util qw(weaken);

our $VERSION = '0.50.0';
our $VERSION = '0.50.1';

=head2 config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,22 @@ qx.Class.define("callbackery.data.Server", {
origThis.setSessionCookie(ret.sessionCookie);
origArguments.callee.base.apply(origThis, origArguments);
});

login.open();
return;
case 7:
const msg = callbackery.ui.MsgBox.getInstance();
msg.addListenerOnce('ok', (e) => { window.location.reload(true); });
msg.info(
this.tr('Session Expired'),
this.xtr(exc.message),
false
if (window.console){
window.console.log("Session Expired. Reloading page");
}
callbackery.ui.Busy.getInstance().vanish();
let mb = callbackery.ui.MsgBox.getInstance()
mb.addListenerOnce('choice',(e) => {
if (e.getData() == 'ok'){
window.location.reload(true);
}
});
mb.info(
mb.tr('Session Expired'),
mb.xtr(exc.message)
);
return;
}
Expand Down

0 comments on commit 0f9af1c

Please sign in to comment.