mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix category tag on problem_edit (#655)
This commit is contained in:
1 parent
ba3c4776fa
commit
eda201dd65
1 file changed
+3
-3
@@ -84,7 +84,7 @@ function buildCategoryFilter() {
|
|||||||
const $categoryTag = $category
|
const $categoryTag = $category
|
||||||
.find('.section__title a')
|
.find('.section__title a')
|
||||||
.remove()
|
.remove()
|
||||||
.attr('class', 'widget--category-filter__category-tag');
|
.attr('class', 'widget--category-filter__tag');
|
||||||
const categoryText = $categoryTag.text();
|
const categoryText = $categoryTag.text();
|
||||||
const $drop = $category
|
const $drop = $category
|
||||||
.children('.chip-list')
|
.children('.chip-list')
|
||||||
@@ -102,7 +102,7 @@ function buildCategoryFilter() {
|
|||||||
.children('li')
|
.children('li')
|
||||||
.attr('class', 'widget--category-filter__subcategory')
|
.attr('class', 'widget--category-filter__subcategory')
|
||||||
.find('a')
|
.find('a')
|
||||||
.attr('class', 'widget--category-filter__subcategory-tag')
|
.attr('class', 'widget--category-filter__tag')
|
||||||
.attr('data-category', categoryText);
|
.attr('data-category', categoryText);
|
||||||
$subCategoryTags.get().forEach((subCategoryTag) => {
|
$subCategoryTags.get().forEach((subCategoryTag) => {
|
||||||
const $tag = $(subCategoryTag);
|
const $tag = $(subCategoryTag);
|
||||||
@@ -114,7 +114,7 @@ function buildCategoryFilter() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).on('click', '.widget--category-filter__category-tag', (ev) => {
|
$(document).on('click', '.widget--category-filter__tag', (ev) => {
|
||||||
if (ev.shiftKey || ev.metaKey || ev.ctrlKey) return;
|
if (ev.shiftKey || ev.metaKey || ev.ctrlKey) return;
|
||||||
const category = $(ev.currentTarget).text();
|
const category = $(ev.currentTarget).text();
|
||||||
const treeItem = categories[category];
|
const treeItem = categories[category];
|
||||||
|
|||||||
Reference in new issue
Block a user