From: Drew Fisher Date: Sun, 18 May 2014 02:08:57 +0000 (-0700) Subject: widgets: small string and comment changes X-Git-Url: http://git.zarvox.org/%7B%7B%20url_for%28%27main.signup_page%27%29%20%7D%7D?a=commitdiff_plain;h=fdada4133cb2f69a8c6a25dd019ae2cd44beed7e;p=imoo.git widgets: small string and comment changes --- diff --git a/reactornado/widgets.js b/reactornado/widgets.js index 4565eba..16a9d4d 100644 --- a/reactornado/widgets.js +++ b/reactornado/widgets.js @@ -12,7 +12,7 @@ var LoginForm = React.createClass({ }; }, handleLogin: function () { - console.log("Imma log in now"); + console.log("Logging in " + this.state.protocol + ":" + this.state.username); window.Dispatcher.send_msg("accounts", "create_account", this.state); this.setState(this.getInitialState()); }, @@ -58,9 +58,11 @@ var BuddyListItem = React.createClass({ }); var BuddyList = React.createClass({ + // buddy state is a dictionary buid -> {proto, account, buddy, status, bicon_url} getInitialState: function () { - return {"buddies": []}; + return {"buddies": [] }; }, + // TODO: move handleBlistMessage to this class from dispatcher onChange: function(newData) { // parse out newData and convert to structure expected by widget var buddy_ids = Object.keys(newData);