{"action":"created","comment":{"url":"https://api.github.com/repos/aces/Loris/pulls/comments/39678117","id":39678117,"diff_hunk":"@@ -0,0 +1,485 @@\n+TabPane = React.createClass({\n+    render: function() {\n+        var classList = \"tab-pane\";\n+        if(this.props.Active) {\n+            classList += \" active\"\n+        }\n+        return (\n+            <div className={classList} id={this.props.TabId}>\n+                <h1>{this.props.Title}</h1>\n+                <br />\n+                {this.props.children}\n+            </div>\n+            );\n+    }\n+});\n+LoadPane = React.createClass({\n+\tgetInitialState: function() {\n+\t \treturn {\n+\t \t\talert: ''\n+\t \t};\n+\t},\n+\tchooseFile: function (e) {\n+\t\tvar value = e.target.files[0];\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\tfile: value,\n+\t\t\t\talert: ''\n+\t\t\t};\n+\t\t});\n+\t},\n+\tsetAlert: function (type) {\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\talert: type\n+\t\t\t};\n+\t\t});\n+\t},\n+\tresetAlert: function () {\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\talert: ''\n+\t\t\t};\n+\t\t});\n+\t},\n+\tloadFile: function () {\n+\t\tvar callback = {\n+\t\t\t\tsuccess: this.props.loadCallback,\n+\t\t\t\terror: this.setAlert\n+\t\t\t};\n+\t\tInstrument.load(this.state.file, callback);\n+\t},\n+\trender: function () {\n+\t\tvar spanDownStyle = {\n+\t\t\t\tdisplay: 'none'\n+\t\t\t},\n+\t\t\talert = '';\n+\t\tswitch (this.state.alert) {\n+\t\t\tcase 'success':\n+\t\t\t\talert = (\n+\t\t\t\t\t<div className=\"alert alert-success alert-dismissible\" role=\"alert\">\n+\t\t\t\t\t\t  <button type=\"button\" className=\"close\" onClick={this.resetAlert}><span aria-hidden=\"true\">&times;</span></button>\n+\t\t\t\t\t\t  <strong>Success!</strong> Instrument Loaded\n+\t\t\t\t\t</div>\n+\t\t\t\t)\n+\t\t\t\tbreak;\n+\t\t\tcase 'typeError':\n+\t\t\t\talert = (\n+\t\t\t\t\t<div className=\"alert alert-danger alert-dismissible\" role=\"alert\">\n+\t\t\t\t\t\t  <button type=\"button\" className=\"close\" onClick={this.resetAlert}><span aria-hidden=\"true\">&times;</span></button>\n+\t\t\t\t\t\t  <strong>Error!</strong> Wrong file format\n+\t\t\t\t\t</div>\n+\t\t\t\t)\n+\t\t\t\tbreak;\n+\t\t}\n+\t\treturn (\n+\t\t\t<TabPane Title=\"Load Instrument\"\n+                TabId={this.props.TabId}>\n+                \t<div className=\"col-sm-4 col-xs-12\">\n+                \t\t{alert}\n+\t\t\t\t\t\t<input className=\"fileUpload\"\n+\t\t\t\t\t\t\t   type=\"file\" id=\"instfile\"\n+\t\t\t            \t   onChange={this.chooseFile}\n+\t\t\t\t\t\t/>\n+\t\t\t            <br />\n+\t\t\t            <input className=\"btn btn-primary\"\n+\t\t\t            \t   type=\"button\" id=\"load\"\n+\t\t\t            \t   value=\"Load Instrument\"\n+\t\t\t            \t   onClick={this.loadFile}\n+\t\t\t            />\n+\t\t\t        </div>\n+\t\t\t</TabPane>\n+\t\t);\n+\t}\n+});\n+SavePane = React.createClass({\n+\tgetInitialState: function() {\n+\t \treturn {\n+\t \t\tfileName: '',\n+\t \t\tinstrumentName: ''\n+\t \t};\n+\t},\n+\tloadState: function(newState) {\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\tfileName: newState.fileName,\n+\t\t\t\tinstrumentName: newState.instrumentName\n+\t\t\t};\n+\t\t});\n+\t},\n+\tonChangeFile: function(e){\n+\t\tvar value = e.target.value;\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\tfileName: value\n+\t\t\t};\n+\t\t});\n+\t},\n+\tonChangeInst: function(e){\n+\t\tvar value = e.target.value;\n+\t\tthis.setState(function(state){\n+\t\t\treturn {\n+\t\t\t\tinstrumentName: value\n+\t\t\t};\n+\t\t});\n+\t},\n+\trender: function () {\n+\t\tvar value = this.state.fileName;\n+\t\treturn (\n+\t\t\t<TabPane Title=\"Save Instrument\"\n+                TabId={this.props.TabId}>\n+                \t<div className=\"form-group\">\n+                \t\t<div className=\"col-xs-12\">\n+\t\t\t                <label className=\"col-sm-2 control-label\">Filename: </label>\n+\t\t\t                <div className=\"col-sm-4\">\n+\t\t\t                    <input className=\"form-control\"\n+\t\t\t                    \t   type=\"text\" id=\"filename\"\n+\t\t\t                    \t   value={value}\n+\t\t\t                    \t   onChange={this.onChangeFile}\n+\t\t\t                   \t/>\n+\t\t\t                </div>\n+\t\t\t            </div>\n+\t\t\t            <br /><br />","path":"modules/instrument_builder/jsx/react.app.js","position":142,"original_position":142,"commit_id":"a821619fd99abb94fdbd10b16b8eeb247a14a5a9","original_commit_id":"a821619fd99abb94fdbd10b16b8eeb247a14a5a9","user":{"login":"driusan","id":498329,"avatar_url":"https://avatars.githubusercontent.com/u/498329?v=3","gravatar_id":"","url":"https://api.github.com/users/driusan","html_url":"https://github.com/driusan","followers_url":"https://api.github.com/users/driusan/followers","following_url":"https://api.github.com/users/driusan/following{/other_user}","gists_url":"https://api.github.com/users/driusan/gists{/gist_id}","starred_url":"https://api.github.com/users/driusan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driusan/subscriptions","organizations_url":"https://api.github.com/users/driusan/orgs","repos_url":"https://api.github.com/users/driusan/repos","events_url":"https://api.github.com/users/driusan/events{/privacy}","received_events_url":"https://api.github.com/users/driusan/received_events","type":"User","site_admin":false},"body":"should use appropriate css padding instead of br tags here too.","created_at":"2015-09-16T20:06:30Z","updated_at":"2015-09-16T20:06:30Z","html_url":"https://github.com/aces/Loris/pull/1245#discussion_r39678117","pull_request_url":"https://api.github.com/repos/aces/Loris/pulls/1245","_links":{"self":{"href":"https://api.github.com/repos/aces/Loris/pulls/comments/39678117"},"html":{"href":"https://github.com/aces/Loris/pull/1245#discussion_r39678117"},"pull_request":{"href":"https://api.github.com/repos/aces/Loris/pulls/1245"}}},"pull_request":{"url":"https://api.github.com/repos/aces/Loris/pulls/1245","id":45214320,"html_url":"https://github.com/aces/Loris/pull/1245","diff_url":"https://github.com/aces/Loris/pull/1245.diff","patch_url":"https://github.com/aces/Loris/pull/1245.patch","issue_url":"https://api.github.com/repos/aces/Loris/issues/1245","number":1245,"state":"open","locked":false,"title":"Instrument builder ui upgrade","user":{"login":"jstirling91","id":2818503,"avatar_url":"https://avatars.githubusercontent.com/u/2818503?v=3","gravatar_id":"","url":"https://api.github.com/users/jstirling91","html_url":"https://github.com/jstirling91","followers_url":"https://api.github.com/users/jstirling91/followers","following_url":"https://api.github.com/users/jstirling91/following{/other_user}","gists_url":"https://api.github.com/users/jstirling91/gists{/gist_id}","starred_url":"https://api.github.com/users/jstirling91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstirling91/subscriptions","organizations_url":"https://api.github.com/users/jstirling91/orgs","repos_url":"https://api.github.com/users/jstirling91/repos","events_url":"https://api.github.com/users/jstirling91/events{/privacy}","received_events_url":"https://api.github.com/users/jstirling91/received_events","type":"User","site_admin":false},"body":"Create a reactJS app for the instrument builder","created_at":"2015-09-16T19:33:39Z","updated_at":"2015-09-16T20:06:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d106e610065b7da6c96395973982b16d18631ed","assignee":null,"milestone":{"url":"https://api.github.com/repos/aces/Loris/milestones/4","html_url":"https://github.com/aces/Loris/milestones/15.10","labels_url":"https://api.github.com/repos/aces/Loris/milestones/4/labels","id":1050783,"number":4,"title":"15.10","description":"The October Release of Loris.","creator":{"login":"driusan","id":498329,"avatar_url":"https://avatars.githubusercontent.com/u/498329?v=3","gravatar_id":"","url":"https://api.github.com/users/driusan","html_url":"https://github.com/driusan","followers_url":"https://api.github.com/users/driusan/followers","following_url":"https://api.github.com/users/driusan/following{/other_user}","gists_url":"https://api.github.com/users/driusan/gists{/gist_id}","starred_url":"https://api.github.com/users/driusan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driusan/subscriptions","organizations_url":"https://api.github.com/users/driusan/orgs","repos_url":"https://api.github.com/users/driusan/repos","events_url":"https://api.github.com/users/driusan/events{/privacy}","received_events_url":"https://api.github.com/users/driusan/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":69,"state":"open","created_at":"2015-04-02T18:31:49Z","updated_at":"2015-09-16T19:33:39Z","due_on":"2015-10-15T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/aces/Loris/pulls/1245/commits","review_comments_url":"https://api.github.com/repos/aces/Loris/pulls/1245/comments","review_comment_url":"https://api.github.com/repos/aces/Loris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aces/Loris/issues/1245/comments","statuses_url":"https://api.github.com/repos/aces/Loris/statuses/a821619fd99abb94fdbd10b16b8eeb247a14a5a9","head":{"label":"jstirling91:instrument-builder-ui-upgrade","ref":"instrument-builder-ui-upgrade","sha":"a821619fd99abb94fdbd10b16b8eeb247a14a5a9","user":{"login":"jstirling91","id":2818503,"avatar_url":"https://avatars.githubusercontent.com/u/2818503?v=3","gravatar_id":"","url":"https://api.github.com/users/jstirling91","html_url":"https://github.com/jstirling91","followers_url":"https://api.github.com/users/jstirling91/followers","following_url":"https://api.github.com/users/jstirling91/following{/other_user}","gists_url":"https://api.github.com/users/jstirling91/gists{/gist_id}","starred_url":"https://api.github.com/users/jstirling91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstirling91/subscriptions","organizations_url":"https://api.github.com/users/jstirling91/orgs","repos_url":"https://api.github.com/users/jstirling91/repos","events_url":"https://api.github.com/users/jstirling91/events{/privacy}","received_events_url":"https://api.github.com/users/jstirling91/received_events","type":"User","site_admin":false},"repo":{"id":25377023,"name":"Loris","full_name":"jstirling91/Loris","owner":{"login":"jstirling91","id":2818503,"avatar_url":"https://avatars.githubusercontent.com/u/2818503?v=3","gravatar_id":"","url":"https://api.github.com/users/jstirling91","html_url":"https://github.com/jstirling91","followers_url":"https://api.github.com/users/jstirling91/followers","following_url":"https://api.github.com/users/jstirling91/following{/other_user}","gists_url":"https://api.github.com/users/jstirling91/gists{/gist_id}","starred_url":"https://api.github.com/users/jstirling91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstirling91/subscriptions","organizations_url":"https://api.github.com/users/jstirling91/orgs","repos_url":"https://api.github.com/users/jstirling91/repos","events_url":"https://api.github.com/users/jstirling91/events{/privacy}","received_events_url":"https://api.github.com/users/jstirling91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jstirling91/Loris","description":"LORIS (Longitudinal Online Research and Imaging System) is a web-accessible database solution for neuroimaging.","fork":true,"url":"https://api.github.com/repos/jstirling91/Loris","forks_url":"https://api.github.com/repos/jstirling91/Loris/forks","keys_url":"https://api.github.com/repos/jstirling91/Loris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jstirling91/Loris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jstirling91/Loris/teams","hooks_url":"https://api.github.com/repos/jstirling91/Loris/hooks","issue_events_url":"https://api.github.com/repos/jstirling91/Loris/issues/events{/number}","events_url":"https://api.github.com/repos/jstirling91/Loris/events","assignees_url":"https://api.github.com/repos/jstirling91/Loris/assignees{/user}","branches_url":"https://api.github.com/repos/jstirling91/Loris/branches{/branch}","tags_url":"https://api.github.com/repos/jstirling91/Loris/tags","blobs_url":"https://api.github.com/repos/jstirling91/Loris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jstirling91/Loris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jstirling91/Loris/git/refs{/sha}","trees_url":"https://api.github.com/repos/jstirling91/Loris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jstirling91/Loris/statuses/{sha}","languages_url":"https://api.github.com/repos/jstirling91/Loris/languages","stargazers_url":"https://api.github.com/repos/jstirling91/Loris/stargazers","contributors_url":"https://api.github.com/repos/jstirling91/Loris/contributors","subscribers_url":"https://api.github.com/repos/jstirling91/Loris/subscribers","subscription_url":"https://api.github.com/repos/jstirling91/Loris/subscription","commits_url":"https://api.github.com/repos/jstirling91/Loris/commits{/sha}","git_commits_url":"https://api.github.com/repos/jstirling91/Loris/git/commits{/sha}","comments_url":"https://api.github.com/repos/jstirling91/Loris/comments{/number}","issue_comment_url":"https://api.github.com/repos/jstirling91/Loris/issues/comments{/number}","contents_url":"https://api.github.com/repos/jstirling91/Loris/contents/{+path}","compare_url":"https://api.github.com/repos/jstirling91/Loris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jstirling91/Loris/merges","archive_url":"https://api.github.com/repos/jstirling91/Loris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jstirling91/Loris/downloads","issues_url":"https://api.github.com/repos/jstirling91/Loris/issues{/number}","pulls_url":"https://api.github.com/repos/jstirling91/Loris/pulls{/number}","milestones_url":"https://api.github.com/repos/jstirling91/Loris/milestones{/number}","notifications_url":"https://api.github.com/repos/jstirling91/Loris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jstirling91/Loris/labels{/name}","releases_url":"https://api.github.com/repos/jstirling91/Loris/releases{/id}","created_at":"2014-10-17T21:02:09Z","updated_at":"2015-05-08T19:25:46Z","pushed_at":"2015-09-16T19:30:35Z","git_url":"git://github.com/jstirling91/Loris.git","ssh_url":"git@github.com:jstirling91/Loris.git","clone_url":"https://github.com/jstirling91/Loris.git","svn_url":"https://github.com/jstirling91/Loris","homepage":"","size":61231,"stargazers_count":0,"watchers_count":0,"language":"Smarty","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aces:master","ref":"master","sha":"03d39bbebce183ff7475b9d0e522836a986e3308","user":{"login":"aces","id":472868,"avatar_url":"https://avatars.githubusercontent.com/u/472868?v=3","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"repo":{"id":1125630,"name":"Loris","full_name":"aces/Loris","owner":{"login":"aces","id":472868,"avatar_url":"https://avatars.githubusercontent.com/u/472868?v=3","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aces/Loris","description":"LORIS is a web-accessible database solution for longitudinal multi-site studies.","fork":false,"url":"https://api.github.com/repos/aces/Loris","forks_url":"https://api.github.com/repos/aces/Loris/forks","keys_url":"https://api.github.com/repos/aces/Loris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aces/Loris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aces/Loris/teams","hooks_url":"https://api.github.com/repos/aces/Loris/hooks","issue_events_url":"https://api.github.com/repos/aces/Loris/issues/events{/number}","events_url":"https://api.github.com/repos/aces/Loris/events","assignees_url":"https://api.github.com/repos/aces/Loris/assignees{/user}","branches_url":"https://api.github.com/repos/aces/Loris/branches{/branch}","tags_url":"https://api.github.com/repos/aces/Loris/tags","blobs_url":"https://api.github.com/repos/aces/Loris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aces/Loris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aces/Loris/git/refs{/sha}","trees_url":"https://api.github.com/repos/aces/Loris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aces/Loris/statuses/{sha}","languages_url":"https://api.github.com/repos/aces/Loris/languages","stargazers_url":"https://api.github.com/repos/aces/Loris/stargazers","contributors_url":"https://api.github.com/repos/aces/Loris/contributors","subscribers_url":"https://api.github.com/repos/aces/Loris/subscribers","subscription_url":"https://api.github.com/repos/aces/Loris/subscription","commits_url":"https://api.github.com/repos/aces/Loris/commits{/sha}","git_commits_url":"https://api.github.com/repos/aces/Loris/git/commits{/sha}","comments_url":"https://api.github.com/repos/aces/Loris/comments{/number}","issue_comment_url":"https://api.github.com/repos/aces/Loris/issues/comments{/number}","contents_url":"https://api.github.com/repos/aces/Loris/contents/{+path}","compare_url":"https://api.github.com/repos/aces/Loris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aces/Loris/merges","archive_url":"https://api.github.com/repos/aces/Loris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aces/Loris/downloads","issues_url":"https://api.github.com/repos/aces/Loris/issues{/number}","pulls_url":"https://api.github.com/repos/aces/Loris/pulls{/number}","milestones_url":"https://api.github.com/repos/aces/Loris/milestones{/number}","notifications_url":"https://api.github.com/repos/aces/Loris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aces/Loris/labels{/name}","releases_url":"https://api.github.com/repos/aces/Loris/releases{/id}","created_at":"2010-11-30T14:57:57Z","updated_at":"2015-09-16T08:45:03Z","pushed_at":"2015-09-16T19:52:50Z","git_url":"git://github.com/aces/Loris.git","ssh_url":"git@github.com:aces/Loris.git","clone_url":"https://github.com/aces/Loris.git","svn_url":"https://github.com/aces/Loris","homepage":"","size":70661,"stargazers_count":26,"watchers_count":26,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":40,"forks":41,"open_issues":40,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aces/Loris/pulls/1245"},"html":{"href":"https://github.com/aces/Loris/pull/1245"},"issue":{"href":"https://api.github.com/repos/aces/Loris/issues/1245"},"comments":{"href":"https://api.github.com/repos/aces/Loris/issues/1245/comments"},"review_comments":{"href":"https://api.github.com/repos/aces/Loris/pulls/1245/comments"},"review_comment":{"href":"https://api.github.com/repos/aces/Loris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aces/Loris/pulls/1245/commits"},"statuses":{"href":"https://api.github.com/repos/aces/Loris/statuses/a821619fd99abb94fdbd10b16b8eeb247a14a5a9"}}}}