summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-20 17:19:11 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-20 17:19:11 +0200
commitd853899ab61866c3a1d42e2d3bf27bf5cee11e1f (patch)
tree8c1ce51fddfd73653ce33bceb7d5e5f4fe0b5dff
parentf4a4578f0de9cd0e41786b1af20ca642af390101 (diff)
downloadnextcloud-server-d853899ab61866c3a1d42e2d3bf27bf5cee11e1f.tar.gz
nextcloud-server-d853899ab61866c3a1d42e2d3bf27bf5cee11e1f.zip
Hide the tags input field when it's empty
-rw-r--r--apps/systemtags/js/systemtagsinfoview.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/systemtags/js/systemtagsinfoview.js b/apps/systemtags/js/systemtagsinfoview.js
index a7320a3956f..ad09f3a68c8 100644
--- a/apps/systemtags/js/systemtagsinfoview.js
+++ b/apps/systemtags/js/systemtagsinfoview.js
@@ -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');
+ }
}
});
}