Browse Source

Hide the tags input field when it's empty

tags/v11.0RC2
Joas Schilling 7 years ago
parent
commit
d853899ab6
No account linked to committer's email address
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      apps/systemtags/js/systemtagsinfoview.js

+ 9
- 2
apps/systemtags/js/systemtagsinfoview.js View File

@@ -118,8 +118,15 @@
this.selectedTagsCollection.fetch({
success: function(collection) {
collection.fetched = true;
self._inputView.setData(collection.map(modelToSelection));
self.$el.removeClass('hidden');

var appliedTags = collection.map(modelToSelection);
self._inputView.setData(appliedTags);

if (appliedTags.length !== 0) {
self.$el.removeClass('hidden');
} else {
self.$el.addClass('hidden');
}
}
});
}

Loading…
Cancel
Save