Skip to content

Commit

Permalink
MID-6271 main header styles fixed, cleanup still needed
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 12, 2022
1 parent 5bd9e61 commit 17a3e2e
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
</li>
</ol>
</li>
<wicket:enclosure child="cartButton">
<li class="nav-item">
<a wicket:id="cartButton" class="nav-link shopping-cart-icon">
<i class="fa fa-shopping-cart fa-2x shopping-cart-icon"></i>
<span wicket:id="itemsCount" class="badge bg-red"
style="position: absolute; top: 1px; margin-left: -10px;"></span>
</a>
</li>
</wicket:enclosure>
<li class="nav-item">
<a wicket:id="cartButton" class="shopping-cart-icon">
<i class="fa fa-shopping-cart fa-2x shopping-cart-icon"></i>
<span wicket:id="itemsCount" class="badge bg-red"
style="position: absolute; top: 1px; margin-left: -10px;"></span>
</a>
</li>
<li>
<div wicket:id="locale"/>
</li>
<li class="nav-item dropdown" wicket:id="rightMenu">

</li>
<li class="nav-item dropdown user-menu" wicket:id="rightMenu"/>
</ul>
</nav>

Expand All @@ -84,17 +84,19 @@

<div class="content-wrapper" style="min-height: 916px; overflow: auto; overflow-x: hidden;">
<!-- Main content -->
<section class="content col-xs-12" style="float:left;">
<div wicket:id="feedbackContainer" class="feedbackContainer">
<div wicket:id="feedback" class="messagePanel"/>
<!-- <div wicket:id="tempFeedback" class="tempMessage"/> -->
</div>
<wicket:child/>
<section class="content">
<div class="container-fluid" style="margin-top: 0.75rem;">
<div wicket:id="feedbackContainer" class="feedbackContainer">
<div wicket:id="feedback" class="messagePanel"/>
<!-- <div wicket:id="tempFeedback" class="tempMessage"/> -->
</div>
<wicket:child/>

