ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [17/17] incubator-ponymail git commit: rerig comments a bit
Date Fri, 02 Sep 2016 07:44:19 GMT
rerig comments a bit

coffee doesn't always like it when you indent comments
"incorrectly" near if/else statements.


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

Branch: refs/heads/coffee-and-cake
Commit: f2cdcb47431414a43ccf86b4e0142ebafcce1c2f
Parents: 22b3b8a
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Fri Sep 2 09:42:02 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Fri Sep 2 09:42:02 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/dom_utils.coffee    | 14 +++++++-------
 site/js/coffee/http_utils.coffee   |  4 ++--
 site/js/coffee/localstorage.coffee |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f2cdcb47/site/js/coffee/dom_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/dom_utils.coffee b/site/js/coffee/dom_utils.coffee
index afd291e..c033a14 100644
--- a/site/js/coffee/dom_utils.coffee
+++ b/site/js/coffee/dom_utils.coffee
@@ -34,14 +34,14 @@ mk = (type, params, children) ->
     ### If params have been passed, set them ###
     if params
         for k, v of params
-            # Standard string value?
+            ### Standard string value? ###
             if typeof v is "string"
                 r.setAttribute(k, v)
-            # Are we passing a list of data to set? concatenate then
             else if isArray(v)
+                ### Are we passing a list of data to set? concatenate then ###
                 r.setAttribute(k, v.join(" "))
-            # Are we trying to set multiple sub elements, like a style?
             else if typeof(v) is "object"
+                ### Are we trying to set multiple sub elements, like a style? ###
                 for x,y of v
                     r[k][x] = y
     
@@ -57,11 +57,11 @@ mk = (type, params, children) ->
                     ### String? Convert via txt() then ###
                     if typeof k is "string"
                         app(r, txt(k))
-                    ### Plain element, add normally ###
                     else
+                        ### Plain element, add normally ###
                         app(r, k)
-            ### Just a single element, add it ###
             else
+                ### Just a single element, add it ###
                 app(r, children)
     return r
 
@@ -78,10 +78,10 @@ app = (a,b) ->
             ### String? Convert to textNode first then ###
             if typeof item is "string"
                 item = txt(item)
-            ### Otherwise just add it ###
+            ### In any case, add it now ###
             a.appendChild(item)
-    ### Otherwise, just add ###
     else
+        ### Otherwise, just add ###
         ###  String? Convert first ###
         if typeof b is "string"
             a.appendChild(txt(b))

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f2cdcb47/site/js/coffee/http_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/http_utils.coffee b/site/js/coffee/http_utils.coffee
index 4b5675e..60d8e13 100644
--- a/site/js/coffee/http_utils.coffee
+++ b/site/js/coffee/http_utils.coffee
@@ -83,7 +83,7 @@ class HTTPRequest
                 ### by adding an ampersand first ###
                 if @url.match(/\?/)
                     @url += "&" + tmp
-                ### No form data yet, add a ? and then the data ###
+                #### No form data yet, add a ? and then the data ###
                 else
                     @url += "?" + tmp
                 
@@ -118,7 +118,7 @@ class HTTPRequest
                             return
                         ### Otherwise, call the callback function ###
                         @callback(@response, @state);
-                    ### JSON parse failed? Pass on the response as plain text then ###
+                    #### JSON parse failed? Pass on the response as plain text then ###
                     catch e
                         @callback(@request.responseText, @state)
         

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/f2cdcb47/site/js/coffee/localstorage.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/localstorage.coffee b/site/js/coffee/localstorage.coffee
index bcd9128..d4339ab 100644
--- a/site/js/coffee/localstorage.coffee
+++ b/site/js/coffee/localstorage.coffee
@@ -37,8 +37,8 @@ dbWrite = (key, value) ->
     ### Can we use localStorage? ###
     if pm_storage_available
         return window.localStorage.setItem(key, value)
-    ### Guess not, fall back to (ineffective) global var ###
     else
+        ### Guess not, fall back to (ineffective) global var ###
         pm_storage_globvar[key] = value
         return true
     
@@ -47,7 +47,7 @@ dbRead = (key) ->
     ### Do we have localStorage? ###
     if pm_storage_available
         return window.localStorage.getItem(key)
-    ### Nope, try global var ###
     else
+        ### Nope, try global var ###
         return pm_storage_globvar[key]
     


Mime
View raw message