FIX: uses only global allow_uncategorized_topics for category drop (#9130)
This commit is contained in:
parent
763a065df9
commit
29c9d8a133
|
@ -28,7 +28,6 @@ export default ComboBoxComponent.extend({
|
||||||
subCategory: false,
|
subCategory: false,
|
||||||
clearable: false,
|
clearable: false,
|
||||||
hideParentCategory: "hideParentCategory",
|
hideParentCategory: "hideParentCategory",
|
||||||
allowUncategorized: true,
|
|
||||||
countSubcategories: false,
|
countSubcategories: false,
|
||||||
autoInsertNoneItem: false,
|
autoInsertNoneItem: false,
|
||||||
displayCategoryDescription: "displayCategoryDescription",
|
displayCategoryDescription: "displayCategoryDescription",
|
||||||
|
@ -96,7 +95,7 @@ export default ComboBoxComponent.extend({
|
||||||
content.title = category.title;
|
content.title = category.title;
|
||||||
content.label = categoryBadgeHTML(category, {
|
content.label = categoryBadgeHTML(category, {
|
||||||
link: false,
|
link: false,
|
||||||
allowUncategorized: this.selectKit.options.allowUncategorized,
|
allowUncategorized: true,
|
||||||
hideParent: true
|
hideParent: true
|
||||||
}).htmlSafe();
|
}).htmlSafe();
|
||||||
}
|
}
|
||||||
|
@ -174,10 +173,7 @@ export default ComboBoxComponent.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_filterUncategorized(content) {
|
_filterUncategorized(content) {
|
||||||
if (
|
if (!this.siteSettings.allow_uncategorized_topics) {
|
||||||
!this.siteSettings.allow_uncategorized_topics ||
|
|
||||||
!this.selectKit.options.allowUncategorized
|
|
||||||
) {
|
|
||||||
content = content.filter(
|
content = content.filter(
|
||||||
c => c.id !== this.site.uncategorized_category_id
|
c => c.id !== this.site.uncategorized_category_id
|
||||||
);
|
);
|
||||||
|
|
|
@ -187,10 +187,11 @@ componentTest("hideParentCategory (true)", {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
componentTest("allowUncategorized (default: true)", {
|
componentTest("allow_uncategorized_topics (true)", {
|
||||||
template: template(),
|
template: template(),
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
|
this.siteSettings.allow_uncategorized_topics = true;
|
||||||
initCategories(this);
|
initCategories(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -203,10 +204,11 @@ componentTest("allowUncategorized (default: true)", {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
componentTest("allowUncategorized (false)", {
|
componentTest("allow_uncategorized_topics (false)", {
|
||||||
template: template(["allowUncategorized=false"]),
|
template: template(),
|
||||||
|
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
|
this.siteSettings.allow_uncategorized_topics = false;
|
||||||
initCategories(this);
|
initCategories(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue