Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a handle for the tags label
  • Loading branch information
nickvergessen committed Sep 21, 2016
commit 781feb9ff7e7a54cd187968da1a246f76453cff6
9 changes: 9 additions & 0 deletions apps/systemtags/css/systemtagsfilelist.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
17 changes: 17 additions & 0 deletions apps/systemtags/js/systemtagsinfoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
*/
_inputView: null,

_toggleHandle: null,

initialize: function(options) {
var self = this;
options = options || {};
Expand All @@ -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'));
},

/**
Expand Down Expand Up @@ -130,19 +135,31 @@
}
});
}

this.$el.addClass('hidden');
},

/**
* 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();
}
});

Expand Down
4 changes: 4 additions & 0 deletions core/css/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
5 changes: 5 additions & 0 deletions core/img/actions/tag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.