<div class="wicket-debug-buttons" wicket:id="debugBar">
<a wicket:id="dumpPageTree">Dump page tree to console</a>
<div class="wicket-debug-buttons" wicket:id="debugBar">
<a wicket:id="dumpPageTree">Dump page tree to console</a>
</div>
<div wicket:id="debugPanel" style="z-index: 10000;"/>
</div>
<div wicket:id="debugPanel" style="z-index: 10000;"/>
</section>
</div>
<footer wicket:id="footerContainer" class="main-footer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ private List<IColumn<PO, String>> createColumns() {
InlineMenuButtonColumn<PO> actionsColumn = new InlineMenuButtonColumn<>(menuItems, getPageBase()){
@Override
public String getCssClass() {
return "col-md-1";
return "inline-menu-column";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>

<div class="card boxed-table" wicket:id="box">
<div class="card" wicket:id="header"/>
<div class="card" wicket:id="box">
<div class="card-header" wicket:id="header"/>
<div wicket:id="tableContainer" class="card-body p-0">
<table class="table table-striped table-hover table-bordered" wicket:id="table" about="table"/>
<table class="table table-striped table-hover table-bordered" wicket:id="table"/>
</div>
<div class="card-footer" wicket:id="footer"/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ protected Map<DisplayType, Integer> getIconDisplayType(IModel<SelectableBean<Cas

@Override
public String getCssClass() {
return "col-lg-1";
return "icon";
}
};
columns.add(column);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,23 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<div wicket:id="menuIconBox" class="user-image">
<span class="userpanel-icon-helper"/>
<img wicket:id="menuPhoto" class="userpanel-icon"/></div>
<span class="hidden-xs" wicket:id="usernameLink"/>
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">
<img wicket:id="menuPhoto" class="user-image img-circle elevation-2"/>
<span class="d-none d-md-inline" wicket:id="usernameLink"/>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<div wicket:id="menuPanelIconBox" class="img-circle">
<span class="userpanel-icon-helper"/>
<img wicket:id="menuPanelPhoto" class="userpanel-photo" /></div>
<ul class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<li class="user-header bg-primary">
<img wicket:id="menuPanelPhoto" class="img-circle elevation-2" />
<p>
<span wicket:id="username"/>
<!-- todo improve this label (user/admin/whatever description you like) -->
<small wicket:id="focusType"/>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-right">
<form method="post" wicket:id="logoutForm">

<div wicket:id="csrfField"/>

<input type="submit" class="btn btn-default btn-flat" wicket:message="value:UserMenuPanel.logout"/>
</form>
</div>
<form method="post" wicket:id="logoutForm">
<div wicket:id="csrfField"/>
<input type="submit" class="btn btn-default btn-flat float-right" wicket:message="value:UserMenuPanel.logout"/>
</form>
</li>
</ul>
</wicket:panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class UserMenuPanel extends BasePanel<UserMenuPanel> {
private static final String ID_USERNAME = "username";
private static final String ID_FOCUS_TYPE = "focusType";
private static final String ID_PASSWORD_QUESTIONS = "passwordQuestions";
private static final String ID_ICON_BOX = "menuIconBox";
private static final String ID_PHOTO = "menuPhoto";
private static final String ID_PANEL_ICON_BOX = "menuPanelIconBox";
private static final String ID_PANEL_PHOTO = "menuPanelPhoto";
Expand All @@ -66,22 +65,16 @@ protected void onInitialize() {
}

private void initLayout() {
WebMarkupContainer iconBox = new WebMarkupContainer(ID_ICON_BOX);
add(iconBox);

IModel<AbstractResource> jpegPhotoModel = loadJpegPhotoModel();

NonCachingImage img = new NonCachingImage(ID_PHOTO, jpegPhotoModel);
iconBox.add(img);
add(img);

Label usernameLink = new Label(ID_USERNAME_LINK, (IModel<String>) this::getShortUserName);
add(usernameLink);

WebMarkupContainer panelIconBox = new WebMarkupContainer(ID_PANEL_ICON_BOX);
add(panelIconBox);

NonCachingImage panelImg = new NonCachingImage(ID_PANEL_PHOTO, jpegPhotoModel);
panelIconBox.add(panelImg);
add(panelImg);

Label username = new Label(ID_USERNAME, (IModel<String>) this::getShortUserName);
username.setRenderBodyOnly(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<a data-toggle="dropdown" class="nav-link dropdown-toggle" href="#">
<img style="outline: 2px solid #eeeeee;" wicket:id="localeIcon" />
</a>
<ul class="dropdown-menu pull-right" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<wicket:panel>
<div class="row" wicket:id="linksRow">
<div class="col-sm-6" wicket:id="linksColumn">
<a href="#" wicket:id="link">
<a href="#" wicket:id="link" style="color: inherit;">
<div class="info-box">
<div class="info-box-icon bg-blue fa fa-tasks" wicket:id="imageId"/>

<div class="info-box-content">
<span class="info-box-number" wicket:id="labelId"/>
<span wicket:id="descriptionId"/>
<span class="info-box-text" wicket:id="descriptionId"/>
</div>
</div>
</a>
Expand Down
57 changes: 26 additions & 31 deletions gui/admin-gui/src/main/resources/static/scss/midpoint-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ th.cog, td.cog {
.navbar-title {
float: left;
background-color: transparent;
padding-top: 8px;
margin-top: 3px;
}

.navbar-ajax {
Expand All @@ -793,14 +793,15 @@ th.cog, td.cog {
font-size: 22px;
}

.navbar-custom-menu > .breadcrumb {
.nav-item > .breadcrumb {
float: left;
background: transparent;
margin-top: 10px;
margin-top: 5px;
margin-bottom: 0;
margin-right: 20px;
font-size: 12px;
padding: 7px 5px;
color: inherit;

//.border-radius(2px);

Expand All @@ -818,22 +819,6 @@ th.cog, td.cog {
content: '>\00a0';
padding: 0 0 0 5px;
}

//$media (max-width: $screen-sm-max) {
// > .breadcrumb {
// position: relative;
// margin-top: 5px;
// top: 0;
// right: 0;
// float: none;
// background: $gray;
// padding-left: 10px;
//
// li:before {
// color: darken($gray, 20%);
// }
// }
//}
}

// Prism containers and attributes
Expand Down Expand Up @@ -1376,14 +1361,6 @@ th.icon {
width: 30px;
}

th.check, td.check {
// The content of this column is just a single checkbox.
// WARNING: this means both the header and the table data
// have just a single checkbox. Nothing else.
// See com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn
width: 34px;
}

th.mid-width-column, td.mid-width-column {
width: 180px;
}
Expand Down Expand Up @@ -1531,10 +1508,6 @@ td .prism-property-value {
width: 100% !important;
}

th.composited-icon {
width: 30px;
}

.small-box > .small-box-footer {
color: inherit !important;
}
Expand All @@ -1551,6 +1524,10 @@ th.composited-icon {
margin-left: -15px;
}

.search-form {

}

.search-item {
display: inline-block;
//min-width: 270px;
Expand Down Expand Up @@ -2180,3 +2157,21 @@ fieldset.objectButtons {
text-decoration: line-through;
}

// todo cleanup
th, td {
&.check {
// The content of this column is just a single checkbox.
// WARNING: this means both the header and the table data
// have just a single checkbox. Nothing else.
// See com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn
width: 50px;
}

&.composited-icon, &.icon {
width: 40px;
}

&.inline-menu-column {
width: 120px;
}
}

0 comments on commit 17a3e2e

Please sign in to comment.