Skip to content

Commit

Permalink
fix one panel popup and translation
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Feb 9, 2023
1 parent 6edf85f commit 464583a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,26 @@

import com.evolveum.midpoint.gui.api.component.BasePanel;

import com.evolveum.midpoint.web.component.dialog.SimplePopupable;

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.WebMarkupContainer;

import com.evolveum.midpoint.web.component.dialog.Popupable;

public abstract class OnePanelPopupPanel extends BasePanel implements Popupable {
import org.apache.wicket.model.IModel;

public abstract class OnePanelPopupPanel extends SimplePopupable {
private static final String ID_PANEL = "panel";
private static final String ID_BUTTON_DONE = "doneButton";

public OnePanelPopupPanel(String id){
super(id);
this(id, null);
}
public OnePanelPopupPanel(String id, IModel<String> title){
super(id, 400, 600, title);
initLayout();
}

Expand All @@ -43,29 +51,4 @@ protected Component getPanel () {
}

protected abstract WebMarkupContainer createPanel(String id);

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

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

@Override
public String getWidthUnit(){
return "px";
}

@Override
public String getHeightUnit(){
return "px";
}

@Override
public Component getContent() {
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void updateEvaluatorValue(ExpressionType expression, List<String> valu
getFeedbackMessages().add(
new FeedbackMessage(
getFeedback(),
"TODO Please write scripts without xml tag. Midpoint can parse it, but it-s better for you write it without tags.",
getPageBase().createStringResource("ScriptExpressionPanel.warning.parse").getString(),
300));
}
ExpressionUtil.updateScriptExpressionValue(expression, values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

package com.evolveum.midpoint.web.component.dialog;

import com.evolveum.midpoint.gui.api.component.BasePanel;

import org.apache.wicket.Component;
import org.apache.wicket.model.IModel;

/**
* Created by Viliam Repan (lazyman).
*/
public abstract class SimplePopupable implements Popupable {
public abstract class SimplePopupable extends BasePanel implements Popupable {

private int width;

Expand All @@ -25,7 +27,8 @@ public abstract class SimplePopupable implements Popupable {

private IModel<String> title;

public SimplePopupable(int width, int height, IModel<String> title) {
public SimplePopupable(String id, int width, int height, IModel<String> title) {
super(id);
this.width = width;
this.height = height;
this.title = title;
Expand Down Expand Up @@ -75,4 +78,9 @@ public void setHeightUnit(String heightUnit) {
public void setTitle(IModel<String> title) {
this.title = title;
}

@Override
public Component getContent() {
return this;
}
}

0 comments on commit 464583a

Please sign in to comment.