diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-20 17:20:09 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-20 18:07:06 +0200 |
commit | c5c403b57467fb3df83f4f7ffe4df9705d86c3ea (patch) | |
tree | a51b6b1a003d4f504852aaf8a5c7b522ed740ce5 | |
parent | d853899ab61866c3a1d42e2d3bf27bf5cee11e1f (diff) | |
download | nextcloud-server-c5c403b57467fb3df83f4f7ffe4df9705d86c3ea.tar.gz nextcloud-server-c5c403b57467fb3df83f4f7ffe4df9705d86c3ea.zip |
Add a handle for the tags label
-rw-r--r-- | apps/systemtags/css/systemtagsfilelist.css | 9 | ||||
-rw-r--r-- | apps/systemtags/js/systemtagsinfoview.js | 17 | ||||
-rw-r--r-- | core/css/icons.css | 4 | ||||
-rw-r--r-- | core/img/actions/tag.svg | 5 |
4 files changed, 35 insertions, 0 deletions
diff --git a/apps/systemtags/css/systemtagsfilelist.css b/apps/systemtags/css/systemtagsfilelist.css index e8fb665e26b..32cce759ec2 100644 --- a/apps/systemtags/css/systemtagsfilelist.css +++ b/apps/systemtags/css/systemtagsfilelist.css @@ -27,3 +27,12 @@ .nav-icon-systemtagsfilter { background-image: url('../img/tag.svg'); } + +#app-sidebar .mainFileInfoView .tag-label { + cursor: pointer; +} + +#app-sidebar .mainFileInfoView .icon-tag { + opacity: .5; + vertical-align: middle; +} diff --git a/apps/systemtags/js/systemtagsinfoview.js b/apps/systemtags/js/systemtagsinfoview.js index ad09f3a68c8..ce41bc504e2 100644 --- a/apps/systemtags/js/systemtagsinfoview.js +++ b/apps/systemtags/js/systemtagsinfoview.js @@ -37,6 +37,8 @@ */ _inputView: null, + _toggleHandle: null, + initialize: function(options) { var self = this; options = options || {}; @@ -58,6 +60,9 @@ this._inputView.on('select', this._onSelectTag, this); this._inputView.on('deselect', this._onDeselectTag, this); + + this._toggleHandle = $('<span>').addClass('tag-label').text(t('systemtags', 'Tags')); + this._toggleHandle.prepend($('<span>').addClass('icon icon-tag')); }, /** @@ -130,6 +135,7 @@ } }); } + this.$el.addClass('hidden'); }, @@ -137,12 +143,23 @@ * Renders this details view */ render: function() { + var self = this; + this.$el.append(this._inputView.$el); this._inputView.render(); + + $('#app-sidebar').find('.mainFileInfoView .file-details').append(this._toggleHandle); + this._toggleHandle.off('click'); + this._toggleHandle.on('click', function () { + console.log('toggle'); + console.log(self.$el); + self.$el.toggleClass('hidden'); + }); }, remove: function() { this._inputView.remove(); + this._toggleHandle.remove(); } }); diff --git a/core/css/icons.css b/core/css/icons.css index d1ef86a94d0..6cfe67c3a4d 100644 --- a/core/css/icons.css +++ b/core/css/icons.css @@ -284,6 +284,10 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- background-image: url('../img/actions/starred.svg?v=1'); } +.icon-tag { + background-image: url('../img/actions/tag.svg?v=1'); +} + .icon-toggle { background-image: url('../img/actions/toggle.svg?v=1'); } diff --git a/core/img/actions/tag.svg b/core/img/actions/tag.svg new file mode 100644 index 00000000000..293a7f5be9c --- /dev/null +++ b/core/img/actions/tag.svg @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0"> + <rect style="color:#000000" fill-opacity="0" height="97.986" width="163.31" y="-32.993" x="-62.897"/> + <path d="m6.1861 0.96121-4.807 0.01316c-0.27161 0-0.34656 0.20987-0.34703 0.34604l-0.015132 4.8017 8.7232 8.7222c0.19688 0.19829 0.51234 0.19697 0.7092 0l4.4569-4.4569c0.19672-0.19688 0.19895-0.51327 0.002-0.71024l-0.0011 0.00876-8.3668-8.3668-0.3541-0.35417zm-2.1669 1.8522a1.1438 1.1438 0 0 1 1.144 1.144 1.1438 1.1438 0 0 1 -1.144 1.144 1.1438 1.1438 0 0 1 -1.144 -1.144 1.1438 1.1438 0 0 1 1.144 -1.144z"/> +</svg> |