{"action":"created","comment":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments/35918290","id":35918290,"diff_hunk":"@@ -114,3 +187,89 @@ var RefreshButton = React.createClass({\n     </button>;\n   },\n });\n+\n+/**\n+ * Calls its onClick prop to reset table greying/sorting\n+ */\n+var ResetButton = React.createClass({\n+  propTypes: {\n+    onClick: React.PropTypes.func.isRequired,\n+  },\n+\n+  render: function () {\n+    return <button onClick={this.props.onClick} className=\"reset-button\">\n+      Reset\n+    </button>;\n+  },\n+});\n+\n+// Modified from react-json-table example code.\n+var SelectTable = React.createClass({\n+  \n+  propTypes: {\n+    rows: React.PropTypes.array.isRequired,\n+    saveState: React.PropTypes.shape({\n+      greyed: React.PropTypes.object.isRequired,\n+      sort: React.PropTypes.any.isRequired,\n+      reverse: React.PropTypes.bool.isRequired\n+    }).isRequired,\n+    header: React.PropTypes.bool.isRequired,\n+    columns: React.PropTypes.array,\n+    clickHeader: React.PropTypes.func.isRequired,\n+    clickRow: React.PropTypes.func.isRequired\n+  },\n+    \n+  getInitialState: function(){\n+    return {sort: this.props.saveState.sort, greyed: this.props.saveState.greyed, reverse: this.props.saveState.reverse};","path":"esp/public/media/scripts/program/modules/scheduling_checks.jsx","position":146,"original_position":146,"commit_id":"0bc91b6f97708cb70afe16e773a8eca856d00343","original_commit_id":"0bc91b6f97708cb70afe16e773a8eca856d00343","user":{"login":"benjaminjkraft","id":111238,"avatar_url":"https://avatars.githubusercontent.com/u/111238?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminjkraft","html_url":"https://github.com/benjaminjkraft","followers_url":"https://api.github.com/users/benjaminjkraft/followers","following_url":"https://api.github.com/users/benjaminjkraft/following{/other_user}","gists_url":"https://api.github.com/users/benjaminjkraft/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminjkraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminjkraft/subscriptions","organizations_url":"https://api.github.com/users/benjaminjkraft/orgs","repos_url":"https://api.github.com/users/benjaminjkraft/repos","events_url":"https://api.github.com/users/benjaminjkraft/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminjkraft/received_events","type":"User","site_admin":false},"body":"This state is no longer getting modified, so you may as well just remove it, and change the references to get everything directly from props.","created_at":"2015-07-30T20:45:49Z","updated_at":"2015-07-30T20:45:49Z","html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721#discussion_r35918290","pull_request_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721","_links":{"self":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments/35918290"},"html":{"href":"https://github.com/learning-unlimited/ESP-Website/pull/1721#discussion_r35918290"},"pull_request":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721"}}},"pull_request":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721","id":39130372,"html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721","diff_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721.diff","patch_url":"https://github.com/learning-unlimited/ESP-Website/pull/1721.patch","issue_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721","number":1721,"state":"open","locked":false,"title":"React-ify scheduling check output tables","user":{"login":"jerrywu64","id":7077919,"avatar_url":"https://avatars.githubusercontent.com/u/7077919?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrywu64","html_url":"https://github.com/jerrywu64","followers_url":"https://api.github.com/users/jerrywu64/followers","following_url":"https://api.github.com/users/jerrywu64/following{/other_user}","gists_url":"https://api.github.com/users/jerrywu64/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrywu64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrywu64/subscriptions","organizations_url":"https://api.github.com/users/jerrywu64/orgs","repos_url":"https://api.github.com/users/jerrywu64/repos","events_url":"https://api.github.com/users/jerrywu64/events{/privacy}","received_events_url":"https://api.github.com/users/jerrywu64/received_events","type":"User","site_admin":false},"body":"Addresses #1687.\r\n\r\nSome notes (some of which are mentioned in in-code comments):\r\nI didn't touch HTMLSCFormatter. It looks to me like there isn't actually any code which uses it (except for scheduling checks obviously except those now use JSONFormatter), but idk if it'll be useful in the future.\r\nJSONFormatter possibly contains redundant code, but maybe the code is useful for making sure things are formatted properly-- I didn't check preconditions/postconditions carefully enough to tell.\r\nI'm using JSON.parse() which apparently isn't supported in old browsers, idk if we care about that for a management page.\r\nChanges in public/media/styles/scheduling_checks.css are needed, but that's in .gitignore; stuff I added is below. (My devserver originally didn't even have this file, so I don't know what other people's  scheduling_checks.css files look like or if this conflicts.)\r\nScheduling check tables now enable sorting (upon header click) and greying-out of a row (upon row click, *provided that you make the appropriate change in scheduling_checks.css*. I didn't add any buttons to this effect, though (in my css I did do cursor:pointer-- although it's for the whole table so this is kind of silly), and the sorting can be kinda sketchy.\r\nSorting and greying does not persist across closing and reopening the scheduling check, let alone refreshing.\r\n\r\nAdditions to scheduling_checks.css:\r\ntable { border-spacing: 0; }\r\ntd { padding: 10px; cursor: pointer; }\r\nth { cursor: pointer; }\r\n.rowGreyed {\r\ncolor: grey;\r\n}\r\n.headerSelected {\r\n  color: blue;\r\n}\r\n\r\nPeople probably have opinions on the changes made, so feel free to comment. Although I note that if you want slightly different behavior upon clicking a row, if it's doable in css, you can probably just do it in css on your end.","created_at":"2015-07-02T22:03:49Z","updated_at":"2015-07-30T20:45:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e38329bf60728924158bdfca1373674ec2d7d46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721/commits","review_comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721/comments","review_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721/comments","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/0bc91b6f97708cb70afe16e773a8eca856d00343","head":{"label":"learning-unlimited:hide-scheduling-checks","ref":"hide-scheduling-checks","sha":"0bc91b6f97708cb70afe16e773a8eca856d00343","user":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":2643878,"name":"ESP-Website","full_name":"learning-unlimited/ESP-Website","owner":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learning-unlimited/ESP-Website","description":"A website to help manage the logistics of large short-term educational programs","fork":false,"url":"https://api.github.com/repos/learning-unlimited/ESP-Website","forks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/forks","keys_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/teams","hooks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/hooks","issue_events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/events{/number}","events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/events","assignees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/assignees{/user}","branches_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/branches{/branch}","tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/tags","blobs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/refs{/sha}","trees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/{sha}","languages_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/languages","stargazers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/stargazers","contributors_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contributors","subscribers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscribers","subscription_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscription","commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/commits{/sha}","git_commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/commits{/sha}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/comments{/number}","issue_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/comments{/number}","contents_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contents/{+path}","compare_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/merges","archive_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/downloads","issues_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues{/number}","pulls_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls{/number}","milestones_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/milestones{/number}","notifications_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/labels{/name}","releases_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/releases{/id}","created_at":"2011-10-25T14:30:31Z","updated_at":"2015-05-18T01:44:06Z","pushed_at":"2015-07-30T19:39:47Z","git_url":"git://github.com/learning-unlimited/ESP-Website.git","ssh_url":"git@github.com:learning-unlimited/ESP-Website.git","clone_url":"https://github.com/learning-unlimited/ESP-Website.git","svn_url":"https://github.com/learning-unlimited/ESP-Website","homepage":"","size":58419,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":628,"forks":35,"open_issues":628,"watchers":49,"default_branch":"main"}},"base":{"label":"learning-unlimited:main","ref":"main","sha":"61b467562a82dabb0e8247038995d67309e8e4a2","user":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":2643878,"name":"ESP-Website","full_name":"learning-unlimited/ESP-Website","owner":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learning-unlimited/ESP-Website","description":"A website to help manage the logistics of large short-term educational programs","fork":false,"url":"https://api.github.com/repos/learning-unlimited/ESP-Website","forks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/forks","keys_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/teams","hooks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/hooks","issue_events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/events{/number}","events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/events","assignees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/assignees{/user}","branches_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/branches{/branch}","tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/tags","blobs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/refs{/sha}","trees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/{sha}","languages_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/languages","stargazers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/stargazers","contributors_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contributors","subscribers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscribers","subscription_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscription","commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/commits{/sha}","git_commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/commits{/sha}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/comments{/number}","issue_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/comments{/number}","contents_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contents/{+path}","compare_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/merges","archive_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/downloads","issues_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues{/number}","pulls_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls{/number}","milestones_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/milestones{/number}","notifications_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/labels{/name}","releases_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/releases{/id}","created_at":"2011-10-25T14:30:31Z","updated_at":"2015-05-18T01:44:06Z","pushed_at":"2015-07-30T19:39:47Z","git_url":"git://github.com/learning-unlimited/ESP-Website.git","ssh_url":"git@github.com:learning-unlimited/ESP-Website.git","clone_url":"https://github.com/learning-unlimited/ESP-Website.git","svn_url":"https://github.com/learning-unlimited/ESP-Website","homepage":"","size":58419,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":628,"forks":35,"open_issues":628,"watchers":49,"default_branch":"main"}},"_links":{"self":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721"},"html":{"href":"https://github.com/learning-unlimited/ESP-Website/pull/1721"},"issue":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721"},"comments":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1721/comments"},"review_comments":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721/comments"},"review_comment":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1721/commits"},"statuses":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/0bc91b6f97708cb70afe16e773a8eca856d00343"}}}}