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

EZP-29995: Move CSS files for Sub Items List Module to Admin UI #129

Merged
merged 2 commits into from Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/public/js/MultiFileUpload.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/js/MultiFileUpload.module.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/js/SubItems.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/js/SubItems.module.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/js/UniversalDiscovery.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/public/js/UniversalDiscovery.module.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Resources/public/scss/ezplatform-modules.scss
Expand Up @@ -2,3 +2,4 @@
@import 'bundles/ezplatformadminui/scss/functions/calculate.rem';
@import 'bundles/ezplatformadminui/scss/mixins';
@import 'modules/multi.file.upload';
@import 'modules/sub.items.list';
9 changes: 9 additions & 0 deletions Resources/public/scss/modules/_sub.items.list.scss
@@ -0,0 +1,9 @@
@import 'sub-items-list/action.btn';
@import 'sub-items-list/grid.view.item';
@import 'sub-items-list/grid.view';
@import 'sub-items-list/no.items';
@import 'sub-items-list/table.view.item';
@import 'sub-items-list/table.view';
@import 'sub-items-list/view.switcher.button';
@import 'sub-items-list/view.switcher';
@import 'sub-items-list/main';
40 changes: 40 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_action.btn.scss
@@ -0,0 +1,40 @@
.c-action-btn {
display: inline-flex;
border-radius: calculateRem(4px);
text-align: center;
cursor: pointer;
color: $ez-white;
font-size: calculateRem(14px);
font-weight: bold;
transition: background 0.3s $ez-admin-transition;
align-items: center;
height: calculateRem(40px);
width: calculateRem(40px);
justify-content: center;
margin-right: calculateRem(8px);

&--disabled {
cursor: not-allowed;
opacity: 0.3;
}

&--move {
border: calculateRem(1px) solid $ez-color-secondary;
background: $ez-color-secondary;

&:not(.c-action-btn--disabled):hover,
&:not(.c-action-btn--disabled):focus {
background: $ez-color-secondary-hover;
}
}

&--trash {
border: calculateRem(1px) solid $ez-color-danger;
background: $ez-color-danger;

&:not(.c-action-btn--disabled):hover,
&:not(.c-action-btn--disabled):focus {
background: $ez-color-danger-hover;
}
}
}
61 changes: 61 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_grid.view.item.scss
@@ -0,0 +1,61 @@
.c-grid-view-item {
cursor: pointer;
text-decoration: none;
transition: background 0.3s $ez-admin-transition;
position: relative;
background: $ez-ground-base;
border-radius: calculateRem(4px);
margin-bottom: calculateRem(8px);

&:hover,
&:focus {
text-decoration: none;
background: #e5e3e3;
}

&__content-type {
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: calculateRem(30px);
height: calculateRem(30px);
background: #fafafa;
border-radius: calculateRem(4px) 0 0 0;
}

&__content-type .ez-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

&__image {
display: block;
width: auto;
height: auto;
max-width: calculateRem(166px);
max-height: calculateRem(166px);
}

&__image-wrapper {
height: calculateRem(166px);
width: calculateRem(166px);
border-radius: calculateRem(4px) calculateRem(4px) 0 0;
background: $ez-ground-base-dark;
display: flex;
align-items: center;
justify-content: center;
}

&__title {
word-break: break-all;
line-height: calculateRem(20px);
padding: calculateRem(10px) 0;
font-size: calculateRem(14px);
padding: calculateRem(4px) calculateRem(8px);
color: $ez-black;
font-weight: bold;
}
}
12 changes: 12 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_grid.view.scss
@@ -0,0 +1,12 @@
.c-grid-view {
display: flex;
flex-wrap: wrap;
padding-left: calculateRem(8px);
padding-top: calculateRem(8px);

.c-grid-view-item {
flex: 1 1 calc(100% / 6);
max-width: calculateRem(166px);
margin-right: calculateRem(8px);
}
}
81 changes: 81 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_main.scss
@@ -0,0 +1,81 @@
.m-sub-items {
&,
& * {
box-sizing: border-box;
}

&__header {
height: calculateRem(50px);
width: 100%;
border-radius: calculateRem(4px) calculateRem(4px) 0 0;
font-weight: bold;
line-height: calculateRem(50px);
background: $ez-ground-primary-inverted-light;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
padding: 0 calculateRem(16px);
align-items: center;
}

&__title {
font-size: calculateRem(17px);
color: $ez-white;
flex: 1 1 auto;
}

&__actions {
display: flex;
}

&__actions .m-mfu {
margin-right: calculateRem(8px);
display: flex;
}

&__list {
background: $ez-white;
font-size: calculateRem(15px);
line-height: calculateRem(40px);
text-align: left;
position: relative;
}

&__list--processing:after {
content: '';
position: absolute;
z-index: 999;
background: rgba($ez-black, 0.35);
top: 0;
left: 0;
right: 0;
bottom: 0;
}

&__spinner-wrapper {
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%, -50%);
}

