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/11 00:07:25 UTC

[6/13] git commit: Only use the floating console when the native console is not available

Only use the floating console when the native console is not available


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

Branch: refs/heads/5.4-js-rewrite
Commit: 150791dccaff4257f018bd958dc96efe2ade115d
Parents: 22dee05
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Aug 10 14:49:04 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Aug 10 14:49:04 2012 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.txt                               |   21 ++++++++------
 .../META-INF/modules/core/console.coffee           |   10 ++++---
 2 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/150791dc/54_RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.txt b/54_RELEASE_NOTES.txt
index 463011b..f05b7ab 100644
--- a/54_RELEASE_NOTES.txt
+++ b/54_RELEASE_NOTES.txt
@@ -2,22 +2,25 @@ Scratch pad for changes destined for the 5.4 release notes page.
 
 Breaking Features:
 
-The definition of the symbol 'tapestry.asset-path-prefix' has changed; it no longer includes the leading and
-trailing slashes. The default in 5.3 was "/assets/", in 5.4 it is simply "assets".
+The definition of the symbol 'tapestry.asset-path-prefix' has changed; it no longer includes the leading and trailing
+slashes. The default in 5.3 was "/assets/", in 5.4 it is simply "assets".
 
-JavaScript Libraries (including stacks) are being replaced with modules. Note that libraries are now loaded
-with RequireJS, which may mean that global values exported by the libraries are not visible; you should explicitly
-attach properties to the global JavaScript window object, rather than assume that the context (this) is the window.
+JavaScript Libraries (including stacks) are being replaced with modules. Note that libraries are now loaded with
+RequireJS, which may mean that global values exported by the libraries are not visible; you should explicitly attach
+properties to the global JavaScript window object, rather than assume that the context (this) is the window.
 
 The interface org.apache.tapestry5.services.assets.ResourceTransformer has had a new method added:
 getTransformedContentType().
 
 Older versions of Tapestry included client-side support for an element with the CSS class "t-zone-update" as the actual
-element to be updated when new content is provided for the zone in a partial page render response. This feature
-has been removed with no replacement.
+element to be updated when new content is provided for the zone in a partial page render response. This feature has been
+removed with no replacement.
 
 Minor changes to Tapestry.ElementEffects.  Despite the names of the properties (kept for compatibility), all "effects"
 are now simply make the element appear or hide, with no animation.
 
-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.
+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.
+
+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?)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/150791dc/tapestry-core/src/main/coffeescript/META-INF/modules/core/console.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/console.coffee
index 32b0c7b..cb0c23f 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/console.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/console.coffee
@@ -58,11 +58,13 @@ define ["core/spi", "core/builder", "_"], (spi, builder, _) ->
 
   level = (className, consolefn) ->
     (message) ->
-      # Display it floating
-      display className, message
+      if consolefn
+        consolefn and consolefn.call(console, message)
+      else
+        # Display it floating
+        display className, message
 
-      # If native console available, go for it
-      consolefn and consolefn.call(console, message)
+  # If native console available, go for it
 
   exports[name] = level("t-#{name}", nativeConsole[name]) for name in ["debug", "info", "warn"]
   exports.error = level("t-err", nativeConsole.error)