{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/qiita/pulls/comments/26089327","id":26089327,"diff_hunk":"@@ -22,57 +22,49 @@ function displaySelected() {\n } \n \n function select_category(category, study) {\n-  if(study != '') { \n-    $('.'+study+'.'+category).each(function() {this.checked = true;});\n-    count_update(study);\n+  if(study !== '') { \n+    $('.study'+study+'.'+category).each(function() {this.checked = true;});\n+    count_update(study, '');\n   }\n   else { \n     $('.'+category).each(function() {this.checked = true;});\n     for(i=0; i<STUDIES.length; i++) {\n-      count_update(STUDIES[i]);\n+      count_update(STUDIES[i], '');\n     }\n   }\n }\n \n-function select_deselect_samples_study(study) {\n-  var selected_datatypes = $('#study' + study + ' input:checkbox:checked').length;\n-  var sel = false;\n-  if (selected_datatypes > 0) { sel = true; }\n-  select_deselect(study, sel)\n+function count_update(study, sel) {\n+  format = '#modal' + study;\n+  if(sel == \"-sel\") { format = format + \"-sel\" }\n+    format = format + ' input:checkbox:checked';\n+  var selected = $(format).length;\n+  if(selected > 0 && sel != \"-sel\") { $('#study' + study).addClass('success'); }\n+  else if(sel != \"-sel\") { $('#study' + study).removeClass('success'); }\n+  else if(selected > 0 && sel == \"-sel\") { $('#study' + study+\"-sel\").addClass('danger'); }\n+  else if(sel == \"-sel\") { $('#study' + study + \"-sel\").removeClass('danger'); }\n }\n \n-function count_update(study) {\n-  var selected = $('#modal' + study + ' input:checkbox:checked').length;\n-  var studylink = document.getElementById('modal-link-' + study)\n-  document.getElementById('count' + study).innerHTML = selected;\n-  if(selected > 0) { \n-    $('#study' + study).addClass('success');\n-    studylink.disabled = false;\n-    studylink.style = \"\";\n-  }\n-  else {\n-    $('#study' + study).removeClass('success');\n-    studylink.disabled = true;\n-    studylink.style = \"text-decoration: none;\";\n-    $('#study' + study + \" input:checkbox\").each(function() {this.checked = false;})\n-  }\n-}\n-\n-function select_deselect(study, select) {\n-  if(select == true) { \n-    $('.'+study).each(function() {this.checked = true;});\n+function select_deselect(study, filter, sel, select) {\n+  filter = '.study' + study + filter;\n+  if(sel == '-sel') { filter = filter + '.-sel'; }","path":"qiita_pet/static/js/analysis.js","position":58,"original_position":58,"commit_id":"eaf98deb709ca4e7e65bdd273dff6002a8d0ea22","original_commit_id":"eaf98deb709ca4e7e65bdd273dff6002a8d0ea22","user":{"login":"adamrp","id":2574407,"avatar_url":"https://avatars.githubusercontent.com/u/2574407?v=3","gravatar_id":"","url":"https://api.github.com/users/adamrp","html_url":"https://github.com/adamrp","followers_url":"https://api.github.com/users/adamrp/followers","following_url":"https://api.github.com/users/adamrp/following{/other_user}","gists_url":"https://api.github.com/users/adamrp/gists{/gist_id}","starred_url":"https://api.github.com/users/adamrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamrp/subscriptions","organizations_url":"https://api.github.com/users/adamrp/orgs","repos_url":"https://api.github.com/users/adamrp/repos","events_url":"https://api.github.com/users/adamrp/events{/privacy}","received_events_url":"https://api.github.com/users/adamrp/received_events","type":"User","site_admin":false},"body":"`===`","created_at":"2015-03-10T00:11:24Z","updated_at":"2015-03-10T00:11:24Z","html_url":"https://github.com/biocore/qiita/pull/865#discussion_r26089327","pull_request_url":"https://api.github.com/repos/biocore/qiita/pulls/865","_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/26089327"},"html":{"href":"https://github.com/biocore/qiita/pull/865#discussion_r26089327"},"pull_request":{"href":"https://api.github.com/repos/biocore/qiita/pulls/865"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/qiita/pulls/865","id":29559790,"html_url":"https://github.com/biocore/qiita/pull/865","diff_url":"https://github.com/biocore/qiita/pull/865.diff","patch_url":"https://github.com/biocore/qiita/pull/865.patch","issue_url":"https://api.github.com/repos/biocore/qiita/issues/865","number":865,"state":"open","locked":false,"title":"Select by datatype and processed data id","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"body":"This pull request makes search and selection of samples happen by datatype and processed ID. Previously you would select samples by study, and they would be selected for all processed data IDs in the study.\r\n\r\nTo do this, I have added two tab lists to each modal, so you can select the datatype and process ID to list samples for. This list will only include samples available in that processed data, so we no longer have the issue of being able to select non-existant samples for certain data types.\r\n\r\n*READY FOR REVIEW*","created_at":"2015-02-18T20:24:54Z","updated_at":"2015-03-10T00:11:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"079fe8272dfb75930a5177d5ab5dfd682b1e7e0a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/qiita/pulls/865/commits","review_comments_url":"https://api.github.com/repos/biocore/qiita/pulls/865/comments","review_comment_url":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/qiita/issues/865/comments","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/eaf98deb709ca4e7e65bdd273dff6002a8d0ea22","head":{"label":"squirrelo:select-by-datatype","ref":"select-by-datatype","sha":"eaf98deb709ca4e7e65bdd273dff6002a8d0ea22","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"repo":{"id":21153084,"name":"qiita","full_name":"squirrelo/qiita","owner":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?v=3","gravatar_id":"","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squirrelo/qiita","description":"Qiita - A QIIME databasing effort","fork":true,"url":"https://api.github.com/repos/squirrelo/qiita","forks_url":"https://api.github.com/repos/squirrelo/qiita/forks","keys_url":"https://api.github.com/repos/squirrelo/qiita/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squirrelo/qiita/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squirrelo/qiita/teams","hooks_url":"https://api.github.com/repos/squirrelo/qiita/hooks","issue_events_url":"https://api.github.com/repos/squirrelo/qiita/issues/events{/number}","events_url":"https://api.github.com/repos/squirrelo/qiita/events","assignees_url":"https://api.github.com/repos/squirrelo/qiita/assignees{/user}","branches_url":"https://api.github.com/repos/squirrelo/qiita/branches{/branch}","tags_url":"https://api.github.com/repos/squirrelo/qiita/tags","blobs_url":"https://api.github.com/repos/squirrelo/qiita/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squirrelo/qiita/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squirrelo/qiita/git/refs{/sha}","trees_url":"https://api.github.com/repos/squirrelo/qiita/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squirrelo/qiita/statuses/{sha}","languages_url":"https://api.github.com/repos/squirrelo/qiita/languages","stargazers_url":"https://api.github.com/repos/squirrelo/qiita/stargazers","contributors_url":"https://api.github.com/repos/squirrelo/qiita/contributors","subscribers_url":"https://api.github.com/repos/squirrelo/qiita/subscribers","subscription_url":"https://api.github.com/repos/squirrelo/qiita/subscription","commits_url":"https://api.github.com/repos/squirrelo/qiita/commits{/sha}","git_commits_url":"https://api.github.com/repos/squirrelo/qiita/git/commits{/sha}","comments_url":"https://api.github.com/repos/squirrelo/qiita/comments{/number}","issue_comment_url":"https://api.github.com/repos/squirrelo/qiita/issues/comments{/number}","contents_url":"https://api.github.com/repos/squirrelo/qiita/contents/{+path}","compare_url":"https://api.github.com/repos/squirrelo/qiita/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squirrelo/qiita/merges","archive_url":"https://api.github.com/repos/squirrelo/qiita/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squirrelo/qiita/downloads","issues_url":"https://api.github.com/repos/squirrelo/qiita/issues{/number}","pulls_url":"https://api.github.com/repos/squirrelo/qiita/pulls{/number}","milestones_url":"https://api.github.com/repos/squirrelo/qiita/milestones{/number}","notifications_url":"https://api.github.com/repos/squirrelo/qiita/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squirrelo/qiita/labels{/name}","releases_url":"https://api.github.com/repos/squirrelo/qiita/releases{/id}","created_at":"2014-06-24T05:18:58Z","updated_at":"2015-03-05T18:18:49Z","pushed_at":"2015-03-09T18:25:18Z","git_url":"git://github.com/squirrelo/qiita.git","ssh_url":"git@github.com:squirrelo/qiita.git","clone_url":"https://github.com/squirrelo/qiita.git","svn_url":"https://github.com/squirrelo/qiita","homepage":"","size":9960,"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":"master"}},"base":{"label":"biocore:master","ref":"master","sha":"1475fc0cd272a2479fa3cf248ee672e1d8da8ed6","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":13131245,"name":"qiita","full_name":"biocore/qiita","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/qiita","description":"Qiita - A QIIME databasing effort","fork":false,"url":"https://api.github.com/repos/biocore/qiita","forks_url":"https://api.github.com/repos/biocore/qiita/forks","keys_url":"https://api.github.com/repos/biocore/qiita/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/qiita/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/qiita/teams","hooks_url":"https://api.github.com/repos/biocore/qiita/hooks","issue_events_url":"https://api.github.com/repos/biocore/qiita/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/qiita/events","assignees_url":"https://api.github.com/repos/biocore/qiita/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/qiita/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/qiita/tags","blobs_url":"https://api.github.com/repos/biocore/qiita/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/qiita/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/qiita/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/qiita/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/qiita/languages","stargazers_url":"https://api.github.com/repos/biocore/qiita/stargazers","contributors_url":"https://api.github.com/repos/biocore/qiita/contributors","subscribers_url":"https://api.github.com/repos/biocore/qiita/subscribers","subscription_url":"https://api.github.com/repos/biocore/qiita/subscription","commits_url":"https://api.github.com/repos/biocore/qiita/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/qiita/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/qiita/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/qiita/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/qiita/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/qiita/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/qiita/merges","archive_url":"https://api.github.com/repos/biocore/qiita/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/qiita/downloads","issues_url":"https://api.github.com/repos/biocore/qiita/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/qiita/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/qiita/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/qiita/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/qiita/labels{/name}","releases_url":"https://api.github.com/repos/biocore/qiita/releases{/id}","created_at":"2013-09-26T18:50:43Z","updated_at":"2015-03-10T00:06:05Z","pushed_at":"2015-03-10T00:06:05Z","git_url":"git://github.com/biocore/qiita.git","ssh_url":"git@github.com:biocore/qiita.git","clone_url":"https://github.com/biocore/qiita.git","svn_url":"https://github.com/biocore/qiita","homepage":"","size":118639,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":178,"forks":16,"open_issues":178,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/865"},"html":{"href":"https://github.com/biocore/qiita/pull/865"},"issue":{"href":"https://api.github.com/repos/biocore/qiita/issues/865"},"comments":{"href":"https://api.github.com/repos/biocore/qiita/issues/865/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/qiita/pulls/865/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/qiita/pulls/865/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/qiita/statuses/eaf98deb709ca4e7e65bdd273dff6002a8d0ea22"}}}}