{"action":"created","comment":{"url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/comments/39962477","id":39962477,"diff_hunk":"@@ -0,0 +1,83 @@\n+import React from 'react';\n+import Questions from '../../stores/QuestionStore'\n+\n+class Admin extends React.Component {\n+    static contextTypes = {\n+        //getStore: React.PropTypes.func.isRequired,\n+        executeAction: React.PropTypes.func.isRequired\n+    }\n+\n+    constructor(props) {\n+        super(props);\n+    }\n+\n+    executeActionInStore(handlerName, data) {\n+        this.context.executeAction(function (actionContext, payload, done) {\n+            actionContext.dispatch(handlerName, payload);\n+            done();\n+        }, data);\n+    }\n+\n+    onAnswerDisplayTextChange(e) {\n+        this.executeActionInStore('UPDATE_ANSWER_TEXT', {\n+            questionId: this.props.question.id,\n+            answerId: e.target.dataset.answerid,\n+            displayText: e.target.value\n+        });\n+    }\n+\n+    onCorrectAnswerRadioChange(e) {\n+        this.executeActionInStore('UPDATE_CORRECT_ANSWER', {\n+                questionId: this.props.question.id,\n+                answerId: e.target.value\n+            }\n+        )\n+    }\n+\n+    render() {\n+        var questions = Questions.map((q) => {\n+            var answers = q.answers.map((a) => {\n+                var checked = q.answerId === a.id;\n+                return (\n+                    <a key={a.id} className=\"list-group-item small\">\n+                        <span className=\"glyphicon glyphicon-chevron-right\">&nbsp;</span>\n+                        <input onBlur={this.onAnswerDisplayTextChange.bind(this)}\n+                               data-answerid={a.id}","path":"components/admin/Admin.js","position":47,"original_position":45,"commit_id":"b613c8255f26881fd252681cf24c81b188516104","original_commit_id":"2f687160782180091f99e0a23a55654ed2e25769","user":{"login":"kobelb","id":627123,"avatar_url":"https://avatars.githubusercontent.com/u/627123?v=3","gravatar_id":"","url":"https://api.github.com/users/kobelb","html_url":"https://github.com/kobelb","followers_url":"https://api.github.com/users/kobelb/followers","following_url":"https://api.github.com/users/kobelb/following{/other_user}","gists_url":"https://api.github.com/users/kobelb/gists{/gist_id}","starred_url":"https://api.github.com/users/kobelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobelb/subscriptions","organizations_url":"https://api.github.com/users/kobelb/orgs","repos_url":"https://api.github.com/users/kobelb/repos","events_url":"https://api.github.com/users/kobelb/events{/privacy}","received_events_url":"https://api.github.com/users/kobelb/received_events","type":"User","site_admin":false},"body":"I believe that if you were to do 'this.onAnswerDisplayTextChange.bind(this, a)' in your onAnswerDisplayText function, the first argument would be 'a' and the second argument would be the native browser event.","created_at":"2015-09-21T11:55:27Z","updated_at":"2015-09-21T11:55:27Z","html_url":"https://github.com/Dotarp/SumoChallenge/pull/1#discussion_r39962477","pull_request_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/comments/39962477"},"html":{"href":"https://github.com/Dotarp/SumoChallenge/pull/1#discussion_r39962477"},"pull_request":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1","id":45487192,"html_url":"https://github.com/Dotarp/SumoChallenge/pull/1","diff_url":"https://github.com/Dotarp/SumoChallenge/pull/1.diff","patch_url":"https://github.com/Dotarp/SumoChallenge/pull/1.patch","issue_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/1","number":1,"state":"open","locked":false,"title":"Take one","user":{"login":"Dotarp","id":7982432,"avatar_url":"https://avatars.githubusercontent.com/u/7982432?v=3","gravatar_id":"","url":"https://api.github.com/users/Dotarp","html_url":"https://github.com/Dotarp","followers_url":"https://api.github.com/users/Dotarp/followers","following_url":"https://api.github.com/users/Dotarp/following{/other_user}","gists_url":"https://api.github.com/users/Dotarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Dotarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dotarp/subscriptions","organizations_url":"https://api.github.com/users/Dotarp/orgs","repos_url":"https://api.github.com/users/Dotarp/repos","events_url":"https://api.github.com/users/Dotarp/events{/privacy}","received_events_url":"https://api.github.com/users/Dotarp/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-20T00:30:38Z","updated_at":"2015-09-21T11:55:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe18680892bf08e3dd5d6ff3f4a874a3aa8e5c70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/1/comments","statuses_url":"https://api.github.com/repos/Dotarp/SumoChallenge/statuses/b613c8255f26881fd252681cf24c81b188516104","head":{"label":"Dotarp:Review1","ref":"Review1","sha":"b613c8255f26881fd252681cf24c81b188516104","user":{"login":"Dotarp","id":7982432,"avatar_url":"https://avatars.githubusercontent.com/u/7982432?v=3","gravatar_id":"","url":"https://api.github.com/users/Dotarp","html_url":"https://github.com/Dotarp","followers_url":"https://api.github.com/users/Dotarp/followers","following_url":"https://api.github.com/users/Dotarp/following{/other_user}","gists_url":"https://api.github.com/users/Dotarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Dotarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dotarp/subscriptions","organizations_url":"https://api.github.com/users/Dotarp/orgs","repos_url":"https://api.github.com/users/Dotarp/repos","events_url":"https://api.github.com/users/Dotarp/events{/privacy}","received_events_url":"https://api.github.com/users/Dotarp/received_events","type":"User","site_admin":false},"repo":{"id":42794180,"name":"SumoChallenge","full_name":"Dotarp/SumoChallenge","owner":{"login":"Dotarp","id":7982432,"avatar_url":"https://avatars.githubusercontent.com/u/7982432?v=3","gravatar_id":"","url":"https://api.github.com/users/Dotarp","html_url":"https://github.com/Dotarp","followers_url":"https://api.github.com/users/Dotarp/followers","following_url":"https://api.github.com/users/Dotarp/following{/other_user}","gists_url":"https://api.github.com/users/Dotarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Dotarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dotarp/subscriptions","organizations_url":"https://api.github.com/users/Dotarp/orgs","repos_url":"https://api.github.com/users/Dotarp/repos","events_url":"https://api.github.com/users/Dotarp/events{/privacy}","received_events_url":"https://api.github.com/users/Dotarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dotarp/SumoChallenge","description":"","fork":false,"url":"https://api.github.com/repos/Dotarp/SumoChallenge","forks_url":"https://api.github.com/repos/Dotarp/SumoChallenge/forks","keys_url":"https://api.github.com/repos/Dotarp/SumoChallenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dotarp/SumoChallenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dotarp/SumoChallenge/teams","hooks_url":"https://api.github.com/repos/Dotarp/SumoChallenge/hooks","issue_events_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/events{/number}","events_url":"https://api.github.com/repos/Dotarp/SumoChallenge/events","assignees_url":"https://api.github.com/repos/Dotarp/SumoChallenge/assignees{/user}","branches_url":"https://api.github.com/repos/Dotarp/SumoChallenge/branches{/branch}","tags_url":"https://api.github.com/repos/Dotarp/SumoChallenge/tags","blobs_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dotarp/SumoChallenge/statuses/{sha}","languages_url":"https://api.github.com/repos/Dotarp/SumoChallenge/languages","stargazers_url":"https://api.github.com/repos/Dotarp/SumoChallenge/stargazers","contributors_url":"https://api.github.com/repos/Dotarp/SumoChallenge/contributors","subscribers_url":"https://api.github.com/repos/Dotarp/SumoChallenge/subscribers","subscription_url":"https://api.github.com/repos/Dotarp/SumoChallenge/subscription","commits_url":"https://api.github.com/repos/Dotarp/SumoChallenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dotarp/SumoChallenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dotarp/SumoChallenge/contents/{+path}","compare_url":"https://api.github.com/repos/Dotarp/SumoChallenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dotarp/SumoChallenge/merges","archive_url":"https://api.github.com/repos/Dotarp/SumoChallenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dotarp/SumoChallenge/downloads","issues_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues{/number}","pulls_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls{/number}","milestones_url":"https://api.github.com/repos/Dotarp/SumoChallenge/milestones{/number}","notifications_url":"https://api.github.com/repos/Dotarp/SumoChallenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dotarp/SumoChallenge/labels{/name}","releases_url":"https://api.github.com/repos/Dotarp/SumoChallenge/releases{/id}","created_at":"2015-09-20T00:07:12Z","updated_at":"2015-09-20T00:20:02Z","pushed_at":"2015-09-21T04:06:01Z","git_url":"git://github.com/Dotarp/SumoChallenge.git","ssh_url":"git@github.com:Dotarp/SumoChallenge.git","clone_url":"https://github.com/Dotarp/SumoChallenge.git","svn_url":"https://github.com/Dotarp/SumoChallenge","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Dotarp:master","ref":"master","sha":"80439c17a0d0b1d3ed8f4657dc7498eff2074421","user":{"login":"Dotarp","id":7982432,"avatar_url":"https://avatars.githubusercontent.com/u/7982432?v=3","gravatar_id":"","url":"https://api.github.com/users/Dotarp","html_url":"https://github.com/Dotarp","followers_url":"https://api.github.com/users/Dotarp/followers","following_url":"https://api.github.com/users/Dotarp/following{/other_user}","gists_url":"https://api.github.com/users/Dotarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Dotarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dotarp/subscriptions","organizations_url":"https://api.github.com/users/Dotarp/orgs","repos_url":"https://api.github.com/users/Dotarp/repos","events_url":"https://api.github.com/users/Dotarp/events{/privacy}","received_events_url":"https://api.github.com/users/Dotarp/received_events","type":"User","site_admin":false},"repo":{"id":42794180,"name":"SumoChallenge","full_name":"Dotarp/SumoChallenge","owner":{"login":"Dotarp","id":7982432,"avatar_url":"https://avatars.githubusercontent.com/u/7982432?v=3","gravatar_id":"","url":"https://api.github.com/users/Dotarp","html_url":"https://github.com/Dotarp","followers_url":"https://api.github.com/users/Dotarp/followers","following_url":"https://api.github.com/users/Dotarp/following{/other_user}","gists_url":"https://api.github.com/users/Dotarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Dotarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dotarp/subscriptions","organizations_url":"https://api.github.com/users/Dotarp/orgs","repos_url":"https://api.github.com/users/Dotarp/repos","events_url":"https://api.github.com/users/Dotarp/events{/privacy}","received_events_url":"https://api.github.com/users/Dotarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dotarp/SumoChallenge","description":"","fork":false,"url":"https://api.github.com/repos/Dotarp/SumoChallenge","forks_url":"https://api.github.com/repos/Dotarp/SumoChallenge/forks","keys_url":"https://api.github.com/repos/Dotarp/SumoChallenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dotarp/SumoChallenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dotarp/SumoChallenge/teams","hooks_url":"https://api.github.com/repos/Dotarp/SumoChallenge/hooks","issue_events_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/events{/number}","events_url":"https://api.github.com/repos/Dotarp/SumoChallenge/events","assignees_url":"https://api.github.com/repos/Dotarp/SumoChallenge/assignees{/user}","branches_url":"https://api.github.com/repos/Dotarp/SumoChallenge/branches{/branch}","tags_url":"https://api.github.com/repos/Dotarp/SumoChallenge/tags","blobs_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dotarp/SumoChallenge/statuses/{sha}","languages_url":"https://api.github.com/repos/Dotarp/SumoChallenge/languages","stargazers_url":"https://api.github.com/repos/Dotarp/SumoChallenge/stargazers","contributors_url":"https://api.github.com/repos/Dotarp/SumoChallenge/contributors","subscribers_url":"https://api.github.com/repos/Dotarp/SumoChallenge/subscribers","subscription_url":"https://api.github.com/repos/Dotarp/SumoChallenge/subscription","commits_url":"https://api.github.com/repos/Dotarp/SumoChallenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dotarp/SumoChallenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dotarp/SumoChallenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dotarp/SumoChallenge/contents/{+path}","compare_url":"https://api.github.com/repos/Dotarp/SumoChallenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dotarp/SumoChallenge/merges","archive_url":"https://api.github.com/repos/Dotarp/SumoChallenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dotarp/SumoChallenge/downloads","issues_url":"https://api.github.com/repos/Dotarp/SumoChallenge/issues{/number}","pulls_url":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls{/number}","milestones_url":"https://api.github.com/repos/Dotarp/SumoChallenge/milestones{/number}","notifications_url":"https://api.github.com/repos/Dotarp/SumoChallenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dotarp/SumoChallenge/labels{/name}","releases_url":"https://api.github.com/repos/Dotarp/SumoChallenge/releases{/id}","created_at":"2015-09-20T00:07:12Z","updated_at":"2015-09-20T00:20:02Z","pushed_at":"2015-09-21T04:06:01Z","git_url":"git://github.com/Dotarp/SumoChallenge.git","ssh_url":"git@github.com:Dotarp/SumoChallenge.git","clone_url":"https://github.com/Dotarp/SumoChallenge.git","svn_url":"https://github.com/Dotarp/SumoChallenge","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1"},"html":{"href":"https://github.com/Dotarp/SumoChallenge/pull/1"},"issue":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/1"},"comments":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Dotarp/SumoChallenge/statuses/b613c8255f26881fd252681cf24c81b188516104"}}}}