Updated Branches: refs/heads/5.4-js-rewrite 45988e062 -> 4b5043fb0
Create an empty placeholder for the DateField component's client-side logic Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4b5043fb Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4b5043fb Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4b5043fb Branch: refs/heads/5.4-js-rewrite Commit: 4b5043fb08803d57e8c6b310a5e38076a07336ab Parents: 388594d Author: Howard M. Lewis Ship <[email protected]> Authored: Thu Nov 8 14:05:51 2012 -0800 Committer: Howard M. Lewis Ship <[email protected]> Committed: Thu Nov 8 14:05:51 2012 -0800 ---------------------------------------------------------------------- .../META-INF/modules/core/datefield.coffee | 22 +++++++++++++++ .../tapestry5/corelib/components/DateField.java | 14 ++------- 2 files changed, 25 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4b5043fb/tapestry-core/src/main/coffeescript/META-INF/modules/core/datefield.coffee ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/datefield.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/datefield.coffee new file mode 100644 index 0000000..a69c43e --- /dev/null +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/datefield.coffee @@ -0,0 +1,22 @@ +# Copyright 2012 The Apache Software Foundation +# +# Licensed 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. + +# ##core/datefield +# +# Provides support for the `core/DateField` component. +define ["core/dom", "core/events"], + (dom, events) -> + + # Exports nothing. + return null \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4b5043fb/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java index 5fdaafa..de3b136 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java @@ -49,7 +49,9 @@ import java.util.Locale; * @see TextField */ // TODO: More testing; see https://issues.apache.org/jira/browse/TAPESTRY-1844 -@Import(library = "${tapestry.datepicker}/js/datepicker.js", stylesheet = "${tapestry.datepicker}/css/datepicker.css") +@Import(library = "${tapestry.datepicker}/js/datepicker.js", + stylesheet = "${tapestry.datepicker}/css/datepicker.css", + module = "core/datefield") @Events(EventConstants.VALIDATE) public class DateField extends AbstractField { @@ -237,7 +239,6 @@ public class DateField extends AbstractField writer.end(); - writer.element("button", "class", "btn", "alt", "[Show]"); @@ -245,16 +246,7 @@ public class DateField extends AbstractField writer.end(); writer.end(); - writer.end(); // outer div - -// JSONObject spec = new JSONObject(); -// -// spec.put("field", clientId); -// spec.put("parseURL", resources.createEventLink("parse").toURI()); -// spec.put("formatURL", resources.createEventLink("format").toURI()); -// -// javaScriptSupport.addInitializerCall("dateField", spec); } private void writeDisabled(MarkupWriter writer)
