-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/simulations' of github.com:Evolveum/midpoint in…
…to feature/simulations
- Loading branch information
Showing
36 changed files
with
1,048 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/FocusTilePanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<div class="logo mt-3" wicket:id="logo"/> | ||
<div class="mt-4 gap-1 d-flex align-items-center justify-content-center w-100"> | ||
<i wicket:id="icon"></i> | ||
<div class="font-weight-bold text-truncate" wicket:id="title"/> | ||
</div> | ||
<div class="tile-description mt-2 text-center text-secondary flex-grow-1" style="display: -webkit-box; text-overflow: ellipsis;" wicket:id="description"/> | ||
<a class="btn btn-link text-lightblue mt-3" wicket:id="details"> | ||
<wicket:message key="CatalogTilePanel.details"/> | ||
</a> | ||
</wicket:panel> | ||
</html> |
114 changes: 114 additions & 0 deletions
114
...admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/FocusTilePanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.component.tile; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.web.component.data.column.RoundedImagePanel; | ||
import com.evolveum.midpoint.web.component.util.VisibleBehaviour; | ||
import com.evolveum.midpoint.web.util.TooltipBehavior; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.DisplayType; | ||
|
||
import org.apache.wicket.Component; | ||
import org.apache.wicket.ajax.AjaxEventBehavior; | ||
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; | ||
import org.apache.wicket.request.resource.IResource; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* @author lskublik | ||
*/ | ||
public class FocusTilePanel<F extends Serializable, T extends Tile<F>> extends BasePanel<T> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_LOGO = "logo"; | ||
private static final String ID_DESCRIPTION = "description"; | ||
private static final String ID_DETAILS = "details"; | ||
private static final String ID_ICON = "icon"; | ||
private static final String ID_TITLE = "title"; | ||
|
||
public FocusTilePanel(String id, IModel<T> model) { | ||
super(id, model); | ||
|
||
initLayout(); | ||
} | ||
|
||
protected void initLayout() { | ||
setOutputMarkupId(true); | ||
|
||
RoundedImagePanel logo = new RoundedImagePanel(ID_LOGO, () -> createDisplayType(getModel()), createPreferredImage(getModel())); | ||
add(logo); | ||
|
||
Label description = new Label(ID_DESCRIPTION, () -> getModelObject().getDescription()); | ||
description.add(AttributeAppender.replace("title", () -> getModelObject().getDescription())); | ||
description.add(new TooltipBehavior()); | ||
add(description); | ||
|
||
WebMarkupContainer icon = new WebMarkupContainer(ID_ICON); | ||
icon.add(AttributeAppender.append("class", () -> getModelObject().getIcon())); | ||
add(icon); | ||
|
||
IModel<String> titleModel = () -> { | ||
String title = getModelObject().getTitle(); | ||
return title != null ? getString(title, null, title) : null; | ||
}; | ||
|
||
Label title = new Label(ID_TITLE, titleModel); | ||
title.add(AttributeAppender.replace("title", titleModel)); | ||
title.add(new TooltipBehavior()); | ||
add(title); | ||
|
||
// add(new AjaxEventBehavior("click") { | ||
// | ||
// @Override | ||
// protected void onEvent(AjaxRequestTarget target) { | ||
// FocusTilePanel.this.onClick(target); | ||
// } | ||
// }); | ||
|
||
Component details = createDetailsButton(ID_DETAILS); | ||
add(details); | ||
} | ||
|
||
protected Component createDetailsButton(String id) { | ||
return new AjaxLink<>(id) { | ||
|
||
@Override | ||
public void onClick(AjaxRequestTarget target) { | ||
FocusTilePanel.this.onDetails(target); | ||
} | ||
}; | ||
} | ||
|
||
protected void onDetails(AjaxRequestTarget target) { | ||
|
||
} | ||
|
||
protected void onClick(AjaxRequestTarget target) { | ||
getModelObject().toggle(); | ||
target.add(this); | ||
} | ||
|
||
protected DisplayType createDisplayType(IModel<T> model) { | ||
return null; | ||
} | ||
|
||
protected IModel<IResource> createPreferredImage(IModel<T> model) { | ||
return null; | ||
} | ||
|
||
protected RoundedImagePanel getLogo() { | ||
return (RoundedImagePanel) get(ID_LOGO); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...dmin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/MemberTilePanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<div class="w-100 d-flex"> | ||
<div class="mr-auto"> | ||
<input class="btn p-0" wicket:id="check" type="checkbox"/> | ||
</div> | ||
<div class="ml-auto" wicket:id="menu"/> | ||
</div> | ||
<div class="btn p-0 logo mt-3" wicket:id="logo"/> | ||
|
||
<div class="mt-4 gap-1 d-flex align-items-center justify-content-center w-100"> | ||
<i wicket:id="icon"/> | ||
<div class="font-weight-bold text-truncate" wicket:id="title"/> | ||
</div> | ||
|
||
<div class="mt-2 d-flex align-items-center justify-content-center w-100"> | ||
<div wicket:id="tags"> | ||
<div class="mx-1 d-flex badge" wicket:id="tag"> | ||
<i wicket:id="tagIcon"/> | ||
<div class="ml-1" wicket:id="tagLabel"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="tile-description mt-2 text-center text-secondary flex-grow-1" style="display: -webkit-box; text-overflow: ellipsis;" wicket:id="description"/> | ||
<div class="w-100 d-flex"> | ||
<a class="btn btn-outline-primary text-lightblue mt-3 mr-auto" wicket:id="details"> | ||
<i class="fa fa-pen-to-square mr-2"/> | ||
<wicket:message key="MemberTilePanel.details"/> | ||
</a> | ||
<a class="btn btn-link mt-3 ml-auto" wicket:id="unassign"> | ||
<i class="fa fa-link-slash mr-2"/> | ||
<wicket:message key="MemberTilePanel.unassign"/> | ||
</a> | ||
</div> | ||
</wicket:panel> | ||
</html> |
Oops, something went wrong.