You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/02 07:44:16 UTC

[14/17] incubator-ponymail git commit: fix function definitions

fix function definitions

should be using : inside a class to define methods


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

Branch: refs/heads/coffee-and-cake
Commit: 217cda6c07232cd15aad5ce9a57a2d9025373944
Parents: effc172
Author: Daniel Gruno <hu...@apache.org>
Authored: Fri Sep 2 09:21:46 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Fri Sep 2 09:21:46 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/http_utils.coffee | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/217cda6c/site/js/coffee/http_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/http_utils.coffee b/site/js/coffee/http_utils.coffee
index fd95e7d..be41c52 100644
--- a/site/js/coffee/http_utils.coffee
+++ b/site/js/coffee/http_utils.coffee
@@ -44,7 +44,7 @@
 #   })
 
 class HTTPRequest
-    constructor = (@url, @args) ->
+    constructor: (@url, @args) ->
         # Set internal class data, determine request type
         @state = @args.state
         @method = if @args.data then 'POST' else 'GET'
@@ -95,9 +95,10 @@ class HTTPRequest
         @request.onreadystatechange = @onchange
         
         # all done!
+        return this
         
     # HTTPRequest state change calback
-    onchange = () ->
+    onchange: () ->
             # Internal Server Error: Try to call snap
             if @request.readyState == 4 and @request.status == 500
                 if @snap
@@ -120,7 +121,7 @@ class HTTPRequest
                         @callback(@request.responseText, @state)
         
     # Standard form data joiner for POST data
-    formdata = (kv) ->
+    formdata: (kv) ->
         ar = []
         # For each key/value pair
         for k,v of kv