You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/10/24 02:30:15 UTC
[2/2] git commit: Strip down the "legacy" JavaScript to be just
enough to support T5.initializers/Tapestry.Initializer
Strip down the "legacy" JavaScript to be just enough to support T5.initializers/Tapestry.Initializer
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b15151eb
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b15151eb
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b15151eb
Branch: refs/heads/5.4-js-rewrite
Commit: b15151eb27aecfa5f1f6a12cf69d74d9b140e913
Parents: 78aeeb4
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Oct 23 17:21:03 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Oct 23 17:21:03 2012 -0700
----------------------------------------------------------------------
.../META-INF/modules/core/form-fragment.coffee | 2 +-
.../coffeescript/META-INF/modules/core/init.coffee | 16 +-
.../META-INF/modules/core/pageinit.coffee | 11 +-
.../services/javascript/CoreJavaScriptStack.java | 61 +---
.../services/javascript/JavaScriptStack.java | 17 +-
.../resources/org/apache/tapestry5/t5-alerts.js | 130 -------
.../resources/org/apache/tapestry5/t5-console.js | 19 -
.../main/resources/org/apache/tapestry5/t5-core.js | 109 ------
.../main/resources/org/apache/tapestry5/t5-dom.js | 159 ---------
.../resources/org/apache/tapestry5/t5-events.js | 45 ---
.../resources/org/apache/tapestry5/t5-forceload.js | 28 --
.../main/resources/org/apache/tapestry5/t5-init.js | 39 --
.../resources/org/apache/tapestry5/t5-prototype.js | 61 ----
.../resources/org/apache/tapestry5/t5-pubsub.js | 270 ---------------
.../org/apache/tapestry5/t53-compatibility.js | 49 +++
.../org/apache/tapestry5/tapestry-debug.js | 18 -
.../org/apache/tapestry5/tapestry-messages.js | 43 ---
.../org/apache/tapestry5/tapestry-messages_de.js | 42 ---
.../apache/tapestry5/tapestry-messages_fi_FI.js | 40 ---
.../resources/org/apache/tapestry5/tapestry.js | 2 +
.../main/resources/org/apache/tapestry5/tree.js | 3 +
.../integration/app1/pages/nested/ZoneDemo.java | 6 +-
22 files changed, 89 insertions(+), 1081 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/coffeescript/META-INF/modules/core/form-fragment.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/form-fragment.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/form-fragment.coffee
index 1d130a5..7b126c3 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/form-fragment.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/form-fragment.coffee
@@ -15,7 +15,7 @@
# ##core/form-fragment
#
-define ["_", "core/spi", "core/events", "core/compat/tapestry"],
+define ["_", "core/spi", "core/events"],
(_, spi, events) ->
SELECTOR = '[data-component-type="core/FormFragment"]'
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/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 95d2a80..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
@@ -17,10 +17,12 @@
# Compatibility module, invokes functions on the T5.initializers namespace.
#
# Introduced in 5.4, to be removed at some point in the future, when T5.initializers is itself no more.
-define ["core/compat/t5-init", "core/console"], ->
- (initName, args...) ->
- fn = T5.initializers[initName]
- if not fn
- console.error "Initialization function '#{initName}' not found in T5.initializers namespace."
- else
- fn.apply null, args
+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]
+ if not fn
+ console.error "Initialization function '#{initName}' not found in T5.initializers namespace."
+ else
+ fn.apply null, args
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
index 6efe766..dcbabdc 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
@@ -141,13 +141,12 @@ define ["_", "core/console", "core/spi", "core/events"],
# earlier, where dependencies were exclusively defined in terms of load order (and there were lots of globals).
loadLibrariesAndInitialize: (coreLibraries, libraries, immediateInits, otherInits) ->
exports.loadLibraries coreLibraries, ->
- require ["core/compat/t5-forceload"], ->
- console.debug "#{coreLibraries.length} core libraries loaded"
- exports.loadLibraries libraries, ->
- console.debug "#{libraries?.length or 0} additional libraries loaded"
- exports.initialize immediateInits
+ console.debug "#{coreLibraries?.length or 0} core libraries loaded"
+ exports.loadLibraries libraries, ->
+ console.debug "#{libraries?.length or 0} additional libraries loaded"
+ exports.initialize immediateInits
- spi.domReady -> exports.initialize otherInits
+ spi.domReady -> exports.initialize otherInits
evalJavaScript: (js) ->
console.debug "Evaluating: #{js}"
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/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 51bc1eb..e8237d2 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
@@ -15,14 +15,11 @@
package org.apache.tapestry5.internal.services.javascript;
import org.apache.tapestry5.Asset;
-import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.func.F;
import org.apache.tapestry5.func.Flow;
import org.apache.tapestry5.func.Mapper;
import org.apache.tapestry5.internal.TapestryInternalUtils;
-import org.apache.tapestry5.ioc.annotations.Symbol;
import org.apache.tapestry5.ioc.services.SymbolSource;
-import org.apache.tapestry5.ioc.services.ThreadLocale;
import org.apache.tapestry5.services.AssetSource;
import org.apache.tapestry5.services.javascript.JavaScriptStack;
import org.apache.tapestry5.services.javascript.StylesheetLink;
@@ -42,12 +39,8 @@ public class CoreJavaScriptStack implements JavaScriptStack
private final AssetSource assetSource;
- private final ThreadLocale threadLocale;
-
private final Flow<Asset> javaScriptStack, stylesheetStack;
- private final Asset forceload;
-
private static final String ROOT = "org/apache/tapestry5";
private static final String[] CORE_JAVASCRIPT = new String[]
@@ -63,38 +56,12 @@ public class CoreJavaScriptStack implements JavaScriptStack
"${tapestry.scriptaculous}/effects.js",
// TODO: Include jQuery based on configuration
+ // .... probably be generally available as module "$"
// TODO: Possibly extract prototype/scriptaculous/jquery from the stack
// (as has been done with Underscore), and convert to a shimmed module.
- // Below uses functions defined by the above.
-
- // Order is important, there are some dependencies
- // going on here. Switching over to a more managed module system
- // is starting to look like a really nice idea!
-
- // Update: most (all?) of these have been rewritten to use require() or define()
- // to help manage dependencies, but there's likely some bugs in there!
-
- ROOT + "/t5-core.js",
-
- ROOT + "/t5-prototype.js",
-
- ROOT + "/t5-init.js",
-
- ROOT + "/t5-pubsub.js",
-
- ROOT + "/t5-events.js",
-
- ROOT + "/t5-dom.js",
-
- ROOT + "/t5-console.js",
-
- ROOT + "/t5-alerts.js",
-
- ROOT + "/tapestry.js",
-
- ROOT + "/tree.js",
+ ROOT + "/t53-compatibility.js",
};
// Because of changes to the logic of how stylesheets get incorporated, the default stylesheet
@@ -104,6 +71,8 @@ public class CoreJavaScriptStack implements JavaScriptStack
{
"${tapestry.bootstrap-root}/css/bootstrap.css",
+ // The following are mostly temporary:
+
ROOT + "/tapestry-console.css",
ROOT + "/t5-alerts.css",
@@ -111,30 +80,16 @@ public class CoreJavaScriptStack implements JavaScriptStack
ROOT + "/tree.css"
};
- public CoreJavaScriptStack(
- @Symbol(SymbolConstants.PRODUCTION_MODE)
- boolean productionMode,
-
- SymbolSource symbolSource,
-
- AssetSource assetSource,
-
- ThreadLocale threadLocale)
+ public CoreJavaScriptStack(SymbolSource symbolSource, AssetSource assetSource)
{
this.symbolSource = symbolSource;
this.assetSource = assetSource;
- this.threadLocale = threadLocale;
Flow<String> coreJavascript = F.flow(CORE_JAVASCRIPT);
- Flow<String> javaScript = productionMode
- ? coreJavascript
- : coreJavascript.append(ROOT + "/tapestry-debug.js");
-
- javaScriptStack = convertToAssets(javaScript);
+ javaScriptStack = convertToAssets(coreJavascript);
stylesheetStack = convertToAssets(F.flow(CORE_STYLESHEET));
- forceload = expand(ROOT + "/t5-forceload.js", null);
}
public String getInitialization()
@@ -168,9 +123,7 @@ public class CoreJavaScriptStack implements JavaScriptStack
public List<Asset> getJavaScriptLibraries()
{
- Asset messages = expand(ROOT + "/tapestry-messages.js", threadLocale.getLocale());
-
- return javaScriptStack.append(messages, forceload).toList();
+ return javaScriptStack.toList();
}
public List<StylesheetLink> getStylesheets()
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java
index 6924ab4..1106e2d 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptStack.java
@@ -1,4 +1,4 @@
-// Copyright 2010 The Apache Software Foundation
+// Copyright 2010, 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.
@@ -14,30 +14,30 @@
package org.apache.tapestry5.services.javascript;
-import java.util.List;
-
import org.apache.tapestry5.Asset;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.ioc.services.ThreadLocale;
import org.apache.tapestry5.services.AssetSource;
+import java.util.List;
+
/**
* A high level description of a group of related JavaScript libraries and stylesheets. The built-in "core"
* stack is used to define the core JavaScript libraries needed by Tapestry (currently, this includes
* Prototype and Scriptaculous, as well as Tapestry-specific libraries). Other component libraries may
* define additional stacks for related sets of resources, for example, to bundle together some portion
* of the ExtJS or YUI libraries.
- * <p>
+ * <p/>
* A JavaScript assets of a stack may (when {@linkplain SymbolConstants#COMBINE_SCRIPTS enabled}) be exposed to the
* client as a single URL (identifying the stack by name). The individual assets are combined into a single virtual
* asset, which is then streamed to the client.
- * <p>
+ * <p/>
* Implementations may need to inject the {@link ThreadLocale} service in order to determine the current locale (if any
* of the JavaScript library or stylesheet assets are localized). They will generally need to inject the
* {@link AssetSource} service as well.
- *
- * @since 5.2.0
+ *
* @see ThreadLocale
+ * @since 5.2.0
*/
public interface JavaScriptStack
{
@@ -63,6 +63,9 @@ public interface JavaScriptStack
* page that imports the stack. The code executes outside of any other function (i.e., the code is not deferred
* until the DOM is loaded). As with the other methods, if localization is a factor, the result of this method
* should be localized.
+ *
+ * @deprecated No longer used in Tapestry 5.4; may be removed in a future release. Implementations
+ * may return null.
*/
String getInitialization();
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js
deleted file mode 100644
index d2e4986..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.js
+++ /dev/null
@@ -1,130 +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.
- */
-
-define("core/compat/t5-alerts", ["core/ajax",
- "core/compat/t5-dom",
- "core/compat/t5-init",
- "core/compat/t5-pubsub"], function (ajax) {
- T5.extendInitializers(function () {
-
- var $ = T5.$;
- var on = T5.dom.observe;
- var find = T5.dom.find;
- var DISMISS_ALERTS = "tapestry:dismiss-all";
- var addAlertPublisher = T5.pubsub.createPublisher(T5.events.ADD_ALERT, document);
-
- function construct(clientId, dismissText) {
- $(clientId).innerHTML = "<div class='t-alert-container'></div>" +
- "<div class='t-alert-controls'><a href='#'>" + dismissText + "</a></div>";
-
- var list = find(clientId, "div");
- var link = find(clientId, "a");
-
- T5.dom.publishEvent(link, "click", DISMISS_ALERTS);
-
- return list;
- }
-
- /**
- * Specification with keys:
- * <dl>
- * <dt>id</dt> <dd>id of empty client element</dd>
- * <dt>dismissURL</dt> <dd>URL used to dismiss an alert</dd>
- * </dl>
- */
- function alertManager(spec) {
-
- var visible = true;
- var constructed = false;
- var list = null;
-
- T5.sub(DISMISS_ALERTS, null, function () {
- if (constructed) {
- visible = false;
- T5.dom.hide(spec.id);
- visible = false;
-
- T5.dom.removeChildren(list);
-
- // Don't care about the response.
- ajax(spec.dismissURL);
- }
- });
-
- // For the moment, there's a bit of prototype linkage here.
-
- T5.sub(T5.events.ADD_ALERT, null, function (alertSpec) {
- if (!constructed) {
- list = construct(spec.id, spec.dismissText);
- constructed = true;
- }
-
- if (!visible) {
- T5.dom.show(spec.id);
- visible = true;
- }
-
- // This part is Prototype specific, alas.
-
- var alertDiv = new Element("div", { "class": alertSpec['class'] }).update("<div class='t-dismiss' title='Dismiss'></div>" +
- "<div class='t-message-container'>" + alertSpec.message + "</div>");
-
- list.insert({ bottom: alertDiv});
-
- var dismiss = find(alertDiv, ".t-dismiss");
-
-
- function removeAlert() {
- T5.dom.remove(alertDiv);
- if (list.innerHTML == '') {
- T5.dom.hide(spec.id);
- visible = false;
- }
- }
-
- // transient is a reserved word in JavaScript, which cause YUICompressor
- // to fail.
- if (alertSpec['transient']) {
- setTimeout(removeAlert, T5.alerts.TRANSIENT_DELAY);
- }
-
- on(dismiss, "click", function (event) {
- event.stop();
-
- removeAlert();
-
- // Send a request, we don't care about the response.
-
- if (alertSpec.id) {
- ajax(spec.dismissURL,
- { parameters: { id: alertSpec.id }});
- }
- });
-
- });
- }
-
- return {
- alertManager: alertManager,
- addAlert: addAlertPublisher
- };
- });
-
- T5.define('alerts', {
- /** Time, in ms, that a transient message is displayed before automatically dismissing. */
- TRANSIENT_DELAY: 15000
- });
-
-});
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
deleted file mode 100644
index 6ee02b2..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
+++ /dev/null
@@ -1,19 +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.
-
-define("core/compat/t5-console",
- ["core/console", "core/compat/t5"],
- function (console) {
- T5.define("console", console);
- });
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-core.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-core.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-core.js
deleted file mode 100644
index 2bacfc4..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-core.js
+++ /dev/null
@@ -1,109 +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.
- */
-
-define("core/compat/t5", ["_"], function (_) {
-
- /**
- * The master T5 namespace. A few critical functions are added directly to T5,
- * but mostly it is used as a containing namespace for namespaces defined by
- * other modules.
- *
- * @since 5.3
- */
- window.T5 = {
-
- /** _ is _.noConflict(), in other words, all Underscore functions are not inside
- * T5._, rather than simply _.
- */
- _: _.noConflict()
- };
-
- /**
- * Extends an object using a source. In the simple case, the source object's
- * properties are overlaid on top of the destination object. In the typical
- * case, the source parameter is a function that returns the source object
- * ... this is to facilitate modularity and encapsulation.
- *
- * @param destination
- * object to receive new or updated properties
- * @param source
- * source object for properties, or function returning source
- * object
- * @returns the destination object
- */
- T5.extend = function (destination, source) {
- var _ = T5._;
-
- if (_.isFunction(source)) {
- source = source();
- }
-
- return _.extend(destination, source);
- };
-
- /**
- * Defines a new namespace under the T5 object.
- *
- * @param name
- * string name of the namespace
- * @param source
- * source object for properties (or function returning source
- * object)
- * @return the namespace object
- */
- T5.define = function (name, source) {
- var namespace = {};
- T5[name] = namespace;
-
- return this.extend(namespace, source);
- };
-
- /**
- * Used when mapping a new-style module to an old-style namespace.
- * @param moduleName name of module to export from. Additional arguments are the function names
- * to proxy.
- * @param functionNames... names of functions to to proxy
- * @return An object with the function names; each value is a function that uses require()
- * to obtain the function inside the module (asynchronously, at least the first time).
- */
- T5.proxyFunctionsToModule = function (moduleName) {
-
- var slice = Array.prototype.slice;
- var _ = T5._;
-
- var functionNames = _.tail(arguments);
- var deps = [moduleName];
- var result = {}
-
- // Force the module to be loaded early, so that there will not (usually) be a delay
- // later.
- require(deps, function () { });
-
- _.each(functionNames, function (name) {
- result[name] = function () {
- var capturedArguments = slice.call(arguments, 0);
-
- require(deps, function (module) {
- module[name].apply(null, capturedArguments);
- });
- };
- });
-
- return result;
- };
-
- return T5;
-
-});
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js
deleted file mode 100644
index f6d268f..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-dom.js
+++ /dev/null
@@ -1,159 +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.
- */
-
-define("core/compat/t5-dom", ["core/compat/t5-spi", "core/compat/t5-events"], function () {
- T5.define("dom", function () {
-
- var _ = T5._;
-
- var removeEventHandlers;
-
- // Necessary to lazy-instantiate femoveEventHandlers publisher function,
- // due to load order of these namespaces.
- function doRemoveEventHandlers(element) {
- if (!removeEventHandlers) {
- removeEventHandlers = T5.pubsub.createPublisher(T5.events.REMOVE_EVENT_HANDLERS, document);
- }
-
- removeEventHandlers(element);
- }
-
- /**
- * Locates an element. If element is a string, then
- * document.getElementById() is used to resolve a client element id to a DOM
- * element. If the id does not exist, then null will be returned.
- * <p>
- * If element is not a string, it is presumed to already by a DOM element,
- * and is returned.
- */
- function locate(element) {
-
- if (_.isString(element)) {
- return document.getElementById(element);
- }
-
- return element; // may be null, otherwise presumed to be a DOM node
- }
-
- /**
- * Tree-walks the children of the element; for each dhild, ensure that all
- * event handlers, listeners and PubSub publishers for the child are
- * removed.
- */
- function purgeChildren(element) {
- var children = element.childNodes;
-
- if (children) {
- var l = children.length, i, child;
-
- for (i = 0; i < l; i++) {
- var child = children[i];
-
- /* Just purge element nodes, not text, etc. */
- if (child.nodeType == 1)
- purge(children[i]);
- }
- }
- }
-
- // Adapted from http://javascript.crockford.com/memory/leak.html
- function purge(element) {
- var attrs = element.attributes;
- if (attrs) {
- var i, name;
- for (i = attrs.length - 1; i >= 0; i--) {
- if (attrs[i]) {
- name = attrs[i].name;
- /* Looking for onclick, etc. */
- if (typeof element[name] == 'function') {
- element[name] = null;
- }
- }
- }
- }
-
- purgeChildren(element);
-
- if (element.t5pubsub) {
- _.defer(function () {
- T5.pubsub.cleanupRemovedElement(element)
- });
- }
-
- doRemoveEventHandlers(element);
- }
-
- /**
- * Removes an element and all of its direct and indirect children. The
- * element is first purged, to ensure that Internet Explorer doesn't leak
- * memory if event handlers associated with the element (or its children)
- * have references back to the element. This also removes all Prototype
- * event handlers, and uses T5.pubsub.cleanupRemovedElement() to delete and
- * publishers or subscribers for any removed elements.
- *
- */
- function remove(element) {
- purge(element);
-
- // Remove the element, and all children, in one go.
- Element.remove(element);
- }
-
- /**
- * Removes all children form the element, properly purging child elements
- * of any listeners, etc.
- * @param element to purge
- */
- function removeChildren(element) {
- purgeChildren(element);
- element.innerHTML = '';
- }
-
- /**
- * Observes an event on an element; when the event is triggered, the event
- * is published as a message. Listeners to the topic may cancel the event.
- * @param element element or element id
- * @param eventName name of event to observe
- * @param topic topic name used to publish the event
- */
- function publishEvent(element, eventName, topic) {
- var publisher = T5.pubsub.createPublisher(topic, element);
-
- T5.dom.observe(element, eventName, function (event) {
- publisher(event);
- });
- }
-
- return {
- remove: remove,
- removeChildren: removeChildren,
- purgeChildren: purgeChildren,
- locate: locate,
- observe: T5.spi.observe,
- find: T5.spi.find,
- hide: T5.spi.hide,
- show: T5.spi.show,
- appendMarkup: T5.spi.appendMarkup,
- publishEvent: publishEvent
- };
- });
-
- /**
- * Create a T5.$() synonym for T5.dom.locate().
- */
- T5.extend(T5, {
- $: T5.dom.locate
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js
deleted file mode 100644
index ec0c38c..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-events.js
+++ /dev/null
@@ -1,45 +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 names of events used with the publish/subscribe framework.
- */
-define("core/compat/t5-events", ["core/compat/t5"], function () {
- T5.define("events", {
-
- /**
- * Published as an element is being removed from the DOM, to allow framework-specific
- * approaches to removing any event listeners for the element. This is published on the document object,
- * and the message is the DOM element for which event handlers should be removed.
- */
- REMOVE_EVENT_HANDLERS: "tapestry:remove-event-handlers",
-
- /** Event used to display a new alert to the user. The message is the alert specification, with keys:
- * <dl>
- * <dt>id</dt>
- * <dd>unique numeric id for the alert, if the alert is persistent on the server (omitted for non-persistent
- * alerts)</dd>
- * <dt>transient</dt>
- * <dd>If true (may be omitted), then the alert will automatically dismiss itself after a period of time.</dd>
- * <dt>class</dt>
- * <dd>The CSS class, which should be 't-info', 't-warn' or 't-error'.</dd>
- * <dt>message</dt>
- * <dd>The alert message content.</dd>
- * </dl>
- */
- ADD_ALERT: "tapestry:add-alert"
-
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-forceload.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-forceload.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-forceload.js
deleted file mode 100644
index dcb810b..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-forceload.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 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.
- */
-
-/*
- * During the transition stage, the old libraries are loaded somewhat like AMD modules, including
- * a call to define(). That means they are only actually loaded as needed. This module exists to force
- * the loading of the other modules before older (and third party) JavaScript code attempts to make use
- * of methods inside the T5 and Tapestry namespace objects.
- */
-define("core/compat/t5-forceload", [
- "core/compat/t5-alerts",
- "core/compat/tree",
- "core/compat/tapestry-messages"],
- // Does nothing, but forces the other define()-ed "modules" to have their dependencies
- // loaded, and to be loaded themselves.
- null);
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-init.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-init.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-init.js
deleted file mode 100644
index 76e7839..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-init.js
+++ /dev/null
@@ -1,39 +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.
- */
-
-/** Extends T5 with new functions related to page initialization. */
-
-define("core/compat/t5-init", ["core/compat/t5"], function () {
- T5.extend(T5, function () {
-
- return {
- /**
- * The T5.Initializer namespace, which contains functions used to
- * perform page load initializations.
- */
- initializers: {},
-
- /**
- * A convenience method for extending the T5.Initializer namespace.
- *
- * @param source
- * object or function used to extend T5.initializers
- */
- extendInitializers: function (source) {
- T5.extend(T5.initializers, source);
- }
- };
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/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
deleted file mode 100644
index 4be58b4..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-prototype.js
+++ /dev/null
@@ -1,61 +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.
- */
-
-/**
- * Adapts Tapestry's SPI (Service Provider Interface) to make use of the
- * Prototype JavaScript library. May also make modifications to Prototype to
- * work with Tapestry.
- */
-define("core/compat/t5-spi", ["core/spi", "core/compat/t5", "core/compat/t5-events", "core/compat/t5-pubsub"], function (spi) {
- T5.define("spi", function () {
-
- function observe(element, eventName, listener) {
-
- var handler = spi.on(element, eventName, listener);
-
- element = null;
- eventName = null;
- listener = null;
-
- return function () {
- handler.stop();
- };
- }
-
- /** This will likely go soon. */
- spi.domReady(function () {
- T5.sub(T5.events.REMOVE_EVENT_HANDLERS, null, function (element) {
- // TODO: Remaining Prototype dependency here:
- Event.stopObserving(element);
- }
- );
- });
-
- function appendMarkup(element, markup) {
- spi(element).append(markup);
-
- return element;
- }
-
- return {
- observe: observe,
- find: Element.down,
- show: Element.show,
- hide: Element.hide,
- appendMarkup: appendMarkup
- };
- });
-
-});
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t5-pubsub.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-pubsub.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-pubsub.js
deleted file mode 100644
index a622fac..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-pubsub.js
+++ /dev/null
@@ -1,270 +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.
- */
-
-define("core/compat/t5-pubsub", ["core/compat/t5"], function () {
- T5.define("pubsub", function () {
-
- var _ = T5._;
-
- // Element keys: topic, element, listenerfn
- // May be multiple elements with some topic/element pair
- // element property may be undefined
- var subscribers = [];
-
- // Element keys: topic, element, publisherfn
- var publishers = [];
-
- // Necessary since T5.dom depends on T5.pubsub
- function $(element) {
- // Note: duplicates code from t5-dom.js (T5.dom.locate).
- if (_.isString(element)) {
- return document.getElementById(element);
- }
-
- return element; // may be null, otherwise presumed to be a DOM node
- }
-
- function purgePublisherCache(topic) {
- _.each(publishers, function (publisher) {
- if (publisher.topic === topic) {
- publisher.listeners = undefined;
- }
- });
- }
-
- function findListeners(topic, element) {
- var gross = _.select(subscribers, function (subscriber) {
- return subscriber.topic === topic;
- });
-
- var primary = _.select(gross, function (subscriber) {
- return subscriber.element === element;
- });
-
- var secondary = _.select(gross, function (subscriber) {
- // Match where the element is null or undefined
- return !subscriber.element;
- });
-
- // Return the listenerfn property from each match.
- return _(primary).chain().union(secondary).pluck("listenerfn").value();
- }
-
- /**
- * Subscribes a listener function to the selector. The listener function
- * will be invoked when a message for the given topic is published. If an
- * element is specified, then the listener will only be invoked when the
- * subscribed element matches the published element.
- *
- * @param topic
- * a topic name, which must not be blank
- * @param element
- * a DOM element, which may be null to subscribe to all messages
- * for the topic. If a string, then T5.$() is used to locate the
- * DOM element with the matching client id.
- * @param listenerfn
- * function invoked when a message for the topic is published.
- * The function is invoked only if the supplied selector element
- * is undefined OR exactly matches the source element node. The
- * return value of the listenerfn will be accumulated in an array
- * and returned to the publisher.
- *
- * The listener function is passed a message object as the first parameter; this is provided
- * on each call to the topic's publish function. The second parameter is an object with two
- * properties: An element property to identify the source of the message, and a cancel() function property
- * that prevents further listeners from being invoked.
- * @return a function of no arguments used to unsubscribe the listener
- */
- function subscribe(topic, element, listenerfn) {
-
- var subscriber = {
- topic: topic,
- element: $(element),
- listenerfn: listenerfn
- };
-
- subscribers.push(subscriber);
- purgePublisherCache(subscriber.topic);
-
- // To prevent memory leaks via closure:
-
- topic = null;
- element = null;
- listenerfn = null;
-
- // Return a function to unsubscribe
- return function () {
- subscribers = _.without(subscribers, subscriber);
- purgePublisherCache(subscriber.topic);
- }
- }
-
- /**
- * Creates a publish function for the indicated topic name and DOM element. For global
- * events, the convention is to use the document object.
- *
- * <p>
- * The returned function is used to publish a message. Messages are
- * published synchronously. The publish function will invoke listener
- * functions for matching subscribers (subscribers to the same topic). Exact
- * subscribers (matching the specific element) are invoked first, then
- * general subscribers (not matching any specific element). The return value
- * for the publish function is an array of all the return values from all
- * invoked listener functions.
- *
- * <p>
- * Listener functions are passed the message object and a second (optional) object.
- * The second object contains two keys: The first, "element", identifies the element for which the publisher was created, i.e.,
- * the source of the message. The second, "cancel", is a function used to prevent further listeners
- * from being invoked.
- *
- * <p>
- * There is not currently a way to explicitly remove a publisher; however,
- * when the DOM element is removed properly, all publishers and subscribers
- * for the specific element will be removed as well.
- *
- * <p>
- * Publish functions are cached, repeated calls with the same topic and
- * element return the same publish function.
- *
- * @param topic
- * used to select listeners
- * @param element
- * the DOM element used as the source of the published message
- * (also used to select listeners). Passed through T5.$(), the
- * result must not be null. The element will be passed to listener function as
- * the second parameter.
- * @return publisher function used to publish a message
- */
- function createPublisher(topic, element) {
-
- element = $(element);
-
- if (element == null) {
- throw "Element may not be null when creating a publisher.";
- }
-
- var existing = _.detect(publishers, function (publisher) {
- return publisher.topic === topic && publisher.element === element;
- });
-
- if (existing) {
- return existing.publisherfn;
- }
-
- var publisher = {
- topic: topic,
- element: element,
- publisherfn: function (message) {
-
- if (publisher.listeners == undefined) {
- publisher.listeners = findListeners(publisher.topic,
- publisher.element);
- }
-
- var canceled = false;
-
- var meta = {
- element: publisher.element,
- cancel: function () {
- canceled = true;
- }
- };
-
- var result = [];
-
- for (var i = 0; i < publisher.listeners.length; i++) {
-
- var listenerfn = publisher.listeners[i];
-
- result.push(listenerfn(message, meta));
-
- if (canceled) {
- break;
- }
- }
-
- return result;
- }
- };
-
- publishers.push(publisher);
-
- // If only there was an event or something that would inform us when the
- // element was removed. Certainly, IE doesn't support that! Have to rely
- // on T5.dom.remove() to inform us.
-
- // Mark the element to indicate it requires cleanup once removed from
- // the DOM.
-
- element.t5pubsub = true;
-
- // Don't want to hold a reference via closure:
-
- topic = null;
- element = null;
-
- return publisher.publisherfn;
- }
-
- /**
- * Creates a publisher and immediately publishes the message, return the
- * array of results.
- */
- function publish(topic, element, message) {
- return createPublisher(topic, element)(message);
- }
-
- /**
- * Invoked whenever an element is about to be removed from the DOM to remove
- * any publishers or subscribers for the element.
- */
- function cleanup(element) {
- subscribers = _.reject(subscribers, function (subscriber) {
- return subscriber.element === element
- });
-
- // A little evil to modify the publisher object at the same time it is
- // being removed.
-
- publishers = _.reject(publishers, function (publisher) {
- var match = publisher.element === element;
-
- if (match) {
- publisher.listeners = undefined;
- publisher.element = undefined;
- }
-
- return match;
- });
- }
-
- return {
- createPublisher: createPublisher,
- subscribe: subscribe,
- publish: publish,
- cleanupRemovedElement: cleanup
- };
- });
-
- /**
- * Create aliases on T5 directly: pub -> T5.pubsub.publish and sub ->
- * T5.pubsub.subscribe.
- */
- T5.extend(T5, {
- pub: T5.pubsub.publish,
- sub: T5.pubsub.subscribe
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/t53-compatibility.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/t53-compatibility.js b/tapestry-core/src/main/resources/org/apache/tapestry5/t53-compatibility.js
new file mode 100644
index 0000000..f395864
--- /dev/null
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/t53-compatibility.js
@@ -0,0 +1,49 @@
+// 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/t53-compatibility (Service Provider Interface)
+//
+// 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`
+define("core/t53-compatibility", ["_"], function(_) {
+ var T5, Tapestry;
+ T5 = {
+ _: _.noConflict(),
+ extend: function(destination, source) {
+ if (_.isFunction(source)) {
+ source = source();
+ }
+ return _.extend(destination, source);
+ },
+ define: function(name, source) {
+ var namespace;
+ namespace = {};
+ T5[name] = namespace;
+ return T5.extend(namespace, source);
+ },
+ initializers: {},
+ extendInitializers: function(source) {
+ return T5.extend(T5.initializers, source);
+ }
+ };
+ Tapestry = {
+ Initializer: T5.initializers
+ };
+ window.T5 = T5;
+ window.Tapestry = Tapestry;
+ return null;
+});
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-debug.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-debug.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-debug.js
deleted file mode 100644
index 0cf84c7..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-debug.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* 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.
- */
-
-require(["core/compat/tapestry"], function () {
- Tapestry.DEBUG_ENABLED = true;
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js
deleted file mode 100644
index d3507ff..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2009-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.
-
-define("core/compat/tapestry-messages", ["core/compat/tapestry"], function () {
-
- Tapestry.Messages = {
-
- pageIsLoading: "Please wait for the page to finish loading ...",
-
- missingInitializer: "Function Tapestry.Initializer.#{name}() does not exist.",
-
- missingValidator: "Function Tapestry.Validator.#{name}() does not exist for field '#{fieldName}'.",
-
- ajaxFailure: "Ajax failure: Status #{status} for #{request.url}: ",
-
- ajaxRequestUnsuccessful: "Server request was unsuccessful. There may be a problem accessing the server.",
-
- clientException: "Client exception processing response: ",
-
- missingZone: "Unable to locate Ajax Zone '#{id}' for dynamic update.",
-
- noZoneManager: "Element '#{id}' does not have an associated Tapestry.ZoneManager object.",
-
- pathDoesNotStartWithSlash: "External path #{path} does not start with a leading slash.",
-
- notAnInteger: "Not an integer",
-
- invalidCharacter: "Invalid character",
-
- communicationFailed: "Communication with the server failed: "
- };
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js
deleted file mode 100644
index 1566cfd..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009-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.
-
-require(["core/compat/tapestry-messages"], function () {
- Tapestry.Messages = {
-
- pageIsLoading: "Bitte warten während die Seite zu Ende lädt ...",
-
- missingInitializer: "Die Funktion Tapestry.Initializer.#{name}() existiert nicht.",
-
- missingValidator: "Die Funktion Tapestry.Validator.#{name}() existiert nicht für das Feld '#{fieldName}'.",
-
- ajaxFailure: "Ajax Fehler: Status #{status} für #{request.url}: ",
-
- ajaxRequestUnsuccessful: "Die Serveranfrage schlug fehl. Es gibt womöglich ein Problem beim Zugriff auf den Server.",
-
- clientException: "Client exception beim Verarbeiten der Antwort: ",
-
- missingZone: "Ajax Zone '#{id}' konnte für ein dynamisches Update nicht gefunden werden.",
-
- noZoneManager: "Element '#{id}' ist nicht mit einem Tapestry.ZoneManager Objekt verknüpft.",
-
- pathDoesNotStartWithSlash: "Der externe Pfad #{path} beginnt nicht mit einem führenden '/'.",
-
- notAnInteger: "Kein ganzzahliger Wert",
-
- invalidCharacter: "Ungültiges Zeichen",
-
- communicationFailed: "Kommunikation mit dem Server ist fehlgeschlagen: "
- };
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_fi_FI.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_fi_FI.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_fi_FI.js
deleted file mode 100644
index d4efeb4..0000000
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_fi_FI.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2009-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
-// b
-// 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.
-
-require(["core/compat/tapestry-messages"], function () {
- Tapestry.Messages = {
-
- pageIsLoading: "Ole hyv� ja odota kunnes sivu on latautunut...",
-
- missingInitializer: "Funktiota Tapestry.Initializer.#{name}() ei ole olemassa.",
-
- missingValidator: "Funktiota Tapestry.Validator.#{name}() ei ole olemassa kent�ss� '#{fieldName}'.",
-
- ajaxFailure: "Ajax virhe: Status #{status} pyynn�lle #{request.url}: ",
-
- ajaxRequestUnsuccessful: "Pyynt�� palvelimelle ei voitu suorittaa. Palvelimeen ei saatu yhteytt�.",
-
- clientException: "Palvelin palautti vastauksen mutta sen prosessoinnin aikana tapahtui virhe: ",
-
- missingZone: "Ajax Zone '#{id}' yritettiin p�ivitt�� dynaamisesti, mutta sit� ei l�ytynyt.",
-
- noZoneManager: "Ajax Zone '#{id}':iin ei ole liitetty Tapestry.ZoneManager -objektia.",
-
- pathDoesNotStartWithSlash: "Ulkoinen polku #{path} ei ala kauttaviivalla ( merkki '/' ).",
-
- notAnInteger: "Ei ole kokonaisluku",
-
- invalidCharacter: "Virheellinen merkki"
- };
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
index d9f8db2..01b654d 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
@@ -13,6 +13,8 @@
* limitations under the License.
*/
+// TEMPORARY: KEPT AROUND FOR REFERENCE, TO BE DELETED SHORTLY
+
define("core/compat/tapestry", [
"_",
"core/spi",
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/main/resources/org/apache/tapestry5/tree.js
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/tree.js b/tapestry-core/src/main/resources/org/apache/tapestry5/tree.js
index aeba1d0..f4973b3 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tree.js
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/tree.js
@@ -12,6 +12,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+// TEMPORARY: KEPT AROUND FOR REFERENCE, TO BE REIMPLEMENTED/DELETED SHORTLY
+
define("core/compat/tree", ["core/compat/t5-init"], function () {
T5.extend(T5, {
tree: {
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b15151eb/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
index e713f4a..d606274 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ZoneDemo.java
@@ -213,9 +213,9 @@ public class ZoneDemo
{
jss.importStylesheet(new StylesheetLink(overridesCSS, new StylesheetOptions().asAjaxInsertionPoint()));
- jss.addScript(
- "$('%s').observe(Tapestry.ZONE_UPDATED_EVENT, function() { $('zone-update-message').update('Zone updated.'); });",
- output.getClientId());
+// jss.addScript(
+// "$('%s').observe(Tapestry.ZONE_UPDATED_EVENT, function() { $('zone-update-message').update('Zone updated.'); });",
+// output.getClientId());
}
Object onActionFromBadZone()