{"action":"created","comment":{"url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/comments/80924531","pull_request_review_id":1942789,"id":80924531,"diff_hunk":"@@ -0,0 +1,81 @@\n+(function(App) {\n+\n+  'use strict';\n+\n+  var StateModel = Backbone.Model.extend();\n+\n+  App.Presenter.SearchInput = function() {\n+    this.initialize.apply(this, arguments);\n+  };\n+\n+  _.extend(App.Presenter.SearchInput.prototype, {\n+\n+    defaults: {\n+      fuseOptions: {\n+        caseSensitive: false,\n+        includeScore: false,\n+        shouldSort: true,\n+        threshold: 0.1,\n+        location: 0,\n+        distance: 100,\n+        maxPatternLength: 0,\n+        keys: ['name']\n+      }\n+    },\n+\n+    initialize: function(params) {\n+      this.state = new StateModel();\n+      this.fullList = params.fullList instanceof Array ?\n+        { '': params.fullList } :\n+        params.fullList;\n+\n+      this.searchInput = new App.View.Input({\n+        el: '#search-input',\n+        options: {\n+          name: 'title',\n+          class: 'js-search-list',\n+          inputClass: 'c-title -bigger -bold -no-brd',\n+          type: 'text',\n+          placeholder: params.options.placeholder\n+        }\n+      });\n+\n+      this.setSubscriptions();\n+      this.focusInput();\n+    },\n+\n+    setSubscriptions: function() {\n+      this.searchInput.on('keyup', this.handleKeyup.bind(this));\n+\n+      this.state.on('change', function() {\n+        var filteredList = this.state.get('filteredList');\n+        if (filteredList) {\n+          App.trigger('SearchInput:change', filteredList, this);\n+        }\n+      }.bind(this));\n+    },\n+\n+    focusInput: function() {\n+      this.searchInput.$el.find('input').focus();\n+    },\n+\n+    handleKeyup: function(ev) {\n+      this.searchValue = ev.value;\n+      this.getFilteredList();\n+    },\n+\n+    getFilteredList: function() {\n+      var result = [];\n+      if (this.searchValue !== '') {\n+        _.each(this.fullList, function(groups) {\n+          var fuse = new Fuse(groups, this.defaults.fuseOptions);","path":"app/assets/javascripts/presenters/search_input_presenter.js","position":71,"original_position":71,"commit_id":"c3dbbbc4b7910e9ee689f87021bb57b89030aba1","original_commit_id":"c3dbbbc4b7910e9ee689f87021bb57b89030aba1","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'Fuse' is not defined  no-undef","created_at":"2016-09-28T14:08:32Z","updated_at":"2016-09-28T14:08:32Z","html_url":"https://github.com/Vizzuality/GCPM/pull/87#discussion_r80924531","pull_request_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/comments/80924531"},"html":{"href":"https://github.com/Vizzuality/GCPM/pull/87#discussion_r80924531"},"pull_request":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87","id":87080077,"html_url":"https://github.com/Vizzuality/GCPM/pull/87","diff_url":"https://github.com/Vizzuality/GCPM/pull/87.diff","patch_url":"https://github.com/Vizzuality/GCPM/pull/87.patch","issue_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/87","number":87,"state":"open","locked":false,"title":"Feature/country presenter","user":{"login":"bitTal","id":10086921,"avatar_url":"https://avatars.githubusercontent.com/u/10086921?v=3","gravatar_id":"","url":"https://api.github.com/users/bitTal","html_url":"https://github.com/bitTal","followers_url":"https://api.github.com/users/bitTal/followers","following_url":"https://api.github.com/users/bitTal/following{/other_user}","gists_url":"https://api.github.com/users/bitTal/gists{/gist_id}","starred_url":"https://api.github.com/users/bitTal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitTal/subscriptions","organizations_url":"https://api.github.com/users/bitTal/orgs","repos_url":"https://api.github.com/users/bitTal/repos","events_url":"https://api.github.com/users/bitTal/events{/privacy}","received_events_url":"https://api.github.com/users/bitTal/received_events","type":"User","site_admin":false},"body":"Country & Cancer Types search and detail pages.","created_at":"2016-09-28T09:03:16Z","updated_at":"2016-09-28T14:08:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e38e957f6ac32a37b93ec50baf20477cbf4d4f1c","assignee":{"login":"davidsingal","id":674179,"avatar_url":"https://avatars.githubusercontent.com/u/674179?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsingal","html_url":"https://github.com/davidsingal","followers_url":"https://api.github.com/users/davidsingal/followers","following_url":"https://api.github.com/users/davidsingal/following{/other_user}","gists_url":"https://api.github.com/users/davidsingal/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsingal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsingal/subscriptions","organizations_url":"https://api.github.com/users/davidsingal/orgs","repos_url":"https://api.github.com/users/davidsingal/repos","events_url":"https://api.github.com/users/davidsingal/events{/privacy}","received_events_url":"https://api.github.com/users/davidsingal/received_events","type":"User","site_admin":false},"assignees":[{"login":"davidsingal","id":674179,"avatar_url":"https://avatars.githubusercontent.com/u/674179?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsingal","html_url":"https://github.com/davidsingal","followers_url":"https://api.github.com/users/davidsingal/followers","following_url":"https://api.github.com/users/davidsingal/following{/other_user}","gists_url":"https://api.github.com/users/davidsingal/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsingal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsingal/subscriptions","organizations_url":"https://api.github.com/users/davidsingal/orgs","repos_url":"https://api.github.com/users/davidsingal/repos","events_url":"https://api.github.com/users/davidsingal/events{/privacy}","received_events_url":"https://api.github.com/users/davidsingal/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87/commits","review_comments_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87/comments","review_comment_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/87/comments","statuses_url":"https://api.github.com/repos/Vizzuality/GCPM/statuses/c3dbbbc4b7910e9ee689f87021bb57b89030aba1","head":{"label":"Vizzuality:feature/country-presenter","ref":"feature/country-presenter","sha":"c3dbbbc4b7910e9ee689f87021bb57b89030aba1","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":61202570,"name":"GCPM","full_name":"Vizzuality/GCPM","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/GCPM","description":"Global Cancer Project Map V2","fork":false,"url":"https://api.github.com/repos/Vizzuality/GCPM","forks_url":"https://api.github.com/repos/Vizzuality/GCPM/forks","keys_url":"https://api.github.com/repos/Vizzuality/GCPM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/GCPM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/GCPM/teams","hooks_url":"https://api.github.com/repos/Vizzuality/GCPM/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/GCPM/events","assignees_url":"https://api.github.com/repos/Vizzuality/GCPM/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/GCPM/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/GCPM/tags","blobs_url":"https://api.github.com/repos/Vizzuality/GCPM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/GCPM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/GCPM/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/GCPM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/GCPM/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/GCPM/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/GCPM/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/GCPM/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/GCPM/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/GCPM/subscription","commits_url":"https://api.github.com/repos/Vizzuality/GCPM/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/GCPM/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/GCPM/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/GCPM/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/GCPM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/GCPM/merges","archive_url":"https://api.github.com/repos/Vizzuality/GCPM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/GCPM/downloads","issues_url":"https://api.github.com/repos/Vizzuality/GCPM/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/GCPM/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/GCPM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/GCPM/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/GCPM/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/GCPM/deployments","created_at":"2016-06-15T11:22:56Z","updated_at":"2016-09-28T10:08:01Z","pushed_at":"2016-09-28T14:08:21Z","git_url":"git://github.com/Vizzuality/GCPM.git","ssh_url":"git@github.com:Vizzuality/GCPM.git","clone_url":"https://github.com/Vizzuality/GCPM.git","svn_url":"https://github.com/Vizzuality/GCPM","homepage":null,"size":4924,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Vizzuality:develop","ref":"develop","sha":"79b79e58864ede48a4920059a5275fc6c3db5f13","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":61202570,"name":"GCPM","full_name":"Vizzuality/GCPM","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/GCPM","description":"Global Cancer Project Map V2","fork":false,"url":"https://api.github.com/repos/Vizzuality/GCPM","forks_url":"https://api.github.com/repos/Vizzuality/GCPM/forks","keys_url":"https://api.github.com/repos/Vizzuality/GCPM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/GCPM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/GCPM/teams","hooks_url":"https://api.github.com/repos/Vizzuality/GCPM/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/GCPM/events","assignees_url":"https://api.github.com/repos/Vizzuality/GCPM/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/GCPM/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/GCPM/tags","blobs_url":"https://api.github.com/repos/Vizzuality/GCPM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/GCPM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/GCPM/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/GCPM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/GCPM/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/GCPM/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/GCPM/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/GCPM/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/GCPM/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/GCPM/subscription","commits_url":"https://api.github.com/repos/Vizzuality/GCPM/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/GCPM/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/GCPM/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/GCPM/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/GCPM/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/GCPM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/GCPM/merges","archive_url":"https://api.github.com/repos/Vizzuality/GCPM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/GCPM/downloads","issues_url":"https://api.github.com/repos/Vizzuality/GCPM/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/GCPM/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/GCPM/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/GCPM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/GCPM/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/GCPM/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/GCPM/deployments","created_at":"2016-06-15T11:22:56Z","updated_at":"2016-09-28T10:08:01Z","pushed_at":"2016-09-28T14:08:21Z","git_url":"git://github.com/Vizzuality/GCPM.git","ssh_url":"git@github.com:Vizzuality/GCPM.git","clone_url":"https://github.com/Vizzuality/GCPM.git","svn_url":"https://github.com/Vizzuality/GCPM","homepage":null,"size":4924,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87"},"html":{"href":"https://github.com/Vizzuality/GCPM/pull/87"},"issue":{"href":"https://api.github.com/repos/Vizzuality/GCPM/issues/87"},"comments":{"href":"https://api.github.com/repos/Vizzuality/GCPM/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vizzuality/GCPM/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/Vizzuality/GCPM/statuses/c3dbbbc4b7910e9ee689f87021bb57b89030aba1"}}}}
{"actor":{"display_login":"houndci-bot"}}