You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2017/05/09 13:16:28 UTC
syncope git commit: [SYNCOPE-1078] changes into ActionPanel to
support BookmarkablePageLink for ActionType.WORKFLOW_MODELER
Repository: syncope
Updated Branches:
refs/heads/2_0_X 0be04b7cc -> 89a600a61
[SYNCOPE-1078] changes into ActionPanel to support BookmarkablePageLink for ActionType.WORKFLOW_MODELER
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/89a600a6
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/89a600a6
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/89a600a6
Branch: refs/heads/2_0_X
Commit: 89a600a6187b20d87b8ded2c48b24c101bfc6325
Parents: 0be04b7
Author: fmartelli <fa...@gmail.com>
Authored: Tue May 9 14:59:39 2017 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue May 9 14:59:39 2017 +0200
----------------------------------------------------------------------
.../syncope/client/console/SyncopeConsoleSession.java | 1 -
.../console/wicket/markup/html/form/ActionPanel.java | 13 ++++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/89a600a6/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 0ec23f1..2fbefe2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -327,5 +327,4 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
return FastDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
}
-
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/89a600a6/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
index fbe6a7e..b71b1d9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java
@@ -24,12 +24,14 @@ import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
@@ -65,7 +67,7 @@ public final class ActionPanel<T extends Serializable> extends Panel {
}
final boolean enabled;
- final AjaxLink<Void> actionLink;
+ final AbstractLink actionLink;
if (action.getLink() == null || action.getType() == ActionType.NOT_FOUND) {
enabled = true;
@@ -82,6 +84,11 @@ public final class ActionPanel<T extends Serializable> extends Panel {
public void onClick(final AjaxRequestTarget target) {
}
};
+ } else if (action.getType() == ActionType.WORKFLOW_MODELER) {
+ enabled = action.getLink().isEnabled(obj);
+ actionLink = new BookmarkablePageLink<>(
+ "action", action.getLink().getPageClass(), action.getLink().getPageParameters()).
+ setPopupSettings(new VeilPopupSettings().setHeight(600).setWidth(800));
} else {
enabled = action.getLink().isEnabled(obj);
@@ -123,7 +130,7 @@ public final class ActionPanel<T extends Serializable> extends Panel {
} else {
MetaDataRoleAuthorizationStrategy.unauthorizeAll(actionLink, RENDER);
}
-
+
actionLink.setVisible(enabled);
actionIcon = new Label("actionIcon", "");