Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'post-3.7-fixes' of https://github.com/Evolveum/midpoint …
…into post-3.7-fixes
- Loading branch information
Showing
19 changed files
with
394 additions
and
131 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
61 changes: 61 additions & 0 deletions
61
...src/main/java/com/evolveum/midpoint/web/component/assignment/AssociationDetailsPanel.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,61 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2018 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<div class="box-body"> | ||
<div class="container-fluid prism-object"> | ||
|
||
<div class="row"> | ||
<label class="col-md-1 pull-left"><h4> | ||
<wicket:message key="AssociationDetailsPanel.AssociationHeader" /> | ||
</h4></label> | ||
<button wicket:id="removeAssociation" wicket:message="title:PrismObjectPanel.deleteContainer" | ||
class="btn btn-box-tool" trigger="hover"><i class="fa fa-minus-circle"></i></button> | ||
</div> | ||
<div class="row"> | ||
<div class="container-fluid prism-container"> | ||
<div class="prism-properties"> | ||
|
||
<div> | ||
<div class="row prism-property"> | ||
<div class="col-xs-3"> | ||
<span><wicket:message key="ResourceObjectAssociationType.ref"/></span> | ||
</div> | ||
<div class="col-xs-8"> | ||
<div wicket:id="refField"/> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="stripe"> | ||
<div class="row prism-property"> | ||
<div class="col-xs-3"> | ||
<span><wicket:message key="AssociationDetailsPanel.expressionPanel"/></span> | ||
</div> | ||
<div class="col-xs-8"> | ||
<div wicket:id="expressionPanel"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</wicket:panel> | ||
</html> |
102 changes: 102 additions & 0 deletions
102
...src/main/java/com/evolveum/midpoint/web/component/assignment/AssociationDetailsPanel.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,102 @@ | ||
/** | ||
* Copyright (c) 2015-2018 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.evolveum.midpoint.web.component.assignment; | ||
|
||
import com.evolveum.midpoint.gui.api.GuiStyleConstants; | ||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.gui.api.component.togglebutton.ToggleIconButton; | ||
import com.evolveum.midpoint.gui.api.util.WebComponentUtil; | ||
import com.evolveum.midpoint.prism.path.ItemPath; | ||
import com.evolveum.midpoint.web.component.input.ExpressionValuePanel; | ||
import com.evolveum.midpoint.web.component.input.QNameEditorPanel; | ||
import com.evolveum.midpoint.web.component.prism.ContainerValueWrapper; | ||
import com.evolveum.midpoint.web.component.prism.ContainerWrapper; | ||
import com.evolveum.midpoint.web.component.prism.PrismContainerValueHeaderPanel; | ||
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.*; | ||
import org.apache.wicket.ajax.AjaxRequestTarget; | ||
import org.apache.wicket.behavior.AttributeAppender; | ||
import org.apache.wicket.markup.html.WebMarkupContainer; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.PropertyModel; | ||
|
||
import javax.xml.namespace.QName; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by honchar | ||
*/ | ||
public class AssociationDetailsPanel extends BasePanel<ContainerValueWrapper<ResourceObjectAssociationType>>{ | ||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_REF_FIELD = "refField"; | ||
private static final String ID_EXPRESSION_PANEL = "expressionPanel"; | ||
private static final String ID_REMOVE_ASSOCIATION = "removeAssociation"; | ||
|
||
private ConstructionType construction; | ||
|
||
public AssociationDetailsPanel(String id, IModel<ContainerValueWrapper<ResourceObjectAssociationType>> associationWrapperModel, | ||
ConstructionType construction){ | ||
super(id, associationWrapperModel); | ||
this.construction = construction; | ||
} | ||
|
||
@Override | ||
protected void onInitialize(){ | ||
super.onInitialize(); | ||
initLayout(); | ||
} | ||
|
||
private void initLayout(){ | ||
QNameEditorPanel refField = new QNameEditorPanel(ID_REF_FIELD, WebComponentUtil.createPrismPropertySingleValueModel(getModel(), ResourceObjectAssociationType.F_REF), | ||
null, null, false, false){ | ||
private static final long serialVersionUID = 1L; | ||
@Override | ||
protected AttributeAppender getSpecificLabelStyleAppender() { | ||
return AttributeAppender.append("style", "font-weight: normal !important;"); | ||
} | ||
}; | ||
refField.setOutputMarkupId(true); | ||
add(refField); | ||
|
||
ResourceObjectAssociationType resourceObjectAssociationType = getModelObject().getContainerValue().asContainerable(); | ||
MappingType outbound = resourceObjectAssociationType.getOutbound(); | ||
ExpressionValuePanel expressionValuePanel = new ExpressionValuePanel(ID_EXPRESSION_PANEL, | ||
new PropertyModel<ExpressionType>(outbound, MappingType.F_EXPRESSION.getLocalPart()), | ||
construction, getPageBase()); | ||
expressionValuePanel.setOutputMarkupId(true); | ||
add(expressionValuePanel); | ||
|
||
ToggleIconButton removeAssociationButton = new ToggleIconButton(ID_REMOVE_ASSOCIATION, | ||
GuiStyleConstants.CLASS_MINUS_CIRCLE_DANGER, GuiStyleConstants.CLASS_MINUS_CIRCLE_DANGER) { | ||
private static final long serialVersionUID = 1L; | ||
|
||
@Override | ||
public void onClick(AjaxRequestTarget target) { | ||
// isChildContainersSelectorPanelVisible = true; | ||
// target.add(PrismContainerValueHeaderPanel.this); | ||
} | ||
|
||
@Override | ||
public boolean isOn() { | ||
return true; | ||
} | ||
}; | ||
add(removeAssociationButton); | ||
|
||
|
||
} | ||
} |
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
Oops, something went wrong.