Skip to content

Commit

Permalink
MID-4835 some style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Sep 5, 2018
1 parent f7ba544 commit f8ec361
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Expand Up @@ -15,9 +15,7 @@
-->

<wicket:panel xmlns:wicket="http://wicket.apache.org">
<wicket:container id="operation">
<span class="label" wicket:id="label">
<span wicket:id="text"/>
</span>
</wicket:container>
<div wicket:id="operation">
<span class="label" wicket:id="label"><span wicket:id="text"/></span>
</div>
</wicket:panel>
Expand Up @@ -23,6 +23,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationType;
import org.apache.wicket.AttributeModifier;
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.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
Expand All @@ -36,6 +37,7 @@
*/
public class PendingOperationPanel extends BasePanel<List<PendingOperationType>> {

private static final String ID_LABEL = "label";
private static final String ID_OPERATION = "operation";
private static final String ID_TEXT = "text";

Expand All @@ -57,14 +59,19 @@ private void initLayout() {

@Override
protected void populateItem(ListItem<PendingOperationType> item) {
item.setRenderBodyOnly(true);

WebMarkupContainer label = new WebMarkupContainer(ID_LABEL);
item.add(label);

Label text = new Label(ID_TEXT, createLabelText(item.getModel()));
text.setRenderBodyOnly(true);
item.add(text);
label.add(text);

item.add(AttributeAppender.append("class", createTextClass(item.getModel())));
label.add(AttributeAppender.append("class", createTextClass(item.getModel())));

item.add(AttributeModifier.replace("title", createTextTooltipModel(item.getModel())));
item.add(new InfoTooltipBehavior() {
label.add(AttributeModifier.replace("title", createTextTooltipModel(item.getModel())));
label.add(new InfoTooltipBehavior() {

@Override
public String getCssClass() {
Expand Down

0 comments on commit f8ec361

Please sign in to comment.