Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Jun 10, 2022
2 parents d244330 + 47f61a1 commit b21e2ee
Show file tree
Hide file tree
Showing 24 changed files with 728 additions and 209 deletions.
134 changes: 134 additions & 0 deletions gui/admin-gui/src/frontend/scss/_list-group-menu.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*!
* Copyright (c) 2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

@mixin list-reset() {
list-style: none;
padding-left: 0;
margin-bottom: 0;
}

@mixin list-group-menu() {
display: flex;
flex-direction: column;
width: 100%;
min-width: 273px;

@include list-reset();

& ul, li {
// reset browser default to be sure
@include list-reset();
}

@include border-radius($list-group-border-radius);
}

@mixin list-group-menu-item() {
display: flex;
flex-direction: column;
color: $list-group-color;
background-color: $list-group-bg;

& > a {
display: flex;
flex-wrap: wrap;
align-items: center;
// todo for "sm" version 0.5rem 1rem
padding: $list-group-item-padding-y $list-group-item-padding-x;
color: inherit;

@include hover-focus() {
z-index: 1; // Place hover/focus items above their siblings for proper border styling
color: $list-group-action-hover-color;
text-decoration: none;
background-color: $list-group-hover-bg;
}

&.disabled,
&:disabled {
color: $list-group-disabled-color;
pointer-events: none;
background-color: $list-group-disabled-bg;
}

// Include both here for `<a>`s and `<button>`s
&.active {
z-index: 2; // Place active items above their siblings for proper border styling
color: $list-group-active-color;
background-color: $list-group-active-bg;
border-color: $list-group-active-border-color;
}

&:active {
color: $list-group-action-active-color;
background-color: $list-group-action-active-bg;
}

& > i.icon {
margin-right: 1rem;
}

& > span.label {
flex-grow: 1;
}
}
}

.list-group-menu {
@include list-group-menu();
}

.list-group-menu-item {
@include list-group-menu-item;

border: $list-group-border-width solid $list-group-border-color;

&:first-child {
@include border-top-radius(inherit);

& > a {
@include border-top-radius(inherit);
}
}

&:last-child {
@include border-bottom-radius(inherit);

& > a:last-child {
@include border-bottom-radius(inherit);
}
}

& + & {
border-top-width: 0;

&.active {
margin-top: -$list-group-border-width;
border-top-width: $list-group-border-width;
}
}
}

.list-group-submenu {
@include list-group-menu();
}

.list-group-submenu-item {
@include list-group-menu-item;

& .list-group-submenu > .list-group-submenu-item > a {
padding-left: 3.25rem;
}

& > a {
padding-left: 2rem;
}
}

@include dark-mode () {
// todo dark mode
}
17 changes: 1 addition & 16 deletions gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@import "prism-forms";
@import "midpoint-utils";
@import "details-menu";
@import "list-group-menu";
@import "wicket";
@import "bs-stepper-custom";

Expand Down Expand Up @@ -1695,22 +1696,6 @@ th.debug-list-buttons {
// }
//}

.details-menu-panel {
min-width: 273px;

& > ul {
width: 100%;
margin: 0;
padding: 0;
list-style: none;

& > li {
display: flex;
flex-flow: column;
}
}
}

.col-5i,
.col-sm-5i,
.col-md-5i,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
Expand Down Expand Up @@ -68,6 +69,7 @@ public void onClick(AjaxRequestTarget target) {
back.add(getBackBehaviour());
back.setOutputMarkupId(true);
back.setOutputMarkupPlaceholderTag(true);
back.add(AttributeAppender.append("class", () -> !back.isEnabledInHierarchy() ? "disabled" : null));
add(back);

AjaxLink next = new AjaxLink<>(ID_NEXT) {
Expand All @@ -80,6 +82,7 @@ public void onClick(AjaxRequestTarget target) {
next.add(getNextBehaviour());
next.setOutputMarkupId(true);
next.setOutputMarkupPlaceholderTag(true);
next.add(AttributeAppender.append("class", () -> !next.isEnabledInHierarchy() ? "disabled" : null));
add(next);

Label nextLabel = new Label(ID_NEXT_LABEL, () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void onClick(AjaxRequestTarget target) {
};
next.setOutputMarkupId(true);
next.setOutputMarkupPlaceholderTag(true);
next.add(AttributeAppender.append("class", () -> !next.isEnabledInHierarchy() ? "disabled" : null));

next.add(new Label(ID_NEXT_LABEL, nextPanelTitle));
next.add(getNextVisibilityBehaviour());
Expand All @@ -94,6 +95,7 @@ public void onClick(AjaxRequestTarget target) {
};
back.setOutputMarkupId(true);
back.setOutputMarkupPlaceholderTag(true);
back.add(AttributeAppender.append("class", () -> !back.isEnabledInHierarchy() ? "disabled" : null));

return back;
}
Expand Down

0 comments on commit b21e2ee

Please sign in to comment.