Skip to content

Commit

Permalink
MID-6271 some table fixes (column sizes), wip
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 19, 2022
1 parent af08c3a commit 4cae22f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
4 changes: 4 additions & 0 deletions gui/admin-gui/src/frontend/scss/midpoint-theme-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* and European Union Public License. See LICENSE file for details.
*/

@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/functions.scss";
@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/variables.scss";
@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/mixins/breakpoints.scss";

$text-label-color: #3c8dbc;
$text-dimmed-color: #808080;
$text-dark-dimmed-color: #595959;
Expand Down
22 changes: 17 additions & 5 deletions gui/admin-gui/src/frontend/scss/midpoint-utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@
* and European Union Public License. See LICENSE file for details.
*/

//@mixin make-width-classes($steps: $grid-steps)
@mixin make-grid-width($columns: $grid-columns, $breakpoints: $grid-breakpoints) {

// width utility classes
@for $i from 1 through 20 {
.mp-w-#{$i} {
width: (100% / 20 * $i);
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);

@include media-breakpoint-up($breakpoint, $breakpoints) {

@if $columns > 0 {
@for $i from 1 through $columns {
.mp-w#{$infix}-#{$i} {
width: (100% / $columns * $i);
}
}
}
}
}
}

@include make-grid-width();

Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ public void populateItem(Item<ICellPopulator<SelectableBean<CaseType>>> cellItem

@Override
public String getCssClass() {
return isDashboard ? "col-sm-2 col-lg-1" : super.getCssClass();
return isDashboard ? "mp-w-sm-2 mp-w-lg-1" : super.getCssClass();
}
};
columns.add(column);
Expand All @@ -860,7 +860,7 @@ public void populateItem(Item<ICellPopulator<SelectableBean<CaseType>>> cellItem

@Override
public String getCssClass() {
return isDashboard ? "col-sm-2 col-lg-1" : super.getCssClass();
return isDashboard ? "mp-w-sm-2 mp-w-lg-1" : super.getCssClass();
}
};
columns.add(column);
Expand Down Expand Up @@ -892,15 +892,15 @@ protected Map<DisplayType, Integer> getIconDisplayType(IModel<SelectableBean<Cas

@Override
public String getCssClass() {
return "icon";
return "mp-w-lg-1";
}
};
columns.add(column);

column = new PropertyColumn<SelectableBean<CaseType>, String>(createStringResource("pageCases.table.state"), CaseType.F_STATE.getLocalPart(), "value.state") {
@Override
public String getCssClass() {
return "col-lg-1";
return "mp-w-lg-1";
}

@Override
Expand Down Expand Up @@ -935,7 +935,7 @@ public IModel<String> getDataModel(IModel<SelectableBean<CaseType>> rowModel) {

@Override
public String getCssClass() {
return "col-lg-1";
return "mp-w-lg-1";
}

};
Expand Down

0 comments on commit 4cae22f

Please sign in to comment.