{"action":"created","comment":{"url":"https://api.github.com/repos/reed-college/lemur/pulls/comments/72526506","id":72526506,"diff_hunk":"@@ -0,0 +1,78 @@\n+\n+$(document).ready(function(){\n+    //Modify an existing lab\n+    $('.modifyLab').click(function(){\n+        var labId = $(this).closest('tr').data('labid');\n+        window.location.replace('/admin_modify_lab/'+labId);        \n+    });\n+    // The reason that we use javascript to show the modal rather than html is that this enables us\n+    // to show the modal that is closest to the delete button such that the modal is within the tr\n+    // that we want to delete\n+    $('.deleteLab').click(function(){\n+        $(this).closest('tr').find('#deleteConfirm').modal(\"show\");\n+    });\n+\n+    //Duplicate/Delete a lab\n+    $('.duplicateLab').add($('button[name=confirm]')).click(function(){\n+        var operation = $(this).data('operation');\n+        var labId = $(this).closest('tr').data('labid');\n+        //Communicate the name of the lab to be duplicated with python via Ajax \n+        $.ajax({\n+          type: 'POST',\n+          contentType: 'application/json',\n+          dataType: 'json',\n+          url: 'http://127.0.0.1:5000/_admin_'+operation,\n+          data: JSON.stringify({'labId':labId}),\n+          success: function(result){\n+                    console.log(operation+' successfully');               \n+                },\n+          error : function(result){\n+                  console.log('Fail to '+operation);","path":"lemur/static/js/admin_create_and_manage_lab.js","position":31,"original_position":30,"commit_id":"42109d50aa5dd66157db736cefb477ae9a518350","original_commit_id":"b1d2aba171ed0923e7c3d00bd3ea6bd2575530f1","user":{"login":"AIasd","id":12670254,"avatar_url":"https://avatars.githubusercontent.com/u/12670254?v=3","gravatar_id":"","url":"https://api.github.com/users/AIasd","html_url":"https://github.com/AIasd","followers_url":"https://api.github.com/users/AIasd/followers","following_url":"https://api.github.com/users/AIasd/following{/other_user}","gists_url":"https://api.github.com/users/AIasd/gists{/gist_id}","starred_url":"https://api.github.com/users/AIasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIasd/subscriptions","organizations_url":"https://api.github.com/users/AIasd/orgs","repos_url":"https://api.github.com/users/AIasd/repos","events_url":"https://api.github.com/users/AIasd/events{/privacy}","received_events_url":"https://api.github.com/users/AIasd/received_events","type":"User","site_admin":false},"body":"The duplicated lab will be directly shown on the webpage.\r\nIn the following example, I click the duplicate button in order to duplicate 2Cortisol. A copy is created and shown on the page after I click on the button.\r\n<img width=\"1129\" alt=\"screen shot 2016-07-27 at 2 21 27 pm\" src=\"https://cloud.githubusercontent.com/assets/12670254/17192915/7796ac68-5405-11e6-8b8a-c8499fc51ab8.png\">\r\n","created_at":"2016-07-27T21:22:41Z","updated_at":"2016-07-27T21:22:41Z","html_url":"https://github.com/reed-college/lemur/pull/14#discussion_r72526506","pull_request_url":"https://api.github.com/repos/reed-college/lemur/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/comments/72526506"},"html":{"href":"https://github.com/reed-college/lemur/pull/14#discussion_r72526506"},"pull_request":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/reed-college/lemur/pulls/14","id":78243532,"html_url":"https://github.com/reed-college/lemur/pull/14","diff_url":"https://github.com/reed-college/lemur/pull/14.diff","patch_url":"https://github.com/reed-college/lemur/pull/14.patch","issue_url":"https://api.github.com/repos/reed-college/lemur/issues/14","number":14,"state":"open","locked":false,"title":"update front-end code to the latest version","user":{"login":"AIasd","id":12670254,"avatar_url":"https://avatars.githubusercontent.com/u/12670254?v=3","gravatar_id":"","url":"https://api.github.com/users/AIasd","html_url":"https://github.com/AIasd","followers_url":"https://api.github.com/users/AIasd/followers","following_url":"https://api.github.com/users/AIasd/following{/other_user}","gists_url":"https://api.github.com/users/AIasd/gists{/gist_id}","starred_url":"https://api.github.com/users/AIasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIasd/subscriptions","organizations_url":"https://api.github.com/users/AIasd/orgs","repos_url":"https://api.github.com/users/AIasd/repos","events_url":"https://api.github.com/users/AIasd/events{/privacy}","received_events_url":"https://api.github.com/users/AIasd/received_events","type":"User","site_admin":false},"body":"This pull request is only for updating the front end code","created_at":"2016-07-21T01:01:57Z","updated_at":"2016-07-27T21:22:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d602eef16ff9cf3afe39be7cc592670190adbb1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/reed-college/lemur/pulls/14/commits","review_comments_url":"https://api.github.com/repos/reed-college/lemur/pulls/14/comments","review_comment_url":"https://api.github.com/repos/reed-college/lemur/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reed-college/lemur/issues/14/comments","statuses_url":"https://api.github.com/repos/reed-college/lemur/statuses/42109d50aa5dd66157db736cefb477ae9a518350","head":{"label":"reed-college:mergeprep2","ref":"mergeprep2","sha":"42109d50aa5dd66157db736cefb477ae9a518350","user":{"login":"reed-college","id":6775928,"avatar_url":"https://avatars.githubusercontent.com/u/6775928?v=3","gravatar_id":"","url":"https://api.github.com/users/reed-college","html_url":"https://github.com/reed-college","followers_url":"https://api.github.com/users/reed-college/followers","following_url":"https://api.github.com/users/reed-college/following{/other_user}","gists_url":"https://api.github.com/users/reed-college/gists{/gist_id}","starred_url":"https://api.github.com/users/reed-college/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reed-college/subscriptions","organizations_url":"https://api.github.com/users/reed-college/orgs","repos_url":"https://api.github.com/users/reed-college/repos","events_url":"https://api.github.com/users/reed-college/events{/privacy}","received_events_url":"https://api.github.com/users/reed-college/received_events","type":"Organization","site_admin":false},"repo":{"id":59132723,"name":"lemur","full_name":"reed-college/lemur","owner":{"login":"reed-college","id":6775928,"avatar_url":"https://avatars.githubusercontent.com/u/6775928?v=3","gravatar_id":"","url":"https://api.github.com/users/reed-college","html_url":"https://github.com/reed-college","followers_url":"https://api.github.com/users/reed-college/followers","following_url":"https://api.github.com/users/reed-college/following{/other_user}","gists_url":"https://api.github.com/users/reed-college/gists{/gist_id}","starred_url":"https://api.github.com/users/reed-college/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reed-college/subscriptions","organizations_url":"https://api.github.com/users/reed-college/orgs","repos_url":"https://api.github.com/users/reed-college/repos","events_url":"https://api.github.com/users/reed-college/events{/privacy}","received_events_url":"https://api.github.com/users/reed-college/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reed-college/lemur","description":"Bio data collector","fork":false,"url":"https://api.github.com/repos/reed-college/lemur","forks_url":"https://api.github.com/repos/reed-college/lemur/forks","keys_url":"https://api.github.com/repos/reed-college/lemur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reed-college/lemur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reed-college/lemur/teams","hooks_url":"https://api.github.com/repos/reed-college/lemur/hooks","issue_events_url":"https://api.github.com/repos/reed-college/lemur/issues/events{/number}","events_url":"https://api.github.com/repos/reed-college/lemur/events","assignees_url":"https://api.github.com/repos/reed-college/lemur/assignees{/user}","branches_url":"https://api.github.com/repos/reed-college/lemur/branches{/branch}","tags_url":"https://api.github.com/repos/reed-college/lemur/tags","blobs_url":"https://api.github.com/repos/reed-college/lemur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reed-college/lemur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reed-college/lemur/git/refs{/sha}","trees_url":"https://api.github.com/repos/reed-college/lemur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reed-college/lemur/statuses/{sha}","languages_url":"https://api.github.com/repos/reed-college/lemur/languages","stargazers_url":"https://api.github.com/repos/reed-college/lemur/stargazers","contributors_url":"https://api.github.com/repos/reed-college/lemur/contributors","subscribers_url":"https://api.github.com/repos/reed-college/lemur/subscribers","subscription_url":"https://api.github.com/repos/reed-college/lemur/subscription","commits_url":"https://api.github.com/repos/reed-college/lemur/commits{/sha}","git_commits_url":"https://api.github.com/repos/reed-college/lemur/git/commits{/sha}","comments_url":"https://api.github.com/repos/reed-college/lemur/comments{/number}","issue_comment_url":"https://api.github.com/repos/reed-college/lemur/issues/comments{/number}","contents_url":"https://api.github.com/repos/reed-college/lemur/contents/{+path}","compare_url":"https://api.github.com/repos/reed-college/lemur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reed-college/lemur/merges","archive_url":"https://api.github.com/repos/reed-college/lemur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reed-college/lemur/downloads","issues_url":"https://api.github.com/repos/reed-college/lemur/issues{/number}","pulls_url":"https://api.github.com/repos/reed-college/lemur/pulls{/number}","milestones_url":"https://api.github.com/repos/reed-college/lemur/milestones{/number}","notifications_url":"https://api.github.com/repos/reed-college/lemur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reed-college/lemur/labels{/name}","releases_url":"https://api.github.com/repos/reed-college/lemur/releases{/id}","deployments_url":"https://api.github.com/repos/reed-college/lemur/deployments","created_at":"2016-05-18T16:24:19Z","updated_at":"2016-07-20T21:32:12Z","pushed_at":"2016-07-27T21:19:04Z","git_url":"git://github.com/reed-college/lemur.git","ssh_url":"git@github.com:reed-college/lemur.git","clone_url":"https://github.com/reed-college/lemur.git","svn_url":"https://github.com/reed-college/lemur","homepage":null,"size":4448,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"reed-college:master","ref":"master","sha":"d6b9f7aeddc7ceb3142b5cc027caa0087341a23f","user":{"login":"reed-college","id":6775928,"avatar_url":"https://avatars.githubusercontent.com/u/6775928?v=3","gravatar_id":"","url":"https://api.github.com/users/reed-college","html_url":"https://github.com/reed-college","followers_url":"https://api.github.com/users/reed-college/followers","following_url":"https://api.github.com/users/reed-college/following{/other_user}","gists_url":"https://api.github.com/users/reed-college/gists{/gist_id}","starred_url":"https://api.github.com/users/reed-college/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reed-college/subscriptions","organizations_url":"https://api.github.com/users/reed-college/orgs","repos_url":"https://api.github.com/users/reed-college/repos","events_url":"https://api.github.com/users/reed-college/events{/privacy}","received_events_url":"https://api.github.com/users/reed-college/received_events","type":"Organization","site_admin":false},"repo":{"id":59132723,"name":"lemur","full_name":"reed-college/lemur","owner":{"login":"reed-college","id":6775928,"avatar_url":"https://avatars.githubusercontent.com/u/6775928?v=3","gravatar_id":"","url":"https://api.github.com/users/reed-college","html_url":"https://github.com/reed-college","followers_url":"https://api.github.com/users/reed-college/followers","following_url":"https://api.github.com/users/reed-college/following{/other_user}","gists_url":"https://api.github.com/users/reed-college/gists{/gist_id}","starred_url":"https://api.github.com/users/reed-college/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reed-college/subscriptions","organizations_url":"https://api.github.com/users/reed-college/orgs","repos_url":"https://api.github.com/users/reed-college/repos","events_url":"https://api.github.com/users/reed-college/events{/privacy}","received_events_url":"https://api.github.com/users/reed-college/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reed-college/lemur","description":"Bio data collector","fork":false,"url":"https://api.github.com/repos/reed-college/lemur","forks_url":"https://api.github.com/repos/reed-college/lemur/forks","keys_url":"https://api.github.com/repos/reed-college/lemur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reed-college/lemur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reed-college/lemur/teams","hooks_url":"https://api.github.com/repos/reed-college/lemur/hooks","issue_events_url":"https://api.github.com/repos/reed-college/lemur/issues/events{/number}","events_url":"https://api.github.com/repos/reed-college/lemur/events","assignees_url":"https://api.github.com/repos/reed-college/lemur/assignees{/user}","branches_url":"https://api.github.com/repos/reed-college/lemur/branches{/branch}","tags_url":"https://api.github.com/repos/reed-college/lemur/tags","blobs_url":"https://api.github.com/repos/reed-college/lemur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reed-college/lemur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reed-college/lemur/git/refs{/sha}","trees_url":"https://api.github.com/repos/reed-college/lemur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reed-college/lemur/statuses/{sha}","languages_url":"https://api.github.com/repos/reed-college/lemur/languages","stargazers_url":"https://api.github.com/repos/reed-college/lemur/stargazers","contributors_url":"https://api.github.com/repos/reed-college/lemur/contributors","subscribers_url":"https://api.github.com/repos/reed-college/lemur/subscribers","subscription_url":"https://api.github.com/repos/reed-college/lemur/subscription","commits_url":"https://api.github.com/repos/reed-college/lemur/commits{/sha}","git_commits_url":"https://api.github.com/repos/reed-college/lemur/git/commits{/sha}","comments_url":"https://api.github.com/repos/reed-college/lemur/comments{/number}","issue_comment_url":"https://api.github.com/repos/reed-college/lemur/issues/comments{/number}","contents_url":"https://api.github.com/repos/reed-college/lemur/contents/{+path}","compare_url":"https://api.github.com/repos/reed-college/lemur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reed-college/lemur/merges","archive_url":"https://api.github.com/repos/reed-college/lemur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reed-college/lemur/downloads","issues_url":"https://api.github.com/repos/reed-college/lemur/issues{/number}","pulls_url":"https://api.github.com/repos/reed-college/lemur/pulls{/number}","milestones_url":"https://api.github.com/repos/reed-college/lemur/milestones{/number}","notifications_url":"https://api.github.com/repos/reed-college/lemur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reed-college/lemur/labels{/name}","releases_url":"https://api.github.com/repos/reed-college/lemur/releases{/id}","deployments_url":"https://api.github.com/repos/reed-college/lemur/deployments","created_at":"2016-05-18T16:24:19Z","updated_at":"2016-07-20T21:32:12Z","pushed_at":"2016-07-27T21:19:04Z","git_url":"git://github.com/reed-college/lemur.git","ssh_url":"git@github.com:reed-college/lemur.git","clone_url":"https://github.com/reed-college/lemur.git","svn_url":"https://github.com/reed-college/lemur","homepage":null,"size":4448,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/14"},"html":{"href":"https://github.com/reed-college/lemur/pull/14"},"issue":{"href":"https://api.github.com/repos/reed-college/lemur/issues/14"},"comments":{"href":"https://api.github.com/repos/reed-college/lemur/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reed-college/lemur/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/reed-college/lemur/statuses/42109d50aa5dd66157db736cefb477ae9a518350"}}}}
{"actor":{"display_login":"AIasd"}}