From 9a156ebf7ef13f17413084d92d67d34f5104d99e Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Sat, 8 Jul 2023 18:23:45 +0800 Subject: [PATCH] Fix Bug 539 --- app/static/config.yml | 1 + app/static/js/checkboxes.js | 5 +++++ app/templates/userpage_post.html | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/static/js/checkboxes.js diff --git a/app/static/config.yml b/app/static/config.yml index 285f31f..173bc6b 100644 --- a/app/static/config.yml +++ b/app/static/config.yml @@ -9,6 +9,7 @@ js: - ../static/js/jquery.js - ../static/js/read.js - ../static/js/word_operation.js + - ../static/js/checkboxes.js bottom: # 在页面加载完之后加载 - ../static/js/fillword.js - ../static/js/highlight.js diff --git a/app/static/js/checkboxes.js b/app/static/js/checkboxes.js new file mode 100644 index 0000000..297df55 --- /dev/null +++ b/app/static/js/checkboxes.js @@ -0,0 +1,5 @@ +function toggleCheckboxSelection(checkStatus) { + // used in userpage_post.html + const checkBoxes = document.getElementsByName('marked'); + checkBoxes.forEach((checkbox) => { checkbox.checked = checkStatus;} ); +} diff --git a/app/templates/userpage_post.html b/app/templates/userpage_post.html index 1163787..67bdb12 100644 --- a/app/templates/userpage_post.html +++ b/app/templates/userpage_post.html @@ -20,7 +20,10 @@
取消勾选认识的单词
++ + +