From 9df618131b5552577c0c79fa71ec0ead1c4493cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Mon, 30 Oct 2017 17:09:15 +0100 Subject: [PATCH 1/2] Show favourite action as the first one in the file actions menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- apps/files/js/tagsplugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js index 2286477750..7e2aecef6f 100644 --- a/apps/files/js/tagsplugin.js +++ b/apps/files/js/tagsplugin.js @@ -103,7 +103,7 @@ return t('files', 'Add to favorites'); }, mime: 'all', - order: -23, + order: -100, permissions: OC.PERMISSION_READ, iconClass: function(fileName, context) { var $file = context.$file; From 446a3d2f215f52529955ebe4edd036806f00bfb2 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Mon, 30 Oct 2017 18:17:59 +0100 Subject: [PATCH 2/2] Reverse favorite icon coloring in files action menu Signed-off-by: Jan-Christoph Borchardt --- apps/files/js/tagsplugin.js | 4 ++-- core/css/icons.scss | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js index 7e2aecef6f..747a7245a5 100644 --- a/apps/files/js/tagsplugin.js +++ b/apps/files/js/tagsplugin.js @@ -110,10 +110,10 @@ 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'); diff --git a/core/css/icons.scss b/core/css/icons.scss index 6d855381fa..c8f61c1422 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -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');