You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2015/09/17 12:20:11 UTC

tapestry-5 git commit: use dom.create instead of building the markup via string concatenation

Repository: tapestry-5
Updated Branches:
  refs/heads/master 919d4fc71 -> 62623e5e8


use dom.create instead of building the markup via string concatenation


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

Branch: refs/heads/master
Commit: 62623e5e85a7e11871cf2aabb94f5ec708836303
Parents: 919d4fc
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Thu Sep 17 12:19:38 2015 +0200
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Thu Sep 17 12:19:38 2015 +0200

----------------------------------------------------------------------
 .../META-INF/modules/t5/core/ajaxformloop.coffee          | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/62623e5e/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/ajaxformloop.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/ajaxformloop.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/ajaxformloop.coffee
index b60cf6c..e12e5be 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/ajaxformloop.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/ajaxformloop.coffee
@@ -65,12 +65,10 @@ define ["./dom", "./events", "./console", "./ajax"],
           # Create a new element with the same type (usually "div") and class as this element.
           # It will contain the new content.
 
-          newElement = """
-              <#{insertionPoint.element.tagName} class="#{insertionPoint.element.className}"
-                data-container-type="#{FRAGMENT_TYPE}">
-                #{content}
-                </#{insertionPoint.element.tagName}>
-              """
+          newElement = dom.create insertionPoint.element.tagName,
+                                  'class': insertionPoint.element.className, 'data-container-type': FRAGMENT_TYPE,
+                                  content
+
 
           insertionPoint.insertBefore newElement