GitHub PullRequestReviewCommentEvent at 2014-09-18 03:57:31
Repository: zanata-spa
Actor: davidmason
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/zanata/zanata-spa/pulls/comments/17708205","id":17708205,"diff_hunk":"@@ -5,28 +5,49 @@\n    * EditorContentCtrl.js\n    * @ngInject\n    */\n-  function EditorContentCtrl(PhraseService, $stateParams) {\n-    var limit = 50,\n-        editorContentCtrl = this;\n+  function EditorContentCtrl(PhraseService, $stateParams, UrlService) {\n+    var maxResult = 50,\n+        editorContentCtrl = this,\n+        states = UrlService.readValue('states');\n+\n+    //wrapper for all types of filtering\n+    var filter = {\n+      'states': states ? states.split(' ') : states\n+    };\n+\n+    loadPhrases(editorContextHelper($stateParams), filter);\n \n     /**\n      * Load transUnit\n      *\n-     * @param projectSlug\n-     * @param versionSlug\n-     * @param docId\n-     * @param localeId\n+     * @param helperFn\n+     * @param filter\n      */\n-    function loadPhases(projectSlug, versionSlug, docId, localeId) {\n-      PhraseService.findAll(limit, projectSlug, versionSlug, docId, localeId)\n-        .then(function(phrases) {\n-          editorContentCtrl.phrases = phrases;\n-        });\n+    function loadPhrases(helperFn, filter) {\n+\n+      PhraseService.getStates(helperFn.projectSlug, helperFn.versionSlug,\n+        helperFn.docId, helperFn.localeId).then(","path":"app/editor/EditorContentCtrl.js","position":37,"original_position":37,"commit_id":"65108124b3ef6543f54191ff7e3bc616672b594d","original_commit_id":"65108124b3ef6543f54191ff7e3bc616672b594d","user":{"login":"davidmason","id":482026,"avatar_url":"https://avatars.githubusercontent.com/u/482026?v=2","gravatar_id":"a961139da8db88c4ae10d6dacf6bea1e","url":"https://api.github.com/users/davidmason","html_url":"https://github.com/davidmason","followers_url":"https://api.github.com/users/davidmason/followers","following_url":"https://api.github.com/users/davidmason/following{/other_user}","gists_url":"https://api.github.com/users/davidmason/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmason/subscriptions","organizations_url":"https://api.github.com/users/davidmason/orgs","repos_url":"https://api.github.com/users/davidmason/repos","events_url":"https://api.github.com/users/davidmason/events{/privacy}","received_events_url":"https://api.github.com/users/davidmason/received_events","type":"User","site_admin":false},"body":"Since everything in `helperFn` is just being passed through to `getStates`, it might as well just be passed through as-is rather than unwrapping it.","created_at":"2014-09-18T03:57:31Z","updated_at":"2014-09-18T03:57:31Z","html_url":"https://github.com/zanata/zanata-spa/pull/49#discussion_r17708205","pull_request_url":"https://api.github.com/repos/zanata/zanata-spa/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/comments/17708205"},"html":{"href":"https://github.com/zanata/zanata-spa/pull/49#discussion_r17708205"},"pull_request":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/zanata/zanata-spa/pulls/49","id":21345170,"html_url":"https://github.com/zanata/zanata-spa/pull/49","diff_url":"https://github.com/zanata/zanata-spa/pull/49.diff","patch_url":"https://github.com/zanata/zanata-spa/pull/49.patch","issue_url":"https://api.github.com/repos/zanata/zanata-spa/issues/49","number":49,"state":"open","locked":false,"title":"Implement filter and state query url","user":{"login":"aeng","id":766762,"avatar_url":"https://avatars.githubusercontent.com/u/766762?v=2","gravatar_id":"c7fa4315c62b48925680bed7e9788a47","url":"https://api.github.com/users/aeng","html_url":"https://github.com/aeng","followers_url":"https://api.github.com/users/aeng/followers","following_url":"https://api.github.com/users/aeng/following{/other_user}","gists_url":"https://api.github.com/users/aeng/gists{/gist_id}","starred_url":"https://api.github.com/users/aeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeng/subscriptions","organizations_url":"https://api.github.com/users/aeng/orgs","repos_url":"https://api.github.com/users/aeng/repos","events_url":"https://api.github.com/users/aeng/events{/privacy}","received_events_url":"https://api.github.com/users/aeng/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-17T05:05:47Z","updated_at":"2014-09-18T03:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81c1e994ae19163255c5c9f5d3284ee80005aa7a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zanata/zanata-spa/pulls/49/commits","review_comments_url":"https://api.github.com/repos/zanata/zanata-spa/pulls/49/comments","review_comment_url":"https://api.github.com/repos/zanata/zanata-spa/pulls/comments/{number}","comments_url":"https://api.github.com/repos/zanata/zanata-spa/issues/49/comments","statuses_url":"https://api.github.com/repos/zanata/zanata-spa/statuses/65108124b3ef6543f54191ff7e3bc616672b594d","head":{"label":"zanata:filter","ref":"filter","sha":"65108124b3ef6543f54191ff7e3bc616672b594d","user":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=2","gravatar_id":"0a06368d154f4db91cae77f7aedb4dfa","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"repo":{"id":22827941,"name":"zanata-spa","full_name":"zanata/zanata-spa","owner":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=2","gravatar_id":"0a06368d154f4db91cae77f7aedb4dfa","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zanata/zanata-spa","description":"Community Powered Translation","fork":false,"url":"https://api.github.com/repos/zanata/zanata-spa","forks_url":"https://api.github.com/repos/zanata/zanata-spa/forks","keys_url":"https://api.github.com/repos/zanata/zanata-spa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zanata/zanata-spa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zanata/zanata-spa/teams","hooks_url":"https://api.github.com/repos/zanata/zanata-spa/hooks","issue_events_url":"https://api.github.com/repos/zanata/zanata-spa/issues/events{/number}","events_url":"https://api.github.com/repos/zanata/zanata-spa/events","assignees_url":"https://api.github.com/repos/zanata/zanata-spa/assignees{/user}","branches_url":"https://api.github.com/repos/zanata/zanata-spa/branches{/branch}","tags_url":"https://api.github.com/repos/zanata/zanata-spa/tags","blobs_url":"https://api.github.com/repos/zanata/zanata-spa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zanata/zanata-spa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zanata/zanata-spa/git/refs{/sha}","trees_url":"https://api.github.com/repos/zanata/zanata-spa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zanata/zanata-spa/statuses/{sha}","languages_url":"https://api.github.com/repos/zanata/zanata-spa/languages","stargazers_url":"https://api.github.com/repos/zanata/zanata-spa/stargazers","contributors_url":"https://api.github.com/repos/zanata/zanata-spa/contributors","subscribers_url":"https://api.github.com/repos/zanata/zanata-spa/subscribers","subscription_url":"https://api.github.com/repos/zanata/zanata-spa/subscription","commits_url":"https://api.github.com/repos/zanata/zanata-spa/commits{/sha}","git_commits_url":"https://api.github.com/repos/zanata/zanata-spa/git/commits{/sha}","comments_url":"https://api.github.com/repos/zanata/zanata-spa/comments{/number}","issue_comment_url":"https://api.github.com/repos/zanata/zanata-spa/issues/comments/{number}","contents_url":"https://api.github.com/repos/zanata/zanata-spa/contents/{+path}","compare_url":"https://api.github.com/repos/zanata/zanata-spa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zanata/zanata-spa/merges","archive_url":"https://api.github.com/repos/zanata/zanata-spa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zanata/zanata-spa/downloads","issues_url":"https://api.github.com/repos/zanata/zanata-spa/issues{/number}","pulls_url":"https://api.github.com/repos/zanata/zanata-spa/pulls{/number}","milestones_url":"https://api.github.com/repos/zanata/zanata-spa/milestones{/number}","notifications_url":"https://api.github.com/repos/zanata/zanata-spa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zanata/zanata-spa/labels{/name}","releases_url":"https://api.github.com/repos/zanata/zanata-spa/releases{/id}","created_at":"2014-08-11T05:28:44Z","updated_at":"2014-09-03T00:28:56Z","pushed_at":"2014-09-18T00:47:02Z","git_url":"git://github.com/zanata/zanata-spa.git","ssh_url":"git@github.com:zanata/zanata-spa.git","clone_url":"https://github.com/zanata/zanata-spa.git","svn_url":"https://github.com/zanata/zanata-spa","homepage":"http://zanata.org","size":1248,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"zanata:master","ref":"master","sha":"0d54d85966b1f7c9b25e8100382f106cf2aa9807","user":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=2","gravatar_id":"0a06368d154f4db91cae77f7aedb4dfa","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"repo":{"id":22827941,"name":"zanata-spa","full_name":"zanata/zanata-spa","owner":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=2","gravatar_id":"0a06368d154f4db91cae77f7aedb4dfa","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zanata/zanata-spa","description":"Community Powered Translation","fork":false,"url":"https://api.github.com/repos/zanata/zanata-spa","forks_url":"https://api.github.com/repos/zanata/zanata-spa/forks","keys_url":"https://api.github.com/repos/zanata/zanata-spa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zanata/zanata-spa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zanata/zanata-spa/teams","hooks_url":"https://api.github.com/repos/zanata/zanata-spa/hooks","issue_events_url":"https://api.github.com/repos/zanata/zanata-spa/issues/events{/number}","events_url":"https://api.github.com/repos/zanata/zanata-spa/events","assignees_url":"https://api.github.com/repos/zanata/zanata-spa/assignees{/user}","branches_url":"https://api.github.com/repos/zanata/zanata-spa/branches{/branch}","tags_url":"https://api.github.com/repos/zanata/zanata-spa/tags","blobs_url":"https://api.github.com/repos/zanata/zanata-spa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zanata/zanata-spa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zanata/zanata-spa/git/refs{/sha}","trees_url":"https://api.github.com/repos/zanata/zanata-spa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zanata/zanata-spa/statuses/{sha}","languages_url":"https://api.github.com/repos/zanata/zanata-spa/languages","stargazers_url":"https://api.github.com/repos/zanata/zanata-spa/stargazers","contributors_url":"https://api.github.com/repos/zanata/zanata-spa/contributors","subscribers_url":"https://api.github.com/repos/zanata/zanata-spa/subscribers","subscription_url":"https://api.github.com/repos/zanata/zanata-spa/subscription","commits_url":"https://api.github.com/repos/zanata/zanata-spa/commits{/sha}","git_commits_url":"https://api.github.com/repos/zanata/zanata-spa/git/commits{/sha}","comments_url":"https://api.github.com/repos/zanata/zanata-spa/comments{/number}","issue_comment_url":"https://api.github.com/repos/zanata/zanata-spa/issues/comments/{number}","contents_url":"https://api.github.com/repos/zanata/zanata-spa/contents/{+path}","compare_url":"https://api.github.com/repos/zanata/zanata-spa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zanata/zanata-spa/merges","archive_url":"https://api.github.com/repos/zanata/zanata-spa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zanata/zanata-spa/downloads","issues_url":"https://api.github.com/repos/zanata/zanata-spa/issues{/number}","pulls_url":"https://api.github.com/repos/zanata/zanata-spa/pulls{/number}","milestones_url":"https://api.github.com/repos/zanata/zanata-spa/milestones{/number}","notifications_url":"https://api.github.com/repos/zanata/zanata-spa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zanata/zanata-spa/labels{/name}","releases_url":"https://api.github.com/repos/zanata/zanata-spa/releases{/id}","created_at":"2014-08-11T05:28:44Z","updated_at":"2014-09-03T00:28:56Z","pushed_at":"2014-09-18T00:47:02Z","git_url":"git://github.com/zanata/zanata-spa.git","ssh_url":"git@github.com:zanata/zanata-spa.git","clone_url":"https://github.com/zanata/zanata-spa.git","svn_url":"https://github.com/zanata/zanata-spa","homepage":"http://zanata.org","size":1248,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/49"},"html":{"href":"https://github.com/zanata/zanata-spa/pull/49"},"issue":{"href":"https://api.github.com/repos/zanata/zanata-spa/issues/49"},"comments":{"href":"https://api.github.com/repos/zanata/zanata-spa/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/zanata/zanata-spa/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/zanata/zanata-spa/statuses/65108124b3ef6543f54191ff7e3bc616672b594d"}}}}