Merge pull request #7012 from nextcloud/show-favourite-action-as-the-first-one

Show favourite action as the first one in the file actions menu
This commit is contained in:
Jan-Christoph Borchardt 2017-10-30 19:01:22 +01:00 committed by GitHub
commit fcb9c034fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -103,17 +103,17 @@
return t('files', 'Add to favorites');
},
mime: 'all',
order: -23,
order: -100,
permissions: OC.PERMISSION_READ,
iconClass: function(fileName, context) {
var $file = context.$file;
var isFavorite = $file.data('favorite') === true;
if (isFavorite) {
return 'icon-starred';
return 'icon-star-dark';
}
return 'icon-star';
return 'icon-starred';
},
actionHandler: function(fileName, context) {
var $favoriteMarkEl = context.$file.find('.favorite-mark');

View file

@ -348,6 +348,10 @@ img, object, video, button, textarea, input, select {
background-image: url('../img/actions/star.svg?v=1');
}
.icon-star-dark {
background-image: url('../img/actions/star-dark.svg?v=1');
}
.icon-starred {
&:hover, &:focus {
background-image: url('../img/actions/star.svg?v=1');