You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/03/29 17:55:56 UTC

[2/2] syncope git commit: [SYNCOPE-816] Fix

[SYNCOPE-816] Fix


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

Branch: refs/heads/master
Commit: 3d587889ddf74d48d5fc0dd95a63976625c2b6da
Parents: 6a432b9
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Mar 29 17:55:14 2016 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Mar 29 17:55:14 2016 +0200

----------------------------------------------------------------------
 .../client/console/wizards/any/PlainAttrs.java     | 11 +++++++++++
 .../client/console/wizards/any/PlainAttrs.html     |  1 +
 .../console/wizards/any/PlainAttrs.properties      | 17 +++++++++++++++++
 .../console/wizards/any/PlainAttrs_it.properties   | 17 +++++++++++++++++
 .../wizards/any/PlainAttrs_pt_BR.properties        | 17 +++++++++++++++++
 5 files changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/3d587889/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index 8ece7c6..5f987ac 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -50,6 +50,8 @@ import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
@@ -94,6 +96,15 @@ public class PlainAttrs extends AbstractAttrs {
             private static final long serialVersionUID = 9101744072914090143L;
 
             @Override
+            public void renderHead(final IHeaderResponse response) {
+                super.renderHead(response);
+                if (plainAttrTOs.getObject().isEmpty()) {
+                    response.render(OnDomReadyHeaderItem.forScript(
+                            String.format("$('#emptyPlaceholder').append(\"%s\")", getString("attribute.empty.list"))));
+                }
+            }
+
+            @Override
             @SuppressWarnings({ "unchecked", "rawtypes" })
             protected void populateItem(final ListItem<AttrTO> item) {
                 final AttrTO attributeTO = (AttrTO) item.getDefaultModelObject();

http://git-wip-us.apache.org/repos/asf/syncope/blob/3d587889/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
index cfad334..b43206a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
@@ -20,6 +20,7 @@ under the License.
   <head><title></title></head>
   <body>
     <wicket:panel>
+      <div id="emptyPlaceholder"/>
       <div wicket:id="schemas">
         <div class="form-group">
           <span wicket:id="panel">

http://git-wip-us.apache.org/repos/asf/syncope/blob/3d587889/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.properties
new file mode 100644
index 0000000..3f24f07
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+attribute.empty.list=No plain attributes available

http://git-wip-us.apache.org/repos/asf/syncope/blob/3d587889/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_it.properties
new file mode 100644
index 0000000..34c3081
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+attribute.empty.list=Non ci sono attributi disponibili

http://git-wip-us.apache.org/repos/asf/syncope/blob/3d587889/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_pt_BR.properties
new file mode 100644
index 0000000..1d932cf
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+attribute.empty.list=Sem atributos dispon\u00edveis