syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject syncope git commit: [SYNCOPE-804] Using popover insted of plain title
Date Mon, 04 Apr 2016 09:54:07 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 15b9e4e15 -> 7857936e6


[SYNCOPE-804] Using popover insted of plain title


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7857936e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7857936e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7857936e

Branch: refs/heads/master
Commit: 7857936e65328ab8d2b4d7753cde7dac1abf6ae1
Parents: 15b9e4e
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Apr 4 11:53:53 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Apr 4 11:53:53 2016 +0200

----------------------------------------------------------------------
 .../client/console/panels/AbstractConnectorConfPanel.java |  9 ++-------
 .../syncope/client/console/panels/ConnectorConfPanel.java |  4 +---
 .../client/console/panels/ResourceConnConfPanel.java      |  6 +++---
 .../console/wicket/markup/html/form/FieldPanel.java       | 10 +++++++++-
 .../wicket/markup/html/list/ConnConfPropertyListView.java |  1 +
 5 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/7857936e/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
index 3b24fad..ef32372 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
@@ -68,7 +68,7 @@ public abstract class AbstractConnectorConfPanel<T extends AbstractBaseBean>
ext
     }
 
     protected void setConfPropertyListView(final String modelExpression, final boolean withOverridable)
{
-        final ConnConfPropertyListView connPropView = new ConnConfPropertyListView(
+        propertiesContainer.add(new ConnConfPropertyListView(
                 "connectorProperties",
                 new PropertyModel<List<ConnConfProperty>>(model.getObject(),
modelExpression) {
 
@@ -93,12 +93,7 @@ public abstract class AbstractConnectorConfPanel<T extends AbstractBaseBean>
ext
 
                 return res;
             }
-        },
-                withOverridable
-        );
-
-        connPropView.setOutputMarkupId(true);
-        propertiesContainer.add(connPropView);
+        }, withOverridable).setOutputMarkupId(true));
     }
 
     protected abstract void check(final AjaxRequestTarget taget);

http://git-wip-us.apache.org/repos/asf/syncope/blob/7857936e/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
index 0c541b5..f142e0f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
@@ -53,7 +53,7 @@ public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<Conn
      */
     @Override
     protected final List<ConnConfProperty> getConnProperties(final ConnInstanceTO instance)
{
-        final List<ConnConfProperty> res = CollectionUtils.collect(
+        return CollectionUtils.collect(
                 ConnectorModal.getBundle(instance, bundles).getProperties(),
                 new Transformer<ConnConfPropSchema, ConnConfProperty>() {
 
@@ -76,7 +76,5 @@ public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<Conn
                 return property;
             }
         }, new ArrayList<ConnConfProperty>());
-
-        return res;
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/7857936e/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index a838a47..fb58ddc 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -59,9 +59,9 @@ public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<R
     @Override
     protected final List<ConnConfProperty> getConnProperties(final ResourceTO resourceTO)
{
         List<ConnConfProperty> props = new ArrayList<>();
-        Long connectorKey = resourceTO.getConnector();
-        if (connectorKey != null && connectorKey > 0) {
-            for (ConnConfProperty property : restClient.read(connectorKey).getConf()) {
+
+        if (resourceTO.getConnector() != null && resourceTO.getConnector() > 0)
{
+            for (ConnConfProperty property : restClient.read(resourceTO.getConnector()).getConf())
{
                 if (property.isOverridable()) {
                     props.add(property);
                 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/7857936e/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
index 23c4e51..2d51d8e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.client.console.wicket.markup.html.form;
 
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.PopoverBehavior;
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.PopoverConfig;
+import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig;
 import java.io.Serializable;
 import java.util.List;
 import org.apache.commons.lang3.SerializationUtils;
@@ -58,7 +61,12 @@ public abstract class FieldPanel<T extends Serializable> extends
AbstractFieldPa
 
     public FieldPanel<T> setTitle(final String title) {
         this.title = title;
-        field.add(AttributeModifier.replace("title", title == null ? StringUtils.EMPTY :
title));
+        field.add(new PopoverBehavior(
+                Model.<String>of(),
+                title == null ? Model.<String>of() : Model.of(title),
+                new PopoverConfig().withHoverTrigger().withPlacement(
+                        index.getObject() != null && index.getObject() == 0
+                                ? TooltipConfig.Placement.bottom : TooltipConfig.Placement.top)));
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/7857936e/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index d5445f1..6710f73 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@ -113,6 +113,7 @@ public class ConnConfPropertyListView extends ListView<ConnConfProperty>
{
             }
         }
 
+        field.setIndex(item.getIndex());
         field.setTitle(property.getSchema().getHelpMessage());
 
         final AbstractFieldPanel<? extends Serializable> fieldPanel;


Mime
View raw message