mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: add rejudge warning on problem_files page
This commit is contained in:
1 parent
3c5ba8c82f
commit
0986277b4d
2 files changed
+11
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.24.3",
|
||||
"version": "4.24.4",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -235,6 +235,16 @@ const page = new NamedPage('problem_files', () => {
|
||||
await pjax.request({ push: false });
|
||||
}
|
||||
|
||||
$(document).on('click', '[name="problem-sidebar__rejudge"]', (ev) => {
|
||||
ev.preventDefault();
|
||||
new ConfirmDialog({
|
||||
$body: tpl.typoMsg(i18n('Confirm rejudge this problem?')),
|
||||
}).open().then((action) => {
|
||||
if (action !== 'yes') return;
|
||||
$(ev.currentTarget).closest('form').trigger('submit');
|
||||
});
|
||||
});
|
||||
|
||||
if ($('[name="upload_testdata"]').length) {
|
||||
$(document).on('click', '.problem-files-testdata .col--name', (ev) => handleEdit('testdata', ev));
|
||||
$(document).on('click', '.problem-files-additional_file .col--name', (ev) => handleEdit('additional_file', ev));
|
||||
|
||||
Reference in new issue
Block a user