FIX: makes sure category and tag drop headers have a title

This commit is contained in:
Joffrey JAFFEUX 2018-06-24 22:23:31 +02:00 committed by GitHub
parent 7059d90dee
commit c722fc5164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -91,6 +91,7 @@ export default ComboBoxComponent.extend({
if (this.get("hasSelection")) {
const category = Category.findById(content.value);
content.title = category.title;
content.label = categoryBadgeHTML(category, {
link: false,
allowUncategorized: true,
@ -101,10 +102,12 @@ export default ComboBoxComponent.extend({
content.label = `<span class="category-name">${this.get(
"noCategoriesLabel"
)}</span>`;
content.title = this.get("noCategoriesLabel");
} else {
content.label = `<span class="category-name">${this.get(
"allCategoriesLabel"
)}</span>`;
content.title = this.get("allCategoriesLabel");
}
}

View File

@ -43,10 +43,12 @@ export default ComboBoxComponent.extend({
if (!content.value) {
if (this.get("noTagsSelected")) {
content.label = this.get("noTagsLabel");
content.title = this.get("noTagsLabel");
} else {
content.label = this.get("allTagsLabel");
content.title = this.get("allTagsLabel");
}
} else {
content.title = content.value;
}
return content;