You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/08/03 23:33:10 UTC

[1/10] git commit: Fix most of the remaining tests

Updated Branches:
  refs/heads/5.4-js-rewrite b0e1e9b1b -> 7a7a27483


Fix most of the remaining tests


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

Branch: refs/heads/5.4-js-rewrite
Commit: 7a7a27483699e07fb3c72fa5d26612dd21415bbf
Parents: a7b4462
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Aug 3 14:32:56 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Aug 3 14:32:56 2012 -0700

----------------------------------------------------------------------
 .../services/javascript/CoreJavaScriptStack.java   |    2 -
 .../resources/org/apache/tapestry5/t5-prototype.js |    4 +-
 .../main/resources/org/apache/tapestry5/t5-spi.js  |   81 ---------------
 3 files changed, 2 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7a7a2748/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java
index eeafb61..6e822dc 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavaScriptStack.java
@@ -82,8 +82,6 @@ public class CoreJavaScriptStack implements JavaScriptStack
 
                     ROOT + "/t5-core.js",
 
-                    ROOT + "/t5-spi.js",
-
                     ROOT + "/t5-prototype.js",
 
                     ROOT + "/t5-init.js",

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7a7a2748/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
index 992b30f..183b2ea 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
@@ -18,8 +18,8 @@
  * Prototype JavaScript library. May also make modifications to Prototype to
  * work with Tapestry.
  */
-define("core/compat/t5-prototype", ["core/compat/t5-spi"], function () {
-    T5.extend(T5.spi, function () {
+define("core/compat/t5-spi", ["core/compat/t5", "core/compat/t5-events", "core/compat/t5-pubsub"], function () {
+    T5.define("spi", function () {
 
         function observe(element, eventName, listener) {
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7a7a2748/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js
deleted file mode 100644
index e6a245e..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-spi.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright 2011, 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.
- */
-
-/**
- * Defines the SPI (service provider interface). This represents an abstract
- * layer between Tapestry's JavaScript and an underlying framework (such as
- * Prototype and JQuery).
- *
- * <p>
- * The SPI defines placeholders for functions whose implementations are provided
- * elsewhere. In some cases, an SPI may define a function in terms of other SPI
- * functions; a framework layer may leave such a function alone or re-implement
- * it.
- */
-define("core/compat/t5-spi", ["core/compat/t5"], function () {
-    T5.define("spi", {
-
-        /**
-         * Observes a DOM event.
-         *
-         *  @param element DOM element or element id
-         *  @param event name of event to observe
-         *  @param listener function to be invoked; the function is passed the DOM event object
-         *  @return cancel function to stop observing the event with the listener
-         */
-        observe: undefined,
-
-        /**
-         * Find the first child element matching a CSS selector.
-         *
-         * @param element DOM element or element id
-         * @param selector CSS selector to locate
-         * @return the element, or undefined if not found
-         */
-        find: undefined,
-
-        /** Hides an element making it invisible.
-         * @param element DOM element or element id
-         */
-        hide: undefined,
-
-        /** Reveals an element, making it visible again.
-         *
-         * @param element DOM element or element id
-         */
-        show: undefined,
-
-        /**
-         * Appends new markup to an existing element's body.
-         *
-         * @param element DOM element or element id
-         * @param markup new content as markup string
-         * @return element
-         */
-        appendMarkup: undefined,
-
-        /**
-         * Performs an ajax request, as per T5.ajax.request(). Supplied by the SPI
-         * implementation. The options parameter is not yet fully defined in Tapestry 5.3
-         * (this SPI function is not yet used anywhere).
-         *
-         * @param url
-         *            URL for Ajax request
-         * @param options
-         *            additional options defined by T5.ajax.request().
-         */
-        ajaxRequest: undefined
-    });
-});
\ No newline at end of file