mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Implement #513 for submissions
This commit is contained in:
parent
121ad3450a
commit
9f73816c81
@ -58,7 +58,6 @@ function EventReceiver(websocket, poller, channels, last_msg, onmessage) {
|
||||
receiver.last_msg = data.id;
|
||||
};
|
||||
this.websocket.onclose = function (event) {
|
||||
console.log('Websocket closed:', event);
|
||||
if (event.code != 1000 && receiver.onwsclose !== null)
|
||||
receiver.onwsclose(event);
|
||||
}
|
||||
|
@ -156,6 +156,9 @@ block js_media
|
||||
);
|
||||
receiver.onwsclose = function () {
|
||||
console.log('You probably should refresh?');
|
||||
$('.ws-closed').show().find('a').click(function () {
|
||||
window.location.reload();
|
||||
});
|
||||
};
|
||||
return receiver;
|
||||
}
|
||||
@ -169,6 +172,21 @@ block title_row
|
||||
include submission/submission-list-tabs
|
||||
|
||||
block media
|
||||
style.
|
||||
.ws-closed {
|
||||
position: sticky;
|
||||
top: 42px;
|
||||
background: #eee;
|
||||
border-radius: 5px 5px 0 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ws-closed a {
|
||||
display: block;
|
||||
padding: 5px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
if perms.judge.change_submission and perms.judge.rejudge_submission
|
||||
style.
|
||||
td.sub-prop, col.sub-prop { width: 22% }
|
||||
@ -207,6 +225,8 @@ block body
|
||||
div(style='margin-bottom:6px;margin-top:3px')
|
||||
include list-pages
|
||||
|
||||
.ws-closed: a(href='javascript:void(0)')
|
||||
- trans "You were disconnected. Refresh to show latest updates."
|
||||
table#submissions-table.table
|
||||
colgroup
|
||||
col.sub-result
|
||||
|
Loading…
Reference in New Issue
Block a user