Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed May 24, 2022
2 parents eb96a07 + a0b2d9d commit cb05da8
Show file tree
Hide file tree
Showing 43 changed files with 256 additions and 265 deletions.
15 changes: 15 additions & 0 deletions gui/admin-gui/patches/bootstrap-multiselect+1.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/bootstrap-multiselect/dist/js/bootstrap-multiselect.js b/node_modules/bootstrap-multiselect/dist/js/bootstrap-multiselect.js
index 17d8633..e1e67ad 100644
--- a/node_modules/bootstrap-multiselect/dist/js/bootstrap-multiselect.js
+++ b/node_modules/bootstrap-multiselect/dist/js/bootstrap-multiselect.js
@@ -43,9 +43,7 @@
*/
(function (root, factory) {
// check to see if 'knockout' AMD module is specified if using requirejs
- if (typeof define === 'function' && define.amd &&
- typeof require === 'function' && typeof require.specified === 'function' && require.specified('knockout')) {
-
+ if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'knockout'], factory);
} else {
11 changes: 9 additions & 2 deletions gui/admin-gui/src/frontend/js/midpoint-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,18 @@ export default class MidPointTheme {
}

showAjaxStatusSign() {
document.getElementById('ajax_busy').style.visibility = 'visible';
var element = document.getElementById('ajax_busy');
if (element != null) {
element.style.visibility = 'visible';
}
}

hideAjaxStatusSign() {
document.getElementById('ajax_busy').style.visibility = 'hidden';
var element = document.getElementById('ajax_busy');
if (element == null) {
return;
}
element.style.visibility = 'hidden';
if (document.querySelectorAll("[role='tooltip']") != null) {
var tooltips = document.querySelectorAll("[role='tooltip']"), i;
for (i = 0; i < tooltips.length; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '../../../node_modules/admin-lte/plugins/bootstrap/js/bootstrap';
import '../../../node_modules/admin-lte/dist/js/adminlte';

import '../../../node_modules/bootstrap-select';
// import '../../../node_modules/bootstrap-multiselect'; // todo enable, used in DropDownMultiChoice (ListMultipleChoicePanel)
import '../../../node_modules/bootstrap-multiselect';

import '../../../node_modules/ace-builds/src-noconflict/ace';

Expand Down
74 changes: 38 additions & 36 deletions gui/admin-gui/src/frontend/scss/midpoint-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,10 @@ th.cog, td.cog {
// other info box enhancements (e.g. role assignment)

.info-box-ethereal {
// "lighter" info box, without the border or any heavy decorations
box-shadow: none;
border: none;
// "lighter" info box, without the border or any heavy decorations
box-shadow: none;
border: none;
margin-bottom: 0;
}

.info-box-icon-ethereal {
Expand Down Expand Up @@ -1306,10 +1307,6 @@ td .prism-property-value {
border-top: 0px !important;
}

.metadata-block {
padding-top: 5px;
}

.metadata-properties {

.metadata-property {
Expand Down Expand Up @@ -1346,45 +1343,41 @@ td .prism-property-value {
}

.acquisition {
margin-top: 5px;
margin-bottom: 5px;
}

.acquisition > li {
float: left;
list-style: none;
margin-left: -30px;
}

.acquisition > li + li {
margin-left: 10px;
list-style: none;
}

.acquisition > li + li::before {
font-family: "FontAwesome";
content: "\f067";
float: left;
margin-right: 10px;
margin-top: 5px;
margin-bottom: 5px;

& > li {
float: left;
margin-left: -30px;

& + li {
margin-left: 10px;

&::before {
color: $text-muted;
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: "\f067";
float: left;
margin-right: 10px;
}
}
}
}

.yield {
margin-top: 2px;
}

.yield-heading {
display: flex;
flex-wrap: wrap;
flex-flow: row;
align-items: center;

padding: 5px 5px;
border-top: 1px solid #dddddd;
// font-weight: 700;
font-size: 16px;
}

.yield-description {
clear: both; // Fix floats in yield header
padding-top: 10px;
padding-left: 50px;
margin-top: 0px;
margin-bottom: -10px;
}

.popover {
Expand Down Expand Up @@ -1744,3 +1737,12 @@ span.yui-skin-sam {
th.debug-list-buttons {
width: 160px;
}

.notification {
&.nav-item > .nav-link > .badge {
position: absolute;
top: 5px;
right: 10px;
font-size: 0.5em;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@
</a>
</li>
</wicket:enclosure>
<wicket:remove>
<!-- todo waiting for proper implementation -->
<li class="nav-item notification">
<a class="nav-link">
<i class="fas fa-bell"></i>
<span class="badge badge-danger">1</span>
</a>
</li>
</wicket:remove>
<li class="nav-item dropdown">
<div wicket:id="locale"/>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,16 @@ public static <T extends ObjectType> PrismObject<T> loadObject(Referencable obje
return loadObject(type, objectReference.getOid(), null, page, task, result);
}

@Nullable
public static <T extends ObjectType> PrismObject<T> loadObject(Referencable objectReference,
PageAdminLTE page, Task task, OperationResult result) {
return loadObject(objectReference, false, page, task, result);
}

@Nullable
public static <T extends ObjectType> PrismObject<T> loadObject(Referencable objectReference, boolean allowNull,
PageAdminLTE page, Task task, OperationResult result) {
Class<T> type = page.getPrismContext().getSchemaRegistry().determineClassForType(objectReference.getType());
return loadObject(type, objectReference.getOid(), null, page, task, result);
return loadObject(type, objectReference.getOid(), null, allowNull, page, task, result);
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public abstract class AbstractItemWrapperColumnPanel<IW extends ItemWrapper, VW extends PrismValueWrapper>
extends BasePanel<IW> {

private static final transient Trace LOGGER = TraceManager.getTrace(AbstractItemWrapperColumnPanel.class);
private static final Trace LOGGER = TraceManager.getTrace(AbstractItemWrapperColumnPanel.class);
protected PageBase pageBase;
protected ItemPath itemName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@
<i class="fa fa-tag"></i>
</a>
</div>
<wicket:enclosure child="metadata">
<div wicket:id="metadata"/>
</wicket:enclosure>
<div class="mb-3 ml-3" wicket:id="metadata"/>

<wicket:container wicket:id="valueContainer">

<span wicket:id="input"></span>
<div class="row" style="margin-left: 15px;">
<span wicket:id="feedback" class="text-danger"/>
</div>

</wicket:container>
</form>
</wicket:panel>
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>
<div class="d-flex flex-wrap gap-1 mb-3 tags" wicket:id="buttonsContainer">
<div class="d-flex flex-wrap gap-1 tags" wicket:id="buttonsContainer">
<wicket:container wicket:id="buttons">
<a class="btn btn-default btn-xs" wicket:id="button"/>
</wicket:container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@
</div>
<wicket:enclosure child="metadata">
<div class="row">
<div class="col-xs-10 metadata-block">
<div class="col-10 mt-1">
<div wicket:id="metadata"/>
</div>
</div>
</wicket:enclosure>

</form>
</wicket:panel>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package com.evolveum.midpoint.gui.impl.prism.panel;

import com.evolveum.midpoint.web.component.AjaxIconButton;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxEventBehavior;
Expand Down Expand Up @@ -38,7 +40,7 @@

public abstract class PrismValuePanel<T, IW extends ItemWrapper, VW extends PrismValueWrapper<T>> extends BasePanel<VW> {

private static final transient Trace LOGGER = TraceManager.getTrace(PrismValuePanel.class);
private static final Trace LOGGER = TraceManager.getTrace(PrismValuePanel.class);

protected static final String ID_VALUE_FORM = "valueForm";
private static final String ID_REMOVE_BUTTON = "removeButton";
Expand Down Expand Up @@ -71,6 +73,7 @@ private void initLayout() {
MidpointForm<VW> form = new MidpointForm<>(ID_VALUE_FORM);
form.setOutputMarkupId(true);
add(form);

form.add(createHeaderPanel());

createValuePanel(form);
Expand All @@ -79,10 +82,9 @@ private void initLayout() {
}

private WebMarkupContainer createHeaderPanel() {

WebMarkupContainer buttonContainer = new WebMarkupContainer(ID_HEADER_CONTAINER);

AjaxLink<Void> removeButton = new AjaxLink<Void>(ID_REMOVE_BUTTON) {
AjaxLink<Void> removeButton = new AjaxLink<>(ID_REMOVE_BUTTON) {
private static final long serialVersionUID = 1L;

@Override
Expand All @@ -99,7 +101,7 @@ public void onClick(AjaxRequestTarget target) {
removeButton.add(new VisibleBehaviour(this::isRemoveButtonVisible));
buttonContainer.add(removeButton);

AjaxLink<Void> showMetadataButton = new AjaxLink<Void>(ID_SHOW_METADATA) {
AjaxLink<Void> showMetadataButton = new AjaxLink<>(ID_SHOW_METADATA) {
private static final long serialVersionUID = 1L;

@Override
Expand All @@ -123,11 +125,10 @@ private void createValuePanel(MidpointForm form) {
GuiComponentFactory factory = null;
if (getModelObject() != null && getModelObject().getParent() != null) {
try {

factory = getPageBase().getRegistry().findValuePanelFactory(getModelObject().getParent());

} catch (Throwable e) {
LoggingUtils.logUnexpectedException(LOGGER, "Failed to find value panel factory for {}. Ignoring and continuing with default value panel.", e, getModelObject().getParent());
LoggingUtils.logUnexpectedException(LOGGER,
"Failed to find value panel factory for {}. Ignoring and continuing with default value panel.", e, getModelObject().getParent());
}
}

Expand All @@ -137,7 +138,6 @@ private void createValuePanel(MidpointForm form) {

// feedback
FeedbackAlerts feedback = new FeedbackAlerts(ID_FEEDBACK);

feedback.setOutputMarkupId(true);

if (factory == null) {
Expand Down Expand Up @@ -173,7 +173,6 @@ private void createValuePanel(MidpointForm form) {
getSession().error("Cannot create panel");
throw new RuntimeException(e);
}

}

protected void createMetadataPanel(MidpointForm form) {
Expand Down Expand Up @@ -279,10 +278,11 @@ private <O extends ObjectType> O getObject() {

private void showMetadataPerformed(VW value, AjaxRequestTarget target) {
boolean showMetadata = !value.isShowMetadata();
System.out.println("showMetadataPerformed: " + showMetadata);
value.setShowMetadata(showMetadata);
getValueMetadata().unselect();

target.add(PrismValuePanel.this);
target.add(this.get("valueForm"));
}

protected boolean isRemoveButtonVisible() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div wicket:id="source"></div>
<!-- <div wicket:id="origin"></div>-->
<div wicket:id="source"/>
<wicket:enclosure child="channel">
<i wicket:id="channelIcon"></i>
<span wicket:id="channel"></span>
<span wicket:id="channel"/>
</wicket:enclosure>

</wicket:panel>
</html>

0 comments on commit cb05da8

Please sign in to comment.