{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/aurora/pulls/comments/35878100","id":35878100,"diff_hunk":"@@ -42,3 +52,61 @@ function sanitize_phone_number($number, $countryName = 'US')\n \t\treturn $number;\n \t}\n }\n+\n+function ajax_edit_merge_form()\n+{\n+\treturn \n+\t\"<script>\n+\t$(document).ready(function(){\n+\t\t$('.merge').click(function(){\n+\t\t\tvar keep = $(this).val();\n+\t\t\tvar delete_ids = [];\n+\t\t\t$(\\\"[type=radio]\\\").each(function(index, radio){\n+\t\t\t\tif(radio.checked != true){\n+\t\t\t\t\tdelete_ids.push(radio.value);\n+\t\t\t\t}\n+\t\t\t});\n+\t\t\t$.ajax({\n+\t\t\t\turl: '/merge',\n+\t\t\t\tmethod: 'GET',\n+\t\t\t\tdata: {\n+\t\t\t\t\tkeep: keep,\n+\t\t\t\t\tdelete: delete_ids\n+\t\t\t\t}\n+\t\t\t}).done(function(view){\n+\t\t\t\t$('#merge-form').html(view);\n+\t\t\t\t$('html, body').animate({\n+\t\t\t\t\tscrollTop: $('#merge-form').offset().top\n+\t\t\t\t}, 800);\n+\t\t\t});\n+\t\t});\n+\t});\n+</script>\";\n+}\n+\n+function ajax_confirm_and_delete()","path":"app/Aurora/helpers.php","position":62,"original_position":62,"commit_id":"c3678a5be46e5f0b7d5b48babc098f21bbcad736","original_commit_id":"c3678a5be46e5f0b7d5b48babc098f21bbcad736","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"body":"It'd be nice if the special \"delete\" logic & the \"confirmation\" handler were separated, so you could re-use this in multiple places. Take a look at [`confirm.js`](https://github.com/DoSomething/voting-app/blob/dev/resources/assets/js/utilities/confirm.js) from the Voting App for some inspiration.","created_at":"2015-07-30T14:46:40Z","updated_at":"2015-07-30T14:46:40Z","html_url":"https://github.com/DoSomething/aurora/pull/98#discussion_r35878100","pull_request_url":"https://api.github.com/repos/DoSomething/aurora/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/comments/35878100"},"html":{"href":"https://github.com/DoSomething/aurora/pull/98#discussion_r35878100"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/aurora/pulls/98","id":41172978,"html_url":"https://github.com/DoSomething/aurora/pull/98","diff_url":"https://github.com/DoSomething/aurora/pull/98.diff","patch_url":"https://github.com/DoSomething/aurora/pull/98.patch","issue_url":"https://api.github.com/repos/DoSomething/aurora/issues/98","number":98,"state":"open","locked":false,"title":"User search","user":{"login":"paulhan221","id":9980439,"avatar_url":"https://avatars.githubusercontent.com/u/9980439?v=3","gravatar_id":"","url":"https://api.github.com/users/paulhan221","html_url":"https://github.com/paulhan221","followers_url":"https://api.github.com/users/paulhan221/followers","following_url":"https://api.github.com/users/paulhan221/following{/other_user}","gists_url":"https://api.github.com/users/paulhan221/gists{/gist_id}","starred_url":"https://api.github.com/users/paulhan221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulhan221/subscriptions","organizations_url":"https://api.github.com/users/paulhan221/orgs","repos_url":"https://api.github.com/users/paulhan221/repos","events_url":"https://api.github.com/users/paulhan221/events{/privacy}","received_events_url":"https://api.github.com/users/paulhan221/received_events","type":"User","site_admin":false},"body":"@DFurnes @angaither \r\n\r\nReferences #28","created_at":"2015-07-29T21:14:29Z","updated_at":"2015-07-30T14:46:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dca454088689b492877643dcaef6d460f791c22a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/aurora/pulls/98/commits","review_comments_url":"https://api.github.com/repos/DoSomething/aurora/pulls/98/comments","review_comment_url":"https://api.github.com/repos/DoSomething/aurora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/aurora/issues/98/comments","statuses_url":"https://api.github.com/repos/DoSomething/aurora/statuses/c3678a5be46e5f0b7d5b48babc098f21bbcad736","head":{"label":"paulhan221:user-search","ref":"user-search","sha":"c3678a5be46e5f0b7d5b48babc098f21bbcad736","user":{"login":"paulhan221","id":9980439,"avatar_url":"https://avatars.githubusercontent.com/u/9980439?v=3","gravatar_id":"","url":"https://api.github.com/users/paulhan221","html_url":"https://github.com/paulhan221","followers_url":"https://api.github.com/users/paulhan221/followers","following_url":"https://api.github.com/users/paulhan221/following{/other_user}","gists_url":"https://api.github.com/users/paulhan221/gists{/gist_id}","starred_url":"https://api.github.com/users/paulhan221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulhan221/subscriptions","organizations_url":"https://api.github.com/users/paulhan221/orgs","repos_url":"https://api.github.com/users/paulhan221/repos","events_url":"https://api.github.com/users/paulhan221/events{/privacy}","received_events_url":"https://api.github.com/users/paulhan221/received_events","type":"User","site_admin":false},"repo":{"id":37858208,"name":"aurora","full_name":"paulhan221/aurora","owner":{"login":"paulhan221","id":9980439,"avatar_url":"https://avatars.githubusercontent.com/u/9980439?v=3","gravatar_id":"","url":"https://api.github.com/users/paulhan221","html_url":"https://github.com/paulhan221","followers_url":"https://api.github.com/users/paulhan221/followers","following_url":"https://api.github.com/users/paulhan221/following{/other_user}","gists_url":"https://api.github.com/users/paulhan221/gists{/gist_id}","starred_url":"https://api.github.com/users/paulhan221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulhan221/subscriptions","organizations_url":"https://api.github.com/users/paulhan221/orgs","repos_url":"https://api.github.com/users/paulhan221/repos","events_url":"https://api.github.com/users/paulhan221/events{/privacy}","received_events_url":"https://api.github.com/users/paulhan221/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulhan221/aurora","description":"User admin tool to view Northstar users","fork":true,"url":"https://api.github.com/repos/paulhan221/aurora","forks_url":"https://api.github.com/repos/paulhan221/aurora/forks","keys_url":"https://api.github.com/repos/paulhan221/aurora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulhan221/aurora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulhan221/aurora/teams","hooks_url":"https://api.github.com/repos/paulhan221/aurora/hooks","issue_events_url":"https://api.github.com/repos/paulhan221/aurora/issues/events{/number}","events_url":"https://api.github.com/repos/paulhan221/aurora/events","assignees_url":"https://api.github.com/repos/paulhan221/aurora/assignees{/user}","branches_url":"https://api.github.com/repos/paulhan221/aurora/branches{/branch}","tags_url":"https://api.github.com/repos/paulhan221/aurora/tags","blobs_url":"https://api.github.com/repos/paulhan221/aurora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulhan221/aurora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulhan221/aurora/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulhan221/aurora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulhan221/aurora/statuses/{sha}","languages_url":"https://api.github.com/repos/paulhan221/aurora/languages","stargazers_url":"https://api.github.com/repos/paulhan221/aurora/stargazers","contributors_url":"https://api.github.com/repos/paulhan221/aurora/contributors","subscribers_url":"https://api.github.com/repos/paulhan221/aurora/subscribers","subscription_url":"https://api.github.com/repos/paulhan221/aurora/subscription","commits_url":"https://api.github.com/repos/paulhan221/aurora/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulhan221/aurora/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulhan221/aurora/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulhan221/aurora/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulhan221/aurora/contents/{+path}","compare_url":"https://api.github.com/repos/paulhan221/aurora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulhan221/aurora/merges","archive_url":"https://api.github.com/repos/paulhan221/aurora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulhan221/aurora/downloads","issues_url":"https://api.github.com/repos/paulhan221/aurora/issues{/number}","pulls_url":"https://api.github.com/repos/paulhan221/aurora/pulls{/number}","milestones_url":"https://api.github.com/repos/paulhan221/aurora/milestones{/number}","notifications_url":"https://api.github.com/repos/paulhan221/aurora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulhan221/aurora/labels{/name}","releases_url":"https://api.github.com/repos/paulhan221/aurora/releases{/id}","created_at":"2015-06-22T13:56:39Z","updated_at":"2015-06-22T13:56:40Z","pushed_at":"2015-07-30T14:15:47Z","git_url":"git://github.com/paulhan221/aurora.git","ssh_url":"git@github.com:paulhan221/aurora.git","clone_url":"https://github.com/paulhan221/aurora.git","svn_url":"https://github.com/paulhan221/aurora","homepage":"","size":916,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"DoSomething:master","ref":"master","sha":"01dd8498b59a736b87442f6382b8364b5af08f00","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":28877721,"name":"aurora","full_name":"DoSomething/aurora","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/aurora","description":"User admin tool to view Northstar users","fork":false,"url":"https://api.github.com/repos/DoSomething/aurora","forks_url":"https://api.github.com/repos/DoSomething/aurora/forks","keys_url":"https://api.github.com/repos/DoSomething/aurora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/aurora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/aurora/teams","hooks_url":"https://api.github.com/repos/DoSomething/aurora/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/aurora/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/aurora/events","assignees_url":"https://api.github.com/repos/DoSomething/aurora/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/aurora/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/aurora/tags","blobs_url":"https://api.github.com/repos/DoSomething/aurora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/aurora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/aurora/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/aurora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/aurora/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/aurora/languages","stargazers_url":"https://api.github.com/repos/DoSomething/aurora/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/aurora/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/aurora/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/aurora/subscription","commits_url":"https://api.github.com/repos/DoSomething/aurora/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/aurora/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/aurora/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/aurora/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/aurora/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/aurora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/aurora/merges","archive_url":"https://api.github.com/repos/DoSomething/aurora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/aurora/downloads","issues_url":"https://api.github.com/repos/DoSomething/aurora/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/aurora/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/aurora/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/aurora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/aurora/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/aurora/releases{/id}","created_at":"2015-01-06T18:44:29Z","updated_at":"2015-07-02T00:35:05Z","pushed_at":"2015-07-30T14:15:47Z","git_url":"git://github.com/DoSomething/aurora.git","ssh_url":"git@github.com:DoSomething/aurora.git","clone_url":"https://github.com/DoSomething/aurora.git","svn_url":"https://github.com/DoSomething/aurora","homepage":"","size":1695,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/98"},"html":{"href":"https://github.com/DoSomething/aurora/pull/98"},"issue":{"href":"https://api.github.com/repos/DoSomething/aurora/issues/98"},"comments":{"href":"https://api.github.com/repos/DoSomething/aurora/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/aurora/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/aurora/statuses/c3678a5be46e5f0b7d5b48babc098f21bbcad736"}}}}