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/15 15:57:01 UTC
syncope git commit: [SYNCOPE-1081] provides a fix for the l&f issues
about the given 7 points
Repository: syncope
Updated Branches:
refs/heads/2_0_X 7661ccc4d -> 841f3e63e
[SYNCOPE-1081] provides a fix for the l&f issues about the given 7 points
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/841f3e63
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/841f3e63
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/841f3e63
Branch: refs/heads/2_0_X
Commit: 841f3e63e0fd59527f90e77245551b225ef7f38e
Parents: 7661ccc
Author: fmartelli <fa...@gmail.com>
Authored: Mon May 15 17:56:37 2017 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Mon May 15 17:56:37 2017 +0200
----------------------------------------------------------------------
.../html/form/ActionLinksTogglePanel.java | 27 ++++++++++++++++++++
.../wicket/markup/html/form/ActionPanel.java | 19 ++++++++++++++
.../client/console/wizards/WizardMgtPanel.java | 8 ++++--
.../META-INF/resources/css/topology.css | 1 -
.../client/console/panels/TogglePanel.html | 12 ++++++---
5 files changed, 60 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/841f3e63/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
index c387c32..5788759 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksTogglePanel.java
@@ -37,9 +37,12 @@ import org.apache.syncope.common.lib.policy.AbstractPolicyTO;
import org.apache.syncope.common.lib.to.AccessTokenTO;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.WorkflowDefinitionTO;
+import org.apache.syncope.common.lib.to.WorkflowFormTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.IEvent;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.panel.Fragment;
@@ -89,6 +92,10 @@ public class ActionLinksTogglePanel<T extends Serializable> extends TogglePanel<
header = ((ExecTO) modelObject).getKey();
} else if (modelObject instanceof WorkflowDefinitionTO) {
header = ((WorkflowDefinitionTO) modelObject).getName();
+ } else if (modelObject instanceof SchedTaskTO) {
+ header = ((SchedTaskTO) modelObject).getName();
+ } else if (modelObject instanceof WorkflowFormTO) {
+ header = ((WorkflowFormTO) modelObject).getKey();
} else if (modelObject instanceof EntityTO) {
header = ((EntityTO) modelObject).getKey();
} else if (modelObject instanceof StatusBean) {
@@ -130,4 +137,24 @@ public class ActionLinksTogglePanel<T extends Serializable> extends TogglePanel<
private Fragment getEmptyFragment() {
return new Fragment("actions", "emptyFragment", this);
}
+
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof ActionLinkTogleCloseEventPayload) {
+ close(ActionLinkTogleCloseEventPayload.class.cast(event.getPayload()).getTarget());
+ }
+ }
+
+ public static class ActionLinkTogleCloseEventPayload {
+
+ private final AjaxRequestTarget target;
+
+ public ActionLinkTogleCloseEventPayload(final AjaxRequestTarget target) {
+ this.target = target;
+ }
+
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/841f3e63/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 b71b1d9..e7f2f04 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
@@ -28,6 +28,7 @@ import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettin
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.event.Broadcast;
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;
@@ -51,6 +52,8 @@ public final class ActionPanel<T extends Serializable> extends Panel {
private boolean disableIndicator = false;
+ private final Action<T> action;
+
public ActionPanel(final IModel<T> model, final Action<T> action) {
this("action", model, action);
}
@@ -58,6 +61,7 @@ public final class ActionPanel<T extends Serializable> extends Panel {
public ActionPanel(final String componentId, final IModel<T> model, final Action<T> action) {
super(componentId);
setOutputMarkupId(true);
+ this.action = action;
final T obj;
if (model == null) {
@@ -99,6 +103,7 @@ public final class ActionPanel<T extends Serializable> extends Panel {
@Override
public void onClick(final AjaxRequestTarget target) {
+ beforeOnClick(target);
action.getLink().onClick(target, obj);
}
@@ -114,6 +119,7 @@ public final class ActionPanel<T extends Serializable> extends Panel {
@Override
public void onClick(final AjaxRequestTarget target) {
+ beforeOnClick(target);
action.getLink().onClick(target, obj);
}
@@ -174,4 +180,17 @@ public final class ActionPanel<T extends Serializable> extends Panel {
this.disableIndicator = !action.hasIndicator();
// ---------------------------
}
+
+ protected void beforeOnClick(final AjaxRequestTarget target) {
+ switch (this.action.getType()) {
+ case DELETE:
+ case CREATE:
+ case MEMBERS:
+ case CLAIM:
+ send(this, Broadcast.BUBBLE, new ActionLinksTogglePanel.ActionLinkTogleCloseEventPayload(target));
+ break;
+ default:
+ break;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/841f3e63/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
index 92bd5f9..3891908 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
@@ -48,6 +48,7 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;
import org.apache.syncope.client.console.panels.WizardModalPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogglePanel;
import org.apache.wicket.markup.html.basic.Label;
public abstract class WizardMgtPanel<T extends Serializable> extends Panel implements IEventSource {
@@ -122,7 +123,10 @@ public abstract class WizardMgtPanel<T extends Serializable> extends Panel imple
@Override
public void onClick(final AjaxRequestTarget target) {
- send(WizardMgtPanel.this, Broadcast.EXACT, new AjaxWizard.NewItemActionEvent<T>(null, target));
+ send(WizardMgtPanel.this, Broadcast.BREADTH,
+ new ActionLinksTogglePanel.ActionLinkTogleCloseEventPayload(target));
+ send(WizardMgtPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<T>(null, target));
}
};
@@ -364,7 +368,7 @@ public abstract class WizardMgtPanel<T extends Serializable> extends Panel imple
*/
protected void customActionCallback(final AjaxRequestTarget target) {
}
-
+
/**
* Custom action to perform on close callback on finish event.
*
http://git-wip-us.apache.org/repos/asf/syncope/blob/841f3e63/client/console/src/main/resources/META-INF/resources/css/topology.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/topology.css b/client/console/src/main/resources/META-INF/resources/css/topology.css
index 6b8c120..e153619 100644
--- a/client/console/src/main/resources/META-INF/resources/css/topology.css
+++ b/client/console/src/main/resources/META-INF/resources/css/topology.css
@@ -182,7 +182,6 @@ div#zoom ul.menu {
list-style-type: none;
margin: 0;
padding: 0;
- float: right;
}
div#zoom ul.menu li {
http://git-wip-us.apache.org/repos/asf/syncope/blob/841f3e63/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
index c92d8a2..0cdf046 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
@@ -24,12 +24,16 @@ under the License.
border-radius: 5px;
background-color: rgba(120, 120, 120, 0.96);
color: #fff;
- position: absolute;
- right: 5px;
- top: 0px;
+ position: fixed;
+ right: 30px;
+ top: 180px;
width: 0px;
min-width: 250px;
- z-index: 999;
+ z-index: 999 !important;
+ }
+
+ .modal-content div.toggle-menu {
+ top: 60px !important;
}
div.toggle-menu ul.menu {