diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-20 17:19:11 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-20 17:19:11 +0200 |
commit | d853899ab61866c3a1d42e2d3bf27bf5cee11e1f (patch) | |
tree | 8c1ce51fddfd73653ce33bceb7d5e5f4fe0b5dff | |
parent | f4a4578f0de9cd0e41786b1af20ca642af390101 (diff) | |
download | nextcloud-server-d853899ab61866c3a1d42e2d3bf27bf5cee11e1f.tar.gz nextcloud-server-d853899ab61866c3a1d42e2d3bf27bf5cee11e1f.zip |
Hide the tags input field when it's empty
-rw-r--r-- | apps/systemtags/js/systemtagsinfoview.js | 11 |
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'); + } } }); } |