{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/36187663","id":36187663,"diff_hunk":"@@ -86,12 +90,31 @@ var FileRevisionsTable = {\n             });\n         };\n \n+        self.showModal = function(hashName, index, hash) {\n+            var showModal = bootbox.dialog({\n+                title: 'Version ' + index + ' ' + hashName + ' hash',\n+                message: '<div class=\"row\">  ' +\n+                    '<div class=\"col-md-12\">' +\n+                    '<div class=\"control-group\">' +'<p class=\"col-xs-10\">' + hash + '</p>' +\n+                    '<a class=\"btn-sm btn-primary col-xs-2\" style=\"align: right; text-align: center; ' +\n+                    'padding: 5px; width: 80px\" id=\"copyBtn\" data-clipboard-text=\"' +","path":"website/static/js/filepage/revisions.js","position":36,"original_position":36,"commit_id":"aca119209c766110000a7d46de4a1750a18fc503","original_commit_id":"aca119209c766110000a7d46de4a1750a18fc503","user":{"login":"lyndsysimon","id":131414,"avatar_url":"https://avatars.githubusercontent.com/u/131414?v=3","gravatar_id":"","url":"https://api.github.com/users/lyndsysimon","html_url":"https://github.com/lyndsysimon","followers_url":"https://api.github.com/users/lyndsysimon/followers","following_url":"https://api.github.com/users/lyndsysimon/following{/other_user}","gists_url":"https://api.github.com/users/lyndsysimon/gists{/gist_id}","starred_url":"https://api.github.com/users/lyndsysimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyndsysimon/subscriptions","organizations_url":"https://api.github.com/users/lyndsysimon/orgs","repos_url":"https://api.github.com/users/lyndsysimon/repos","events_url":"https://api.github.com/users/lyndsysimon/events{/privacy}","received_events_url":"https://api.github.com/users/lyndsysimon/received_events","type":"User","site_admin":false},"body":"Can we do without this hardcoded width? (\"`80px`\").\r\n\r\nAlso, these buttons are touching, but are not part of a button bar. They should either be separated by an appropriate margin, or they should be joined into a bar. I defer to @caneruguz as to what it should look like.\r\n\r\nFinally, the height of these buttons is inconsistent with the height of the download button to the right","created_at":"2015-08-04T13:36:43Z","updated_at":"2015-08-04T13:36:43Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3517#discussion_r36187663","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/36187663"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3517#discussion_r36187663"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517","id":39616694,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3517","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/3517.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/3517.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3517","number":3517,"state":"open","locked":false,"title":"[Feature] MD5+SHA256 Hashes available in the file view page and through the api.","user":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"body":"## Purpose\r\nAdd md5 and sha256 information for osfstorage files and when other addons provide it. Then, use that information on the file view page to view the hashes for every version and every file in osfstorage. Also allows future use of the hashes through the api. \r\nThis accompanies waterbutler PR: https://github.com/CenterForOpenScience/waterbutler/pull/58, and both need to be merged for it to work.\r\n\r\n## Changes\r\nAdd a hashes section to the revision view in file page:\r\n![screen shot 2015-07-14 at 10 18 18 am](https://cloud.githubusercontent.com/assets/6268982/8675400/b6536fa0-2a11-11e5-8d0f-c3ac36093d9b.png)\r\n\r\n![screen shot 2015-07-14 at 10 18 28 am](https://cloud.githubusercontent.com/assets/6268982/8675403/b83cb89e-2a11-11e5-9d01-7dd464ffa266.png)\r\n\r\nAlso md5 and sha256 hash for any file is available through the API under ```metadata['extra']['hashes']```\r\n\r\n## Side Effects\r\nWhen viewing both revisions and the file, the revisions table gets clipped and the buttons pop out.\r\nCurrently in production:\r\n![screen shot 2015-07-14 at 10 20 18 am](https://cloud.githubusercontent.com/assets/6268982/8675454/0d94711a-2a12-11e5-9e46-250895fbc938.png)\r\n\r\nThe side effect, making the problem worse:\r\n![screen shot 2015-07-14 at 10 20 39 am](https://cloud.githubusercontent.com/assets/6268982/8675483/2fb73c82-2a12-11e5-9894-1fe4f087431c.png)\r\n\r\nAlso, the copy button uses zeroClipboard, meaning it will only work if the browser has flash 11+ enabled. \r\nhttps://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md#limitations\r\nIt also has known bugs with IE (due to being within a modal) and Opera.\r\nhttps://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md#known-conflicts-with-other-libraries \r\n ","created_at":"2015-07-09T19:02:03Z","updated_at":"2015-08-04T13:36:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"837eacb76d5f48fdf405a7a7b42e8d21ab3eac31","assignee":{"login":"lyndsysimon","id":131414,"avatar_url":"https://avatars.githubusercontent.com/u/131414?v=3","gravatar_id":"","url":"https://api.github.com/users/lyndsysimon","html_url":"https://github.com/lyndsysimon","followers_url":"https://api.github.com/users/lyndsysimon/followers","following_url":"https://api.github.com/users/lyndsysimon/following{/other_user}","gists_url":"https://api.github.com/users/lyndsysimon/gists{/gist_id}","starred_url":"https://api.github.com/users/lyndsysimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyndsysimon/subscriptions","organizations_url":"https://api.github.com/users/lyndsysimon/orgs","repos_url":"https://api.github.com/users/lyndsysimon/repos","events_url":"https://api.github.com/users/lyndsysimon/events{/privacy}","received_events_url":"https://api.github.com/users/lyndsysimon/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/45","html_url":"https://github.com/CenterForOpenScience/osf.io/milestones/0.46.0","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/45/labels","id":1235545,"number":45,"title":"0.46.0","description":"","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":3,"state":"open","created_at":"2015-07-31T18:20:56Z","updated_at":"2015-08-03T19:34:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3517/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/aca119209c766110000a7d46de4a1750a18fc503","head":{"label":"hmoco:feature/md5_show","ref":"feature/md5_show","sha":"aca119209c766110000a7d46de4a1750a18fc503","user":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"repo":{"id":36302791,"name":"osf.io","full_name":"hmoco/osf.io","owner":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hmoco/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/hmoco/osf.io","forks_url":"https://api.github.com/repos/hmoco/osf.io/forks","keys_url":"https://api.github.com/repos/hmoco/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmoco/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmoco/osf.io/teams","hooks_url":"https://api.github.com/repos/hmoco/osf.io/hooks","issue_events_url":"https://api.github.com/repos/hmoco/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/hmoco/osf.io/events","assignees_url":"https://api.github.com/repos/hmoco/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/hmoco/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/hmoco/osf.io/tags","blobs_url":"https://api.github.com/repos/hmoco/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmoco/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmoco/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmoco/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmoco/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/hmoco/osf.io/languages","stargazers_url":"https://api.github.com/repos/hmoco/osf.io/stargazers","contributors_url":"https://api.github.com/repos/hmoco/osf.io/contributors","subscribers_url":"https://api.github.com/repos/hmoco/osf.io/subscribers","subscription_url":"https://api.github.com/repos/hmoco/osf.io/subscription","commits_url":"https://api.github.com/repos/hmoco/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmoco/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmoco/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmoco/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmoco/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/hmoco/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmoco/osf.io/merges","archive_url":"https://api.github.com/repos/hmoco/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmoco/osf.io/downloads","issues_url":"https://api.github.com/repos/hmoco/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/hmoco/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/hmoco/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/hmoco/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmoco/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/hmoco/osf.io/releases{/id}","created_at":"2015-05-26T14:49:58Z","updated_at":"2015-05-26T14:50:02Z","pushed_at":"2015-08-03T21:09:10Z","git_url":"git://github.com/hmoco/osf.io.git","ssh_url":"git@github.com:hmoco/osf.io.git","clone_url":"https://github.com/hmoco/osf.io.git","svn_url":"https://github.com/hmoco/osf.io","homepage":"http://osf.io","size":98196,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"8874bc1a3b345c498fd98c1142c082ac83963709","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-08-04T08:21:21Z","pushed_at":"2015-08-04T13:27:44Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":220860,"stargazers_count":124,"watchers_count":124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":509,"forks":106,"open_issues":509,"watchers":124,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3517"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3517"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3517/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3517/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/aca119209c766110000a7d46de4a1750a18fc503"}}}}