myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1607642 [9/9] - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/ tobago-core/src/test/java/org/apache/myfaces/tobago/renderk...
Date Thu, 03 Jul 2014 13:24:07 GMT
Added: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-timepicker-addon-resources.sh
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-timepicker-addon-resources.sh?rev=1607642&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-timepicker-addon-resources.sh
(added)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-timepicker-addon-resources.sh
Thu Jul  3 13:24:03 2014
@@ -0,0 +1,33 @@
+#! /bin/bash
+
+# Please call this script in its directory
+
+# Click "Download" on this site https://github.com/trentrichardson/jQuery-Timepicker-Addon/archive/v1.4.5.zip
+# Unpack the ZIP in a directory and set it here:
+SOURCE=~/Downloads/jQuery-Timepicker-Addon-1.4.5
+TARGET=../../main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard
+VERSION=1.4.5
+
+# Scripts
+
+cp ${SOURCE}/dist/jquery-ui-timepicker-addon.js ${TARGET}/script/contrib/jquery-ui-timepicker-addon-${VERSION}.js
+
+for FILE in $(find ${SOURCE}/dist/i18n -type file -name "jquery-ui-timepicker-*.js") ; do
+  # echo ${FILE};
+  # e.g. jquery-ui-timepicker-zh-TW.js -> jquery-ui-timepicker-$VERSION_zh_TW.js
+  LOCALE=`basename ${FILE} | sed "s|jquery-ui-timepicker-||g" | sed "s|.js||g"| sed "s|-|_|g"`
+
+  if [[ "${LOCALE}" == "addon_i18n" || "${LOCALE}" == "addon_i18n.min" ]]; then
+    # echo "ignoring '${LOCALE}', because we need not the summerized version"
+    continue;
+  fi
+
+  NAME=jquery-ui-timepicker-i18n-${VERSION}_${LOCALE}.js
+  cp ${FILE} ${TARGET}/script/contrib/${NAME}
+done
+
+# Styles
+
+cp ${SOURCE}/dist/jquery-ui-timepicker-addon.css ${TARGET}/style/contrib/jquery-ui-timepicker-addon-${VERSION}.css
+
+# Check the svn diff now!

Propchange: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/origin/external/prepare-jquery-ui-timepicker-addon-resources.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/html/JsonUtilsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/html/JsonUtilsUnitTest.java?rev=1607642&r1=1607641&r2=1607642&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/html/JsonUtilsUnitTest.java
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/html/JsonUtilsUnitTest.java
Thu Jul  3 13:24:03 2014
@@ -24,10 +24,13 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
 import org.apache.myfaces.tobago.internal.config.AbstractTobagoTestBase;
+import org.apache.myfaces.tobago.internal.context.DateTimeI18n;
 import org.apache.myfaces.tobago.util.CreateComponentUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.util.Locale;
+
 // using ' instead of " to make it better readable.
 
 public class JsonUtilsUnitTest extends AbstractTobagoTestBase {
@@ -77,7 +80,7 @@ public class JsonUtilsUnitTest extends A
     final AbstractUICommand command = (AbstractUICommand)
         CreateComponentUtils.createComponent(facesContext, ComponentTypes.BUTTON, RendererTypes.BUTTON,
"command");
     command.getAttributes().put(Attributes.POPUP_CLOSE, "immediate");
-    command.setRenderedPartially(new String[] {"popup"});
+    command.setRenderedPartially(new String[]{"popup"});
 
     map.setClick(new Command(
         "ns:actionId", false, "_blank", "http://www.apache.org/", new String[]{"id1", "id2"},
"id_focus",
@@ -103,4 +106,19 @@ public class JsonUtilsUnitTest extends A
     Assert.assertEquals(expected, JsonUtils.encode(map));
   }
 
+  @Test
+  public void monthNames() {
+    final DateTimeI18n dateTimeI18n = DateTimeI18n.valueOf(Locale.GERMANY);
+    final String expected
+        = ("{'monthNames':['Januar','Februar','März','April','Mai','Juni',"
+        + "'Juli','August','September','Oktober','November','Dezember'],"
+        + "'monthNamesShort':['Jan','Feb','Mrz','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],"
+        + "'dayNames':['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],"
+        + "'dayNamesShort':['So','Mo','Di','Mi','Do','Fr','Sa'],"
+        + "'dayNamesMin':['So','Mo','Di','Mi','Do','Fr','Sa'],"
+        + "'firstDay':1}").replaceAll("'", "\"");
+
+    Assert.assertEquals(expected, JsonUtils.encode(dateTimeI18n));
+  }
+
 }



Mime
View raw message