mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 17:38:19 +08:00
ui: problem_main: bind event to document
This commit is contained in:
1 parent
70f5cf7d9f
commit
0f34e6d65a
2 files changed
+5
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.34.17",
|
||||
"version": "4.34.18",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -236,16 +236,16 @@ const page = new NamedPage(['problem_main', 'problem_category'], () => {
|
||||
$('.section.display-mode').removeClass('display-mode');
|
||||
buildCategoryFilter();
|
||||
parseCategorySelection();
|
||||
$('[name="leave-edit-mode"]').on('click', () => {
|
||||
$(document).on('click', '[name="leave-edit-mode"]', () => {
|
||||
doc.className = doc.className.replace(' edit-mode', ' display-mode');
|
||||
});
|
||||
$('[name="enter-edit-mode"]').on('click', () => {
|
||||
$(document).on('click', '[name="enter-edit-mode"]', () => {
|
||||
doc.className = doc.className.replace(' display-mode', ' edit-mode');
|
||||
});
|
||||
['delete', 'hide', 'unhide', 'copy'].forEach((op) => {
|
||||
$(`[name="${op}_selected_problems"]`).on('click', () => handleOperation(op));
|
||||
$(document).on('click', `[name="${op}_selected_problems"]`, () => handleOperation(op));
|
||||
});
|
||||
$('[name="download_selected_problems"]').on('click', handleDownload);
|
||||
$(document).on('click', '[name="download_selected_problems"]', handleDownload);
|
||||
|
||||
$(document).on('click', '.toggle-tag', () => {
|
||||
$('.section__table-container').children(1).toggleClass('hide-problem-tag');
|
||||
|
||||
Reference in new issue
Block a user