Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix popover layout #7064

Merged
merged 5 commits into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
85 changes: 44 additions & 41 deletions apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}


Expand Down
13 changes: 2 additions & 11 deletions apps/files_sharing/css/sharetabview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -122,7 +114,6 @@
.shareTabView .icon-loading-small {
display: inline-block;
z-index: 1;
margin-right: 4px;
vertical-align: text-top;
}

Expand Down
41 changes: 32 additions & 9 deletions core/css/apps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,28 @@ 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-'],
&[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;
}
&[class^='icon-'],
&[class*=' icon-'] {
padding: 0 10px 0 36px !important;
}
&:hover, &:focus, &.active {
opacity: 1 !important;
}
Expand All @@ -857,7 +877,6 @@ kbd {
}
/* Add padding if contains icon+text */
&:not(:empty) {
padding: 0 !important;
padding-right: 10px !important;
}
> img {
Expand All @@ -870,15 +889,19 @@ kbd {
margin: -2px 12px 0;
}
}
> input.radio + label {
padding: 0 !important;
&::before {
margin: -2px 11px 0;
}
}
}
[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;
}
}

}
}
20 changes: 1 addition & 19 deletions core/css/share.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,14 @@
.popovermenu {
right: -11px;
top: 35px;
padding: 3px 6px;
}
}

.shareOption {
white-space: nowrap;
display: inline-block;
}
.unshare img,
.showCruds img {
.unshare img {
vertical-align: text-bottom;
/* properly align icons */
}
Expand All @@ -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;
Expand Down
14 changes: 0 additions & 14 deletions core/js/tests/specs/sharedialogshareelistview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

});