Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #115 the localization js file was loaded before the main datepi…

…cker.js
  • Loading branch information...
commit 84e19947d4e6663e412de9d44cdfbbedca0bf864 1 parent cb6a24d
@Gillespie59 Gillespie59 authored
View
33 src/main/java/org/got5/tapestry5/jquery/services/javascript/JQueryDateFieldStack.java
@@ -58,16 +58,16 @@
public JQueryDateFieldStack(final ThreadLocale threadLocale,
- @Symbol(SymbolConstants.COMPACT_JSON)
- final boolean compactJSON,
+ @Symbol(SymbolConstants.COMPACT_JSON)
+ final boolean compactJSON,
- @Symbol(SymbolConstants.PRODUCTION_MODE)
- final boolean productionMode,
+ @Symbol(SymbolConstants.PRODUCTION_MODE)
+ final boolean productionMode,
- final AssetSource assetSource,
+ final AssetSource assetSource,
- final TypeCoercer typeCoercer,
- final SymbolSource symbolSource)
+ final TypeCoercer typeCoercer,
+ final SymbolSource symbolSource)
{
this.threadLocale = threadLocale;
this.assetSource = assetSource;
@@ -126,22 +126,19 @@ public String getInitialization()
jQueryUIPath += "/";
}
- final Asset datePickerI18nAsset = getLocaleAsset(threadLocale.getLocale(), jQueryUIPath);
+ final List<Asset> javaScriptStack = new ArrayList<Asset>();
- final List<Asset> javaScriptStack = new ArrayList<Asset>();
+ javaScriptStack.add(assetSource.getClasspathAsset(String.format("%s%s/jquery.ui.datepicker%s.js", jQueryUIPath,
+ (!productionMode ? "/minified" : ""),
+ (!productionMode ? ".min" : ""))));
- if (datePickerI18nAsset != null)
+ final Asset datePickerI18nAsset = getLocaleAsset(threadLocale.getLocale(), jQueryUIPath);
+
+ if (datePickerI18nAsset != null)
{
javaScriptStack.add(datePickerI18nAsset);
}
-
- if (productionMode) {
-
- javaScriptStack.add(assetSource.getClasspathAsset(String.format("%s%s", jQueryUIPath, "/minified/jquery.ui.datepicker.min.js")));
- }
-
- javaScriptStack.add(assetSource.getClasspathAsset(String.format("%s%s", jQueryUIPath, "/jquery.ui.datepicker.js")));
-
+
javaScriptStack.add(assetSource.getExpandedAsset("${assets.path}/components/datefield/datefield.js"));
return javaScriptStack;
View
1  src/test/java/org/got5/tapestry5/jquery/pages/CalendarInZone.java
@@ -3,7 +3,6 @@
import java.util.Date;
import java.util.Locale;
-import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
Please sign in to comment.
Something went wrong with that request. Please try again.