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/10/24 18:51:19 UTC

[15/15] git commit: Revert change, leaving core/t53-compatibility as a separate library - necessary because libraries are loaded before module dependencies

Revert change, leaving core/t53-compatibility as a separate library
- necessary because libraries are loaded before module dependencies


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

Branch: refs/heads/5.4-js-rewrite
Commit: 1ab1c6c1a89a4e9e49efb7b340fb7df0b60b0a29
Parents: eec74fc
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Wed Oct 24 09:20:25 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Wed Oct 24 09:20:25 2012 -0700

----------------------------------------------------------------------
 .../coffeescript/META-INF/modules/core/init.coffee |   44 +-------------
 .../services/javascript/CoreJavaScriptStack.java   |    2 +
 2 files changed, 6 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1ab1c6c1/tapestry-core/src/main/coffeescript/META-INF/modules/core/init.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/init.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/init.coffee
index ceb7211..ef81235 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/init.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/init.coffee
@@ -14,47 +14,11 @@
 
 # ## core/init
 #
-# Tapestry 5.3 compatibility module, invokes functions on the T5.initializers namespace.
+# Compatibility module, invokes functions on the T5.initializers namespace.
 #
-# Provides a small amount of backwards compatibility to the Tapestry 5.3 approach.
-# This provides placeholders for the following:
-#
-# * `T5` namespace, including `extend`, `define`, and `initializers`, `extendInitializers`, and `_` properties
-# * `Tapestry` namespace: just the `Initializer` property, as an alias of `T5.initializers`
-#
-# Introduced in 5.4, to be removed in the next release.
-define ["core/console", "_"],
-
-  (console, _) ->
-
-    extend = (destination, source) ->
-      if _.isFunction source
-        source = source()
-
-      _.extend destination, source
-
-    T5 =
-      _: _.noConflict()
-      extend: extend
-
-      define: (name, source) ->
-
-        namespace = extend {}, source
-
-        T5[name] = namespace
-
-      initializers: {}
-
-      extendInitializers: (source) ->
-
-        extend T5.initializers, source
-
-    Tapestry =
-      Initializer: T5.initializers
-
-    window.T5 = T5
-    window.Tapestry = Tapestry
-
+# Introduced in 5.4, to be removed at some point in the future, when T5.initializers is itself no more.
+define ["core/console", "core/t53-compatibility"], ->
+  (console) ->
     # Exports a single function that finds an initializer in `T5.initializers` and invokes it.
     (initName, args...) ->
       fn = T5.initializers[initName]

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1ab1c6c1/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 74bbd1a..143cdeb 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
@@ -60,6 +60,8 @@ public class CoreJavaScriptStack implements JavaScriptStack
 
                     // TODO: Possibly extract prototype/scriptaculous/jquery from the stack
                     // (as has been done with Underscore), and convert to a shimmed module.
+
+                    ROOT + "/t53-compatibility.js"
             };
 
     // Because of changes to the logic of how stylesheets get incorporated, the default stylesheet