-
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 remote-tracking branch 'refs/remotes/origin/master'
- Loading branch information
Showing
10 changed files
with
258 additions
and
22 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
19 changes: 19 additions & 0 deletions
19
...admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/MetadataPopup.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,19 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2018 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<wicket:panel xmlns:wicket="http://wicket.apache.org"> | ||
|
||
<div wicket:id="metadata"/> | ||
|
||
<wicket:fragment wicket:id="buttons"> | ||
<div class="d-flex flex-wrap gap-2 w-100"> | ||
<a class="btn btn-outline-primary" wicket:id="close"> | ||
<wicket:message key="Button.close"/> | ||
</a> | ||
</div> | ||
</wicket:fragment> | ||
</wicket:panel> |
76 changes: 76 additions & 0 deletions
76
...admin-gui/src/main/java/com/evolveum/midpoint/web/component/prism/show/MetadataPopup.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,76 @@ | ||
/* | ||
* Copyright (C) 2010-2023 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.web.component.prism.show; | ||
|
||
import org.apache.wicket.Component; | ||
import org.apache.wicket.ajax.AjaxRequestTarget; | ||
import org.apache.wicket.ajax.markup.html.AjaxLink; | ||
import org.apache.wicket.markup.html.panel.Fragment; | ||
import org.apache.wicket.model.IModel; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.evolveum.midpoint.gui.api.page.PageBase; | ||
import com.evolveum.midpoint.gui.impl.prism.panel.PrismValueMetadataPanel; | ||
import com.evolveum.midpoint.gui.impl.prism.wrapper.ValueMetadataWrapperImpl; | ||
import com.evolveum.midpoint.web.component.dialog.Popupable; | ||
import com.evolveum.midpoint.web.component.dialog.SimplePopupable; | ||
import com.evolveum.midpoint.web.component.util.VisibleBehaviour; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class MetadataPopup extends SimplePopupable<ValueMetadataWrapperImpl> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_METADATA = "metadata"; | ||
private static final String ID_BUTTONS = "buttons"; | ||
private static final String ID_CLOSE = "close"; | ||
|
||
private Fragment footer; | ||
|
||
public MetadataPopup(String id, IModel<ValueMetadataWrapperImpl> model) { | ||
super(id, model, 400, 200, PageBase.createStringResourceStatic("MetadataPopupable.title")); | ||
|
||
initLayout(); | ||
} | ||
|
||
public @NotNull Component getFooter() { | ||
return footer; | ||
} | ||
|
||
private void initLayout() { | ||
PrismValueMetadataPanel metadata = new PrismValueMetadataPanel(ID_METADATA, getModel()); | ||
metadata.add(new VisibleBehaviour(() -> getModelObject() != null)); | ||
metadata.setOutputMarkupId(true); | ||
add(metadata); | ||
|
||
footer = initFooter(); | ||
} | ||
|
||
private Fragment initFooter() { | ||
Fragment footer = new Fragment(Popupable.ID_FOOTER, ID_BUTTONS, this); | ||
|
||
AjaxLink<Void> close = new AjaxLink<>(ID_CLOSE) { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Override | ||
public void onClick(AjaxRequestTarget target) { | ||
onCloseClicked(target); | ||
} | ||
}; | ||
footer.add(close); | ||
|
||
return footer; | ||
} | ||
|
||
protected void onCloseClicked(AjaxRequestTarget target) { | ||
getPageBase().hideMainPopup(target); | ||
} | ||
} |
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
Oops, something went wrong.