From 697fee56d44fb89094c560e897cccf7b59fd0ff4 Mon Sep 17 00:00:00 2001 From: rain_if <2504681625@qq.com> Date: Thu, 4 Jul 2024 09:55:53 +0800 Subject: [PATCH] Fix bug 565 --- annotation.py | 0 app/static/js/word_operation.js | 8 +++++++- app/templates/userpage_get.html | 2 +- defects_data.csv | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) delete mode 100644 annotation.py create mode 100644 defects_data.csv diff --git a/annotation.py b/annotation.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/static/js/word_operation.js b/app/static/js/word_operation.js index dcf38ff..b4d466c 100644 --- a/app/static/js/word_operation.js +++ b/app/static/js/word_operation.js @@ -56,7 +56,8 @@ function delete_word(theWord) { removeWord(theWord); } else { $("#p_" + theWord).remove(); - } + } + } }); } @@ -116,6 +117,7 @@ function removeWord(word) { if (element_to_remove !== null) { element_to_remove.remove(); } + page_reload(); } function renderWord(word) { @@ -171,4 +173,8 @@ function compareWord(first, second) { return first.word < second.word ? -1 : 1; } return 0; +} +//通过在单词本删除单词后加入刷新页面功能,可以使文本高亮实时取消 +function page_reload(){ + location.reload(); } \ No newline at end of file diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index e5c8d95..8f66ce1 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -124,7 +124,7 @@

- +
{% if session.get['thisWord'] %}