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:
commit
fcb9c034fa
2 changed files with 7 additions and 3 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue