ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [03/17] incubator-ponymail git commit: allow an array-like parameter value
Date Fri, 02 Sep 2016 07:44:05 GMT
allow an array-like parameter value

concatenate with spaces. useful for things like classes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/3e672bc5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/3e672bc5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/3e672bc5

Branch: refs/heads/coffee-and-cake
Commit: 3e672bc50f51c69e0bcbc8b8fff9101f1d221cf9
Parents: b43dd96
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Thu Sep 1 17:00:16 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Thu Sep 1 17:00:16 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/dom_utils.coffee | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/3e672bc5/site/js/coffee/dom_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/dom_utils.coffee b/site/js/coffee/dom_utils.coffee
index 3419119..1a9286c 100644
--- a/site/js/coffee/dom_utils.coffee
+++ b/site/js/coffee/dom_utils.coffee
@@ -31,8 +31,11 @@ mk = (type, params, children) ->
             # Standard string value?
             if typeof v == "string"
                 r.setAttribute(k, v)
+            # Are we passing a list of data to set? concatenate then
+            else if isArray(v)
+                r.setAttribute(k, v.join(" "))
             # Are we trying to set multiple sub elements, like a style?
-            else if typeof(v) == "object" and not isArray(v)
+            else if typeof(v) == "object"
                 for x,y of v
                     r[k][x] = y
     


Mime
View raw message