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 2013/06/19 00:34:30 UTC

[5/8] git commit: Convert t5/core/dom:body from a function that returns an ElementWrapper, to an ElementWrapper

Convert t5/core/dom:body from a function that returns an ElementWrapper, to an ElementWrapper


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

Branch: refs/heads/master
Commit: ab31e7f89a09df35a94d1ea816929aa242621f7a
Parents: 341bd0a
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Jun 18 13:52:02 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Jun 18 13:52:02 2013 -0700

----------------------------------------------------------------------
 .../src/main/coffeescript/META-INF/modules/t5/core/alert.coffee    | 2 +-
 .../src/main/coffeescript/META-INF/modules/t5/core/console.coffee  | 2 +-
 .../main/coffeescript/META-INF/modules/t5/core/datefield.coffee    | 2 +-
 .../coffeescript/META-INF/modules/t5/core/exception-display.coffee | 2 +-
 .../coffeescript/META-INF/modules/t5/core/exceptionframe.coffee    | 2 +-
 .../src/main/coffeescript/META-INF/modules/t5/core/fields.coffee   | 2 +-
 .../src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee | 2 +-
 .../org/apache/tapestry5/t5-core-dom.coffee                        | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
index 9ae64f4..142aed6 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/alert.coffee
@@ -78,7 +78,7 @@ define ["./dom", "./console", "./messages", "./builder", "./ajax", "underscore"]
         return false
 
     findInnerContainer = ->
-      outer = dom.body().findFirst "[data-container-type=alerts]"
+      outer = dom.body.findFirst "[data-container-type=alerts]"
 
       unless outer
         console.error "Unable to locate alert container element to present an alert."

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
index 88ee4d8..1a42d1c 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
@@ -38,7 +38,7 @@ define ["./dom", "./builder", "underscore"], (dom, builder, _) ->
   display = (className, message) ->
     unless floatingConsole
       floatingConsole = builder ".t-console"
-      dom.body().prepend floatingConsole
+      dom.body.prepend floatingConsole
 
     div = builder ".t-console-entry.#{className}", (_.escape message)
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
index d51a430..7f994d1 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/datefield.coffee
@@ -155,7 +155,7 @@ define ["./dom", "./events", "./messages", "./builder", "./ajax",
 
     # Initialization:
 
-    scan dom.body()
+    scan dom.body
 
     # And scan any newly added content:
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-display.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-display.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-display.coffee
index 2c031f6..83fa08a 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-display.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exception-display.coffee
@@ -22,7 +22,7 @@ define ["./dom"],
     dom.onDocument "click", "[data-behavior=stack-trace-filter-toggle]", ->
       checked = @element.checked
 
-      for traceList in dom.body().find "ul.t-stack-trace"
+      for traceList in dom.body.find "ul.t-stack-trace"
         traceList[if checked then "addClass" else "removeClass"] "t-filtered"
 
       return

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exceptionframe.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exceptionframe.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exceptionframe.coffee
index f667b15..2a0e748 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exceptionframe.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/exceptionframe.coffee
@@ -41,7 +41,7 @@ define ["./dom", "./builder", "underscore"],
         ["iframe"],
         ["div > button.pull-right.btn.btn-primary", "Close"]
 
-      dom.body().append container.hide()
+      dom.body.append container.hide()
 
       iframe = (container.findFirst "iframe").element
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
index 32e12c2..1f0923f 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/fields.coffee
@@ -39,7 +39,7 @@ define ["underscore", "./events", "./dom", "./builder", "./utils", "./forms"],
       # When the field has an id (the normal case!), search the body for
       # the matching help block.
       if fieldId
-        block = dom.body().findFirst "[data-error-block-for='#{fieldId}']"
+        block = dom.body.findFirst "[data-error-block-for='#{fieldId}']"
 
         return block if block
       else

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
index a580de0..f01fa23 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
@@ -122,7 +122,7 @@ define ["underscore", "./console", "./dom", "./events"],
             # be ready to go. We set a flag, mostly used by test suites, to ensure that all is ready.
             # Note that later Ajax requests do not change this attribute, so their timing continues to be tricky.
 
-            dom.body().attribute "data-page-initialized", "true"
+            dom.body.attribute "data-page-initialized", "true"
 
     exports = _.extend loadLibrariesAndInitialize,
       # Passed a list of initializers, executes each initializer in order. Due to asynchronous loading

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab31e7f8/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
index 6172c07..2e688b0 100644
--- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
+++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
@@ -881,7 +881,7 @@ define ["underscore", "./utils", "./events"
     # Returns a wrapped version of the document.body element. Because all Tapestry JavaScript occurs
     # inside a block at the end of the document, inside the `<body`> element, it is assumed that
     # it is always safe to get the body.
-    body: -> wrapElement document.body
+    body: wrapElement document.body
 
 #if jquery
   $(window).on "resize", exports.triggerReflow