{"action":"created","comment":{"url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/comments/37392918","id":37392918,"diff_hunk":"@@ -0,0 +1,93 @@\n+\n+(function () {\n+  'use strict';\n+\n+\tangular\n+\t\t.module('crowdsource.work.controllers', ['ngFileUpload', 'angular.filter'])\n+\t\t.controller('MacroWorkSubmitController', MacroWorkSubmitController);\n+\n+\tMacroWorkSubmitController.$inject = ['$scope', '$mdToast', '$http', '$timeout', 'Upload', 'WorkService'];\n+\n+\tfunction MacroWorkSubmitController($scope, $mdToast, $http, $timeout, Upload, WorkService) {\n+\t\tvar vm = this;\n+\t\tvm.filesToUpload = [];\n+\t\tvm.uploadedFiles=[];\n+\t\tvm.taskInfo = \"Task information will be displayed here...\";\n+\t\tvm.commentText = \"\";\n+\n+\t\t// accepts multiple files to upload\n+\t\t$scope.$watch(\n+\t\t\tfunction () {\n+\t\t\t\treturn vm.filesToUpload;\n+\t\t\t},\n+\t\t\tfunction (newVal, oldVal) {\n+\t\t\t\t// won't upload if the file is already uploaded\n+\t\t\t\tif (newVal && newVal.length) {\n+\t\t\t\t\tfor (var i = 0; i < newVal.length; i++) {\n+\t\t\t\t\t\tvar file = newVal[i];\n+\n+\t\t\t\t\t\tvar isNewFile = true;\n+\t\t\t\t\t\tfor (var j=0; j < vm.uploadedFiles.length; j++) {\n+\t\t\t\t\t\t\tif (vm.uploadedFiles[j].name == file.name) {\n+\t\t\t\t\t\t\t\tisNewFile = false;\n+\t\t\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t}\n+\n+\t\t\t\t\t\tif (isNewFile) {\n+\t\t\t\t\t\t\tvm.upload(file);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t);\n+\n+\t\t// upload single file via csvmanager\n+\t\tvm.upload = function (file) {\n+\t\t\tUpload.upload({","path":"static/js/work/controllers/work.controller.js","position":47,"original_position":47,"commit_id":"181e6199189f33ad6c805421cde9c07722ec5e0d","original_commit_id":"181e6199189f33ad6c805421cde9c07722ec5e0d","user":{"login":"dmorina","id":2858281,"avatar_url":"https://avatars.githubusercontent.com/u/2858281?v=3","gravatar_id":"","url":"https://api.github.com/users/dmorina","html_url":"https://github.com/dmorina","followers_url":"https://api.github.com/users/dmorina/followers","following_url":"https://api.github.com/users/dmorina/following{/other_user}","gists_url":"https://api.github.com/users/dmorina/gists{/gist_id}","starred_url":"https://api.github.com/users/dmorina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmorina/subscriptions","organizations_url":"https://api.github.com/users/dmorina/orgs","repos_url":"https://api.github.com/users/dmorina/repos","events_url":"https://api.github.com/users/dmorina/events{/privacy}","received_events_url":"https://api.github.com/users/dmorina/received_events","type":"User","site_admin":false},"body":"this could be any kind of file, we probably wont use csv for macro","created_at":"2015-08-19T08:56:18Z","updated_at":"2015-08-19T08:56:18Z","html_url":"https://github.com/crowdresearch/crowdsource-platform/pull/372#discussion_r37392918","pull_request_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372","_links":{"self":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/comments/37392918"},"html":{"href":"https://github.com/crowdresearch/crowdsource-platform/pull/372#discussion_r37392918"},"pull_request":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372"}}},"pull_request":{"url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372","id":42600316,"html_url":"https://github.com/crowdresearch/crowdsource-platform/pull/372","diff_url":"https://github.com/crowdresearch/crowdsource-platform/pull/372.diff","patch_url":"https://github.com/crowdresearch/crowdsource-platform/pull/372.patch","issue_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/372","number":372,"state":"open","locked":false,"title":"revised according to rohit's comments","user":{"login":"lucamatsumoto","id":12574869,"avatar_url":"https://avatars.githubusercontent.com/u/12574869?v=3","gravatar_id":"","url":"https://api.github.com/users/lucamatsumoto","html_url":"https://github.com/lucamatsumoto","followers_url":"https://api.github.com/users/lucamatsumoto/followers","following_url":"https://api.github.com/users/lucamatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/lucamatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lucamatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucamatsumoto/subscriptions","organizations_url":"https://api.github.com/users/lucamatsumoto/orgs","repos_url":"https://api.github.com/users/lucamatsumoto/repos","events_url":"https://api.github.com/users/lucamatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/lucamatsumoto/received_events","type":"User","site_admin":false},"body":"This is a revised version of my previous pr #367. I have explained this pr on a wiki page at http://crowdresearch.stanford.edu/w/index.php?title=Summer_Milestone_10_lucamatsumoto_Macro_Work_Submission. Please take a look at the section \"Screenshot 4: Current Implementation\". ","created_at":"2015-08-17T15:25:46Z","updated_at":"2015-08-19T08:56:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f17051ba93b5c543f8e0203685df9874e8b8cb02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372/commits","review_comments_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372/comments","review_comment_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/372/comments","statuses_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/statuses/181e6199189f33ad6c805421cde9c07722ec5e0d","head":{"label":"lucamatsumoto:luca_work_submit2","ref":"luca_work_submit2","sha":"181e6199189f33ad6c805421cde9c07722ec5e0d","user":{"login":"lucamatsumoto","id":12574869,"avatar_url":"https://avatars.githubusercontent.com/u/12574869?v=3","gravatar_id":"","url":"https://api.github.com/users/lucamatsumoto","html_url":"https://github.com/lucamatsumoto","followers_url":"https://api.github.com/users/lucamatsumoto/followers","following_url":"https://api.github.com/users/lucamatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/lucamatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lucamatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucamatsumoto/subscriptions","organizations_url":"https://api.github.com/users/lucamatsumoto/orgs","repos_url":"https://api.github.com/users/lucamatsumoto/repos","events_url":"https://api.github.com/users/lucamatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/lucamatsumoto/received_events","type":"User","site_admin":false},"repo":{"id":36212010,"name":"crowdsource-platform","full_name":"lucamatsumoto/crowdsource-platform","owner":{"login":"lucamatsumoto","id":12574869,"avatar_url":"https://avatars.githubusercontent.com/u/12574869?v=3","gravatar_id":"","url":"https://api.github.com/users/lucamatsumoto","html_url":"https://github.com/lucamatsumoto","followers_url":"https://api.github.com/users/lucamatsumoto/followers","following_url":"https://api.github.com/users/lucamatsumoto/following{/other_user}","gists_url":"https://api.github.com/users/lucamatsumoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lucamatsumoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucamatsumoto/subscriptions","organizations_url":"https://api.github.com/users/lucamatsumoto/orgs","repos_url":"https://api.github.com/users/lucamatsumoto/repos","events_url":"https://api.github.com/users/lucamatsumoto/events{/privacy}","received_events_url":"https://api.github.com/users/lucamatsumoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucamatsumoto/crowdsource-platform","description":"The main repository for Crowdsource Platform","fork":true,"url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform","forks_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/forks","keys_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/teams","hooks_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/hooks","issue_events_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/issues/events{/number}","events_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/events","assignees_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/assignees{/user}","branches_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/branches{/branch}","tags_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/tags","blobs_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/languages","stargazers_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/stargazers","contributors_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/contributors","subscribers_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/subscribers","subscription_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/subscription","commits_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/contents/{+path}","compare_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/merges","archive_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/downloads","issues_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/issues{/number}","pulls_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/labels{/name}","releases_url":"https://api.github.com/repos/lucamatsumoto/crowdsource-platform/releases{/id}","created_at":"2015-05-25T05:36:30Z","updated_at":"2015-05-25T06:37:04Z","pushed_at":"2015-08-17T15:20:03Z","git_url":"git://github.com/lucamatsumoto/crowdsource-platform.git","ssh_url":"git@github.com:lucamatsumoto/crowdsource-platform.git","clone_url":"https://github.com/lucamatsumoto/crowdsource-platform.git","svn_url":"https://github.com/lucamatsumoto/crowdsource-platform","homepage":null,"size":17257,"stargazers_count":1,"watchers_count":1,"language":"CSS","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":1,"default_branch":"develop2"}},"base":{"label":"crowdresearch:develop2","ref":"develop2","sha":"6df2fb3cce62902855fdfcd10172d96a79816c67","user":{"login":"crowdresearch","id":11791223,"avatar_url":"https://avatars.githubusercontent.com/u/11791223?v=3","gravatar_id":"","url":"https://api.github.com/users/crowdresearch","html_url":"https://github.com/crowdresearch","followers_url":"https://api.github.com/users/crowdresearch/followers","following_url":"https://api.github.com/users/crowdresearch/following{/other_user}","gists_url":"https://api.github.com/users/crowdresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/crowdresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowdresearch/subscriptions","organizations_url":"https://api.github.com/users/crowdresearch/orgs","repos_url":"https://api.github.com/users/crowdresearch/repos","events_url":"https://api.github.com/users/crowdresearch/events{/privacy}","received_events_url":"https://api.github.com/users/crowdresearch/received_events","type":"Organization","site_admin":false},"repo":{"id":34006010,"name":"crowdsource-platform","full_name":"crowdresearch/crowdsource-platform","owner":{"login":"crowdresearch","id":11791223,"avatar_url":"https://avatars.githubusercontent.com/u/11791223?v=3","gravatar_id":"","url":"https://api.github.com/users/crowdresearch","html_url":"https://github.com/crowdresearch","followers_url":"https://api.github.com/users/crowdresearch/followers","following_url":"https://api.github.com/users/crowdresearch/following{/other_user}","gists_url":"https://api.github.com/users/crowdresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/crowdresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowdresearch/subscriptions","organizations_url":"https://api.github.com/users/crowdresearch/orgs","repos_url":"https://api.github.com/users/crowdresearch/repos","events_url":"https://api.github.com/users/crowdresearch/events{/privacy}","received_events_url":"https://api.github.com/users/crowdresearch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowdresearch/crowdsource-platform","description":"The main repository for Crowdsource Platform","fork":false,"url":"https://api.github.com/repos/crowdresearch/crowdsource-platform","forks_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/forks","keys_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/teams","hooks_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/hooks","issue_events_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/events{/number}","events_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/events","assignees_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/assignees{/user}","branches_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/branches{/branch}","tags_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/tags","blobs_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/languages","stargazers_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/stargazers","contributors_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/contributors","subscribers_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/subscribers","subscription_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/subscription","commits_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/contents/{+path}","compare_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/merges","archive_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/downloads","issues_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues{/number}","pulls_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/labels{/name}","releases_url":"https://api.github.com/repos/crowdresearch/crowdsource-platform/releases{/id}","created_at":"2015-04-15T16:36:52Z","updated_at":"2015-08-13T13:10:43Z","pushed_at":"2015-08-19T08:41:50Z","git_url":"git://github.com/crowdresearch/crowdsource-platform.git","ssh_url":"git@github.com:crowdresearch/crowdsource-platform.git","clone_url":"https://github.com/crowdresearch/crowdsource-platform.git","svn_url":"https://github.com/crowdresearch/crowdsource-platform","homepage":null,"size":34031,"stargazers_count":42,"watchers_count":42,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"open_issues_count":56,"forks":114,"open_issues":56,"watchers":42,"default_branch":"develop2"}},"_links":{"self":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372"},"html":{"href":"https://github.com/crowdresearch/crowdsource-platform/pull/372"},"issue":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/372"},"comments":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/issues/372/comments"},"review_comments":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372/comments"},"review_comment":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/pulls/372/commits"},"statuses":{"href":"https://api.github.com/repos/crowdresearch/crowdsource-platform/statuses/181e6199189f33ad6c805421cde9c07722ec5e0d"}}}}