Mini tag chooser tweaks

This commit is contained in:
Joffrey JAFFEUX
2018-02-13 19:41:03 +01:00
committed by GitHub
parent d525a644d2
commit ed114177e7
2 changed files with 13 additions and 2 deletions

View File

@ -14,6 +14,17 @@ export default ComboBox.extend({
filterable: true,
noTags: Ember.computed.empty("computedTags"),
allowAny: true,
caretUpIcon: Ember.computed.alias("caretIcon"),
caretDownIcon: Ember.computed.alias("caretIcon"),
@computed("computedTags", "siteSettings.max_tags_per_topic")
caretIcon(computedTags, maxTagsPerTopic) {
if (computedTags.length >= maxTagsPerTopic) {
return null;
}
return "plus";
},
init() {
this._super();
@ -136,7 +147,7 @@ export default ComboBox.extend({
if (isEmpty(this.get("computedTags"))) {
content.label = I18n.t("tagging.choose_for_topic");
} else {
content.label = this.get("computedTags").join(",");
content.label = this.get("computedTags").join(", ");
}
return content;

View File

@ -1183,7 +1183,7 @@ en:
default_header_text: Select...
no_content: No matches found
filter_placeholder: Search...
create: "Create {{content}}"
create: "Create: '{{content}}'"
emoji_picker:
filter_placeholder: Search for emoji