syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdisabat...@apache.org
Subject syncope git commit: [SYNCOPE-779] Added internationalization to Kendo UI DateTimePicker
Date Tue, 24 Jan 2017 16:33:15 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 00ac28317 -> 5bb61d482


[SYNCOPE-779] Added internationalization to Kendo UI DateTimePicker


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

Branch: refs/heads/master
Commit: 5bb61d482997e45be7560f117ffba0bb21c3a5d3
Parents: 00ac283
Author: Marco Di Sabatino Di Diodoro <mdisabatino@apache.org>
Authored: Tue Jan 24 17:31:05 2017 +0100
Committer: Marco Di Sabatino Di Diodoro <mdisabatino@apache.org>
Committed: Tue Jan 24 17:32:47 2017 +0100

----------------------------------------------------------------------
 client/console/pom.xml                                    |  4 ++++
 .../console/wicket/markup/html/form/DateFieldPanel.java   | 10 ++++++++++
 pom.xml                                                   |  5 +++++
 3 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/5bb61d48/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
index 9a567c3..8898a01 100644
--- a/client/console/pom.xml
+++ b/client/console/pom.xml
@@ -76,6 +76,10 @@ under the License.
     </dependency>
     <dependency>
       <groupId>com.googlecode.wicket-jquery-ui</groupId>
+      <artifactId>wicket-kendo-ui-culture</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.googlecode.wicket-jquery-ui</groupId>
       <artifactId>wicket-kendo-ui-theme-bootstrap</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/syncope/blob/5bb61d48/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
index 4ae788e..806f09d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
@@ -18,12 +18,15 @@
  */
 package org.apache.syncope.client.console.wicket.markup.html.form;
 
+import com.googlecode.wicket.kendo.ui.resource.KendoCultureResourceReference;
 import java.io.Serializable;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.List;
 import org.apache.commons.lang3.time.FastDateFormat;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
@@ -119,4 +122,11 @@ public class DateFieldPanel extends FieldPanel<Date> {
         field.setModel(model);
         return this;
     }
+
+    @Override
+    public void renderHead(final IHeaderResponse response) {
+        super.renderHead(response);
+        response.render(JavaScriptHeaderItem.forReference(
+                new KendoCultureResourceReference(SyncopeConsoleSession.get().getDateFormat().getLocale())));
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/5bb61d48/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 13486f0..2210c4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -987,6 +987,11 @@ under the License.
       </dependency>
       <dependency>
         <groupId>com.googlecode.wicket-jquery-ui</groupId>
+        <artifactId>wicket-kendo-ui-culture</artifactId>
+        <version>${wicket-jqueryui.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.googlecode.wicket-jquery-ui</groupId>
         <artifactId>wicket-kendo-ui-theme-bootstrap</artifactId>
         <version>${wicket-jqueryui.version}</version>
       </dependency>


Mime
View raw message