Skip to content

Commit

Permalink
modifying of css and html for ListContainersPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed May 16, 2019
1 parent 89fdbe5 commit 2b40e98
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 12 deletions.
Expand Up @@ -18,14 +18,32 @@
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>

<div wicket:id="containers">
<!-- <div wicket:id="containers">
<div class="row">
<div wicket:id="selected"/>
<div wicket:id="definition"/>
</div>
</div>

<a class="btn btn-primary" wicket:id="select"/>

</div> -->
<div class="row" style="padding-left: 10px; padding-right: 5px;">
<table class="col-md-12">
<thead>
<tr class="col-md-12">
<th class="col-md-2">
<wicket:message key="ListContainersPopup.selected"/>
</th>
<th class="col-md-10">
<wicket:message key="ListContainersPopup.name"/>
</th>
</tr>
</thead>
<tbody>
<tr class="col-md-12" wicket:id="containers">
<td class="col-md-2" wicket:id="selected"/>
<td class="col-md-10" wicket:id="definition"/>
</tr>
</tbody>
</table>
<a class="btn btn-primary pull-right" wicket:id="select"/>
</div>
</wicket:panel>
</html>
Expand Up @@ -20,6 +20,7 @@

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
Expand Down Expand Up @@ -85,12 +86,20 @@ protected List<ContainersPopupDto> load() {
protected void populateItem(ListItem<ContainersPopupDto> item) {

CheckFormGroup checkFormGroup = new CheckFormGroup(ID_SELECTED, new PropertyModel<Boolean>(item.getModel(), "selected"),
new StringResourceModel("ListContainersPopup.selected"), "col-md-2", "col-md-10");
new StringResourceModel("ListContainersPopup.selected"), "col-md-2", "col-md-10") {

protected boolean getLabelVisible() {
return false;
};

};
checkFormGroup.getCheck().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
checkFormGroup.add(AttributeAppender.append("class", " checkbox-without-margin-bottom "));
checkFormGroup.setOutputMarkupId(true);
item.add(checkFormGroup);

Label definition = new Label(ID_DEFINITION, StringResourceModel.of(item.getModelObject()::getDisplayName));
String displayNameKey = item.getModelObject() != null ? item.getModelObject().getDisplayName() : "";
Label definition = new Label(ID_DEFINITION, new StringResourceModel(displayNameKey));
definition.setOutputMarkupId(true);
item.add(definition);
}
Expand Down Expand Up @@ -125,12 +134,12 @@ public void onClick(AjaxRequestTarget target) {

@Override
public int getWidth() {
return 400;
return 20;
}

@Override
public int getHeight() {
return 600;
return 0;
}

@Override
Expand All @@ -153,5 +162,6 @@ public Component getComponent() {
return this;
}


}

Expand Up @@ -17,6 +17,7 @@
package com.evolveum.midpoint.web.component.form;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import com.evolveum.midpoint.web.util.InfoTooltipBehavior;

Expand Down Expand Up @@ -82,6 +83,7 @@ public boolean isVisible() {
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
labelContainer.add(new VisibleBehaviour(() -> getLabelVisible()) {});

WebMarkupContainer checkWrapper = new WebMarkupContainer(ID_CHECK_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
Expand All @@ -97,7 +99,11 @@ public boolean isVisible() {
setOutputMarkupId(true);
}

public CheckBox getCheck(){
protected boolean getLabelVisible() {
return true;
}

public CheckBox getCheck(){
return (CheckBox) get(ID_CHECK_WRAPPER + ":" + ID_CHECK);
}

Expand Down
Expand Up @@ -481,6 +481,10 @@ LimitationsEditorDialog.label.presentation=Presentation
LimitationsEditorDialog.label.propertyAccess=Property access
LimitationsEditorDialog.label.read=Read
LimitationsEditorDialog.label.schema=Schema
ListContainersPopup.selected=Selected
ListContainersPopup.name=Name of container
ListContainerPopup.select=Select
ListContainersPopup.availableContainers=Available Containers
logger.duplicate=Logger with name '{0}' is already defined
logger.emptyLogger=Logger must not be empty
LoggingConfigPanel.appender=Appender
Expand Down Expand Up @@ -4416,5 +4420,5 @@ TaskKindType.COORDINATOR=Coordinator
TaskKindType.WORKER=Worker
TaskKindType.PARTITIONED_MASTER=Partitioned master
SubtasksPanel.label.kind=Task kind
ShowEmptyButton.showMore.false=Show more
ShowEmptyButton.showMore.true=Show less
ShowEmptyButton.showMore.false=Show empty fields
ShowEmptyButton.showMore.true=Hide empty fields

0 comments on commit 2b40e98

Please sign in to comment.