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/09/11 23:18:05 UTC

[2/3] git commit: Remove some internal-use functions from the Tapestry client namespace

Remove some internal-use functions from the Tapestry client namespace


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

Branch: refs/heads/5.4-js-rewrite
Commit: 558ef40c20b6892137b7a803d1e26e977bb8605e
Parents: de215f7
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 11 09:26:11 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 11 09:26:11 2012 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.txt                               |   18 +++++--
 .../resources/org/apache/tapestry5/tapestry.js     |   39 +--------------
 2 files changed, 13 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/558ef40c/54_RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.txt b/54_RELEASE_NOTES.txt
index 1263802..621dda2 100644
--- a/54_RELEASE_NOTES.txt
+++ b/54_RELEASE_NOTES.txt
@@ -69,13 +69,13 @@ element to be updated when new content is provided for the zone in a partial pag
 removed with no replacement.
 
 Minor changes to Tapestry.ElementEffects.  Despite the names of the properties (kept for compatibility), all "effects"
-now simply make the element appear or hide, with no animation.
+now simply make the element appear or hide, with no animation.  The value returned from these methods is now an
+ElementWrapper, as defined by the core/spi module.
 
 Tapestry code no longer makes use of Scriptaculous. Instead, Tapestry will fire events on elements, and user code may
-decide to animate them using whatever library is desired.
+decide to animate them using whatever library is desired. The event names are defined in the core/events module.
 
-On the client side, the "floating console" is only used in cases where a native console is not available. (Is this a
-change from 5.3?)
+On the client side, the "floating console" is only used in cases where a native console is not available.
 
 Support for validating fields on blur (i.e., when tabbing out of a field) has been removed. Validation now occurs when
 the form is submitted, or not at all. The ClientValidation.BLUR enum value has been deprecated and is now treated as
@@ -86,9 +86,15 @@ was introduced in Tapestry 5.2, and has now been removed.
 
 Tapestry.FormEventManager has been entirely removed, along with supporting function Element.getFormEventManager().
 
-Tapestry.FieldEventManager.getIcon() now always returns null.
+Tapestry.FieldEventManager.getIcon() now always returns null. The icon image is no longer rendered (on the server)
+by the DefaultValidationDecorator. Shortly, a switch to using Twitter Bootstrap to present validation errors
+will occur.
 
 Tapestry 5.3 contained code that attempted to prevent Ajax requests until after the page had loaded; this was based
 on the function Tapestry.waitForPage().  Server components no longer make use of this function, and the function
 itself now does nothing. A replacement approach to preventing the user from interacting with links and forms before
-the page initialization has completed may be implemented in the future.
\ No newline at end of file
+the page initialization has completed may be implemented in the future.
+
+Many functions on the Tapestry object have been removed, as they were only used internally:
+- rebuildURL
+- stripToLastSlash

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/558ef40c/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 92eeada..8cdcde8 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
@@ -323,43 +323,6 @@ define("core/compat/tapestry", [
         },
 
         /**
-         * Used to reconstruct a complete URL from a path that is (or may be)
-         * relative to window.location. This is used when determining if a
-         * JavaScript library or CSS stylesheet has already been loaded. Recognizes
-         * complete URLs (which are returned unchanged), otherwise the URLs are
-         * expected to be absolute paths.
-         *
-         * @param path
-         * @return complete URL as string
-         */
-        rebuildURL: function (path) {
-            if (path.match(/^https?:/)) {
-                return path;
-            }
-
-            if (!path.startsWith("/")) {
-                Tapestry.error(Tapestry.Messages.pathDoesNotStartWithSlash, {
-                    path: path
-                });
-
-                return path;
-            }
-
-            if (!Tapestry.buildUrl) {
-                var l = window.location;
-                Tapestry.buildUrl = l.protocol + "//" + l.host;
-            }
-
-            return Tapestry.buildUrl + path;
-        },
-
-        stripToLastSlash: function (URL) {
-            var slashx = URL.lastIndexOf("/");
-
-            return URL.substring(0, slashx + 1);
-        },
-
-        /**
          * Convert a user-provided localized number to an ordinary number (not a
          * string). Removes seperators and leading/trailing whitespace. Disallows
          * the decimal point if isInteger is true.
@@ -1342,7 +1305,7 @@ define("core/compat/tapestry", [
                 if (!this.inError()) {
                     this.field.fire(Tapestry.FIELD_VALIDATE_EVENT, {
                         value: value,
-                        translated: translated,
+                        translated: translated
                     });
                 }