&__spinner {
display: block;
margin: calculateRem(20px);
}

&__confirmation-modal-body {
padding: 0 calculateRem(32px);
}

&__confirmation-modal-cancel-btn {
background: $ez-color-base-medium;
border-color: $ez-color-base-medium;
}

&__pagination-info {
text-align: center;
padding: calculateRem(16px) 0;
font-size: calculateRem(12px);
}
}
5 changes: 5 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_no.items.scss
@@ -0,0 +1,5 @@
.c-no-items {
padding: 0 calculateRem(32px);
font-style: italic;
color: $ez-color-base-light;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the rest of empty tables we are applying:
font-size: calculateRem(14px);
color: $ez-color-base-dark;
It would be good to have them here too for consistency purposes.

}
151 changes: 151 additions & 0 deletions Resources/public/scss/modules/sub-items-list/_table.view.item.scss
@@ -0,0 +1,151 @@
.c-table-view-item {
& + & {
border-top: calculateRem(1px) solid $ez-ground-primary;
}

&__translation {
display: block;
}

&__text-wrapper {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

&__cell {
padding-left: calculateRem(16px);
font-size: calculateRem(14px);
line-height: calculateRem(20px);

&--translations {
max-width: calculateRem(100px);
}

&--name .c-table-view-item__text-wrapper {
max-width: calculateRem(260px);
}

&--modified .c-table-view-item__text-wrapper {
max-width: calculateRem(190px);
}

&--checkbox {
width: 5%;
}
}

&__inner-wrapper {
cursor: pointer;

&--input {
width: 7ch;
}

&--disabled {
position: relative;

&:before {
position: absolute;
z-index: 2;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
}
}
}

&__priority-wrapper {
position: relative;
}

&__priority-actions {
position: absolute;
left: 7ch;
top: calculateRem(2px);
width: calculateRem(90px);
}

&__priority-value {
max-width: 100%;
height: calculateRem(40px);
border: calculateRem(1px) solid #b1d2e0;
margin: calculateRem(2px) 0;
padding: 0 calculateRem(10px);

&[disabled] {
border: 0 none;
background: transparent;
cursor: pointer;
}
}

&__btn {
color: $ez-white;
border: calculateRem(1px) solid transparent;
height: calculateRem(40px);
min-width: calculateRem(40px);
padding: calculateRem(7px) calculateRem(8px);
transition: background 0.3s $ez-admin-transition;
cursor: pointer;

&--submit {
background: $ez-color-secondary;
}

&--submit:hover,
&--submit:focus {
background: $ez-color-secondary-hover;
}

&--cancel {
background: $ez-color-base-medium;
}

&--cancel:hover,
&--cancel:focus {
background: $ez-color-base-medium-hover;
}

&--edit {
text-align: center;
cursor: pointer;
color: $ez-white;
display: inline-block;

.c-table-view-item__btn-inner {
padding: calculateRem(7px) calculateRem(14px);
height: 100%;
display: flex;
align-items: center;
}

.ez-icon {
fill: $ez-color-primary;
}

&:hover,
&:focus {
.ez-icon {
fill: $ez-color-primary-hover;
}
}
}
}

&__link {
display: block;
color: $ez-color-hyperlink;
text-decoration: none;
cursor: pointer;
transition: color 0.3s $ez-admin-transition;

&:hover,
&:focus {
color: $ez-color-hyperlink-hover;
text-decoration: underline;
}
}
}