From c152f80b93ff6d1443ca375197112cb496e77bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Sat, 4 Nov 2017 13:12:18 +0100 Subject: [PATCH 1/5] Fix popover layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/css/apps.scss | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/core/css/apps.scss b/core/css/apps.scss index 06a105971bb..c68bc488d2c 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -837,8 +837,25 @@ kbd { font-weight: 300; box-shadow: none; width: 100%; + color: $color-main-text; /* Override the app-navigation li opacity */ opacity: .7 !important; + [class^='icon-'], + [class*=' icon-'] { + /* Keep padding to define the width to + assure correct position of a possible text */ + padding: 18px 0 18px 36px; + min-width: 0; /* Overwrite icons*/ + min-height: 0; + background-position: 10px center; + } + &[class^='icon-'], + &[class*=' icon-'] { + padding: 0 10px 0 36px !important; + min-width: 0; /* Overwrite icons*/ + min-height: 0; + background-position: 10px center; + } &:hover, &:focus, &.active { opacity: 1 !important; } @@ -857,7 +874,6 @@ kbd { } /* Add padding if contains icon+text */ &:not(:empty) { - padding: 0 !important; padding-right: 10px !important; } > img { @@ -871,14 +887,12 @@ kbd { } } } - [class^='icon-'], - [class*=' icon-']{ - /* Keep padding to define the width to - assure correct position of a possible text */ - padding: 18px 0 18px 36px; - min-width: 0; /* Overwrite icons*/ - min-height: 0; - background-position: 10px center; + > button { + padding: 0; + span { + opacity: 1; + } } + } } From 22458465dac228bc9bdcf3d36fb8b138651ef616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Sat, 4 Nov 2017 15:36:45 +0100 Subject: [PATCH 2/5] Fix popover icon size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/css/apps.scss | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/css/apps.scss b/core/css/apps.scss index c68bc488d2c..9ab609b06e1 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -841,20 +841,23 @@ kbd { /* Override the app-navigation li opacity */ opacity: .7 !important; [class^='icon-'], + [class*=' icon-'], + &[class^='icon-'], + &[class*=' icon-'] { + min-width: 0; /* Overwrite icons*/ + min-height: 0; + background-position: 10px center; + background-size: 16px; + } + [class^='icon-'], [class*=' icon-'] { /* Keep padding to define the width to assure correct position of a possible text */ padding: 18px 0 18px 36px; - min-width: 0; /* Overwrite icons*/ - min-height: 0; - background-position: 10px center; } &[class^='icon-'], &[class*=' icon-'] { padding: 0 10px 0 36px !important; - min-width: 0; /* Overwrite icons*/ - min-height: 0; - background-position: 10px center; } &:hover, &:focus, &.active { opacity: 1 !important; From baee457b8fece0adb00176284deae9cf76333edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Sat, 4 Nov 2017 15:47:54 +0100 Subject: [PATCH 3/5] Radio support too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/css/apps.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/css/apps.scss b/core/css/apps.scss index 9ab609b06e1..5493375b5ae 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -889,6 +889,12 @@ kbd { margin: -2px 12px 0; } } + > input.radio + label { + padding: 0 !important; + &::before { + margin: -2px 11px 0; + } + } } > button { padding: 0; From bce00d8b3d89494b7137b75dff8a4705eecdf52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Tue, 7 Nov 2017 16:32:20 +0100 Subject: [PATCH 4/5] Reduce spread of css selector for a.action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/css/files.scss | 85 ++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index a3beac152ce..d1405517f13 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -547,46 +547,49 @@ a.action > img { margin-bottom: -1px; } -#fileList a.action { - display: inline; - padding: 17px 8px; - line-height: 50px; - opacity: 0; -} -#fileList a.action.action-share { - padding: 17px 14px; -} -#fileList a.action.action-share .avatar { - display: inline-block; - vertical-align: middle; -} - -#fileList a.action.action-menu { - padding-top: 17px; - padding-bottom: 17px; - padding-left: 14px; - padding-right: 14px; -} - -#fileList a.action, -#fileList a.action.no-permission:hover, -#fileList a.action.no-permission:focus, -/* also enforce the low opacity for disabled links that are hovered/focused */ -#fileList a.action.disabled:hover, -#fileList a.action.disabled:focus, -#fileList a.action.disabled img { - opacity: .3; -} - -#fileList a.action.disabled.action-download, -#fileList a.action.disabled.action-download:hover, -#fileList a.action.disabled.action-download:focus, -#fileList a.action:hover, -#fileList a.action:focus, -#fileList .fileActionsMenu a.action, -/* show share action of shared items darker to distinguish from non-shared */ -#fileList a.action.action-share.shared-style { - opacity: .7; +#fileList td a { + a.action { + display: inline; + padding: 17px 8px; + line-height: 50px; + opacity: .3; + &.action-share { + padding: 17px 14px; + .avatar { + display: inline-block; + vertical-align: middle; + } + } + &.action-menu { + padding-top: 17px; + padding-bottom: 17px; + padding-left: 14px; + padding-right: 14px; + } + &.no-permission { + &:hover, &:focus { + opacity: .3; + } + } + &.disabled { + &:hover, &:focus, + img { + opacity: .3; + } + &.action-download { + opacity: .7; + &:hover, &:focus { + opacity: .7; + } + } + } + &:hover, &:focus { + opacity: .7; + } + } + .fileActionsMenu a.action, a.action.action-share.shared-style { + opacity: .7; + } } // Ellipsize long sharer names @@ -739,7 +742,7 @@ table.dragshadow td.size { .canDrop, #filestable tbody tr.canDrop { - background-color: rgba(255, 255, 140, 1); + background-color: rgba(255, 255, 140, 1); } From b44581e15d198e91c9bf947cd05afdbd559a7b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Tue, 7 Nov 2017 18:04:07 +0100 Subject: [PATCH 5/5] Fixed sharing popover and removed unused old code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files_sharing/css/sharetabview.scss | 13 ++---------- core/css/share.scss | 20 +------------------ .../tests/specs/sharedialogshareelistview.js | 14 ------------- 3 files changed, 3 insertions(+), 44 deletions(-) diff --git a/apps/files_sharing/css/sharetabview.scss b/apps/files_sharing/css/sharetabview.scss index 880226e7d14..4d07e547e86 100644 --- a/apps/files_sharing/css/sharetabview.scss +++ b/apps/files_sharing/css/sharetabview.scss @@ -79,24 +79,16 @@ align-items: center; } -#shareWithList .unshare img, #shareWithList .showCruds img { +#shareWithList .unshare img { vertical-align: text-bottom; /* properly align icons */ } -#shareWithList .sharingOptionsGroup .icon-more { +#shareWithList .sharingOptionsGroup > a .icon { padding: 7px; vertical-align: middle; opacity: .5; } -#shareWithList .unshare { - padding: 1px 6px; - vertical-align: text-bottom; -} -#shareWithList .unshare .icon { - vertical-align: text-top; -} - #shareWithList .sharingOptionsGroup .popovermenu:after { right: 3px; } @@ -122,7 +114,6 @@ .shareTabView .icon-loading-small { display: inline-block; z-index: 1; - margin-right: 4px; vertical-align: text-top; } diff --git a/core/css/share.scss b/core/css/share.scss index 2a9f357bc38..37217fa926a 100644 --- a/core/css/share.scss +++ b/core/css/share.scss @@ -104,7 +104,6 @@ .popovermenu { right: -11px; top: 35px; - padding: 3px 6px; } } @@ -112,8 +111,7 @@ white-space: nowrap; display: inline-block; } - .unshare img, - .showCruds img { + .unshare img { vertical-align: text-bottom; /* properly align icons */ } @@ -132,22 +130,6 @@ } } -a { - &.showCruds { - display: inline; - opacity: .5; - } - &.unshare { - display: inline-block; - opacity: .5; - padding: 10px; - } - &.showCruds:hover, - &.unshare:hover { - opacity: 1; - } -} - #link { border-top: 1px solid nc-darken($color-main-background, 14%); padding-top: 8px; diff --git a/core/js/tests/specs/sharedialogshareelistview.js b/core/js/tests/specs/sharedialogshareelistview.js index bcc596a1386..1d8552f0527 100644 --- a/core/js/tests/specs/sharedialogshareelistview.js +++ b/core/js/tests/specs/sharedialogshareelistview.js @@ -123,20 +123,6 @@ describe('OC.Share.ShareDialogShareeListView', function () { expect(listView.$el.find("input[name='edit']").is(':checked')).toEqual(true); expect(updateShareStub.calledOnce).toEqual(true); }); - - it('shows cruds checkboxes when toggled', function () { - shareModel.set('shares', [{ - id: 100, - item_source: 123, - permissions: 1, - share_type: OC.Share.SHARE_TYPE_USER, - share_with: 'user1', - share_with_displayname: 'User One' - }]); - listView.render(); - listView.$el.find('a.showCruds').click(); - expect(listView.$el.find('li.cruds').hasClass('hidden')).toEqual(false); - }); }); });