Fix tables width, paginators, button on mobile / touchscreens (#2695)
This commit is contained in:
parent
7a03209d28
commit
165ee2929b
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dropdown-root" ngbDropdown [placement]="placement" *ngIf="areActionsDisplayed(actions, entry)">
|
<div class="dropdown-root" ngbDropdown [placement]="placement" container="body" *ngIf="areActionsDisplayed(actions, entry)">
|
||||||
<div
|
<div
|
||||||
class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange', 'button-styled': buttonStyled }"
|
class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange', 'button-styled': buttonStyled }"
|
||||||
ngbDropdownToggle role="button"
|
ngbDropdownToggle role="button"
|
||||||
|
|
|
@ -267,7 +267,7 @@ table {
|
||||||
top: #{-($header-height + 20px)};
|
top: #{-($header-height + 20px)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: #{map-get($grid-breakpoints, xxl)}) {
|
@media screen and (max-width: #{breakpoint(xxl)}) {
|
||||||
.main-col {
|
.main-col {
|
||||||
&.expanded {
|
&.expanded {
|
||||||
.margin-content {
|
.margin-content {
|
||||||
|
@ -278,7 +278,7 @@ table {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: #{map-get($grid-breakpoints, lg)}) {
|
@media screen and (max-width: #{breakpoint(lg)}) {
|
||||||
/* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
|
/* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
|
||||||
.main-col {
|
.main-col {
|
||||||
&, &.expanded {
|
&, &.expanded {
|
||||||
|
@ -343,6 +343,40 @@ table {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// overflow-databale responsive rules
|
||||||
|
@media screen and (max-width: #{breakpoint(xxl)}) {
|
||||||
|
.main-col {
|
||||||
|
&.expanded {
|
||||||
|
@include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.expanded) {
|
||||||
|
@include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: #{breakpoint(lg)}) {
|
||||||
|
.main-col {
|
||||||
|
&.expanded {
|
||||||
|
@include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(.expanded) {
|
||||||
|
@include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: $small-view) {
|
||||||
|
.main-col {
|
||||||
|
&:not(.expanded),
|
||||||
|
&.expanded {
|
||||||
|
@include overflow-datatable(breakpoint(lg), 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
|
@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
|
||||||
.main-col {
|
.main-col {
|
||||||
&:not(.expanded) {
|
&:not(.expanded) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: #{map-get($grid-breakpoints, md)}) {
|
@media screen and (min-width: #{breakpoint(md)}) {
|
||||||
.modal:before {
|
.modal:before {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
content: " ";
|
content: " ";
|
||||||
|
|
|
@ -17,6 +17,10 @@ $grid-breakpoints: (
|
||||||
xxl: 1600px
|
xxl: 1600px
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@function breakpoint($label) {
|
||||||
|
@return map-get($grid-breakpoints, $label);
|
||||||
|
}
|
||||||
|
|
||||||
$container-max-widths: (
|
$container-max-widths: (
|
||||||
sm: 420px,
|
sm: 420px,
|
||||||
md: 720px,
|
md: 720px,
|
||||||
|
|
|
@ -80,7 +80,7 @@ p-table {
|
||||||
my-edit-button,
|
my-edit-button,
|
||||||
my-delete-button,
|
my-delete-button,
|
||||||
my-button {
|
my-button {
|
||||||
display: block !important;
|
display: inline-block !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,14 +160,20 @@ p-table {
|
||||||
my-delete-button,
|
my-delete-button,
|
||||||
my-button {
|
my-button {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
margin-left: 5px;
|
||||||
|
|
||||||
&.show {
|
&.show {
|
||||||
display: block !important;
|
display: inline-block !important;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my-edit-button + my-delete-button {
|
// keep displaying on touchscreen
|
||||||
margin-left: 5px;
|
@media not all and (hover: hover) and (pointer: fine) {
|
||||||
|
display: inline-block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:first-child {
|
||||||
|
margin-left: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,6 +272,33 @@ p-table {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// overflow data table
|
||||||
|
@mixin overflow-datatable ($table-min-width, $horizontal-margins) {
|
||||||
|
p-table {
|
||||||
|
.ui-table-wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
max-width: calc(100vw - #{$horizontal-margins * 2});
|
||||||
|
|
||||||
|
table {
|
||||||
|
min-width: $table-min-width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p-paginator .ui-paginator-bottom {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.ui-paginator-current {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, .ui-paginator-pages {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// multiselect customizations
|
// multiselect customizations
|
||||||
p-multiselect {
|
p-multiselect {
|
||||||
.ui-multiselect {
|
.ui-multiselect {
|
||||||
|
|
Loading…
Reference in New Issue