{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/comments/40915783","id":40915783,"diff_hunk":"@@ -40,3 +40,32 @@ module.exports = class Contact extends Backbone.Model\n             options.attrs.url = mainUrl.value\n \n         super\n+\n+\n+    toString: (opts = {}) ->\n+        [gn, fn, mn, pf, sf] = @attributes.n.split ';'\n+        str  = ''\n+        str += \"#{pf} \" if pf\n+        str += \"#{fn} \"\n+        str += \"#{mn} \" if mn\n+        str += opts.pre if opts.pre\n+        str += gn\n+        str += opts.post if opts.post\n+        str += \" #{sf}\" if sf\n+        return str","path":"client/app/models/contact.coffee","position":16,"original_position":16,"commit_id":"d55472c4a201fa95faa61411b8bdfcfde9e53e85","original_commit_id":"d55472c4a201fa95faa61411b8bdfcfde9e53e85","user":{"login":"nono","id":2767,"avatar_url":"https://avatars.githubusercontent.com/u/2767?v=3","gravatar_id":"","url":"https://api.github.com/users/nono","html_url":"https://github.com/nono","followers_url":"https://api.github.com/users/nono/followers","following_url":"https://api.github.com/users/nono/following{/other_user}","gists_url":"https://api.github.com/users/nono/gists{/gist_id}","starred_url":"https://api.github.com/users/nono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nono/subscriptions","organizations_url":"https://api.github.com/users/nono/orgs","repos_url":"https://api.github.com/users/nono/repos","events_url":"https://api.github.com/users/nono/events{/privacy}","received_events_url":"https://api.github.com/users/nono/received_events","type":"User","site_admin":false},"body":"Just a suggestion:\r\n\r\n```coffee\r\n_.compact([pf, fn, mn, opts.pre, gn, opts.post, sf]).join \" \"\r\n```","created_at":"2015-10-01T14:00:42Z","updated_at":"2015-10-01T14:00:42Z","html_url":"https://github.com/cozy/cozy-contacts/pull/146#discussion_r40915783","pull_request_url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/comments/40915783"},"html":{"href":"https://github.com/cozy/cozy-contacts/pull/146#discussion_r40915783"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146","id":46393215,"html_url":"https://github.com/cozy/cozy-contacts/pull/146","diff_url":"https://github.com/cozy/cozy-contacts/pull/146.diff","patch_url":"https://github.com/cozy/cozy-contacts/pull/146.patch","issue_url":"https://api.github.com/repos/cozy/cozy-contacts/issues/146","number":146,"state":"open","locked":false,"title":"Features: Search","user":{"login":"m4dz","id":471486,"avatar_url":"https://avatars.githubusercontent.com/u/471486?v=3","gravatar_id":"","url":"https://api.github.com/users/m4dz","html_url":"https://github.com/m4dz","followers_url":"https://api.github.com/users/m4dz/followers","following_url":"https://api.github.com/users/m4dz/following{/other_user}","gists_url":"https://api.github.com/users/m4dz/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dz/subscriptions","organizations_url":"https://api.github.com/users/m4dz/orgs","repos_url":"https://api.github.com/users/m4dz/repos","events_url":"https://api.github.com/users/m4dz/events{/privacy}","received_events_url":"https://api.github.com/users/m4dz/received_events","type":"User","site_admin":false},"body":"This PR contains the search feature, with full-text search on qualified name at this time. The Search component code architecture let us add more search criterias (such as full-text search in tags or emails) later.\r\n\r\n@kelukelu, I let you style the results (highligthed parts as tagged with `span.search`) and the reset button if you think it's not ok.\r\n\r\nENJOY \\o/ !","created_at":"2015-09-30T12:06:50Z","updated_at":"2015-10-01T14:00:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f83d9f14e43446be4a0ac9a3ff1edb7a8aadd0d7","assignee":{"login":"aenario","id":1580287,"avatar_url":"https://avatars.githubusercontent.com/u/1580287?v=3","gravatar_id":"","url":"https://api.github.com/users/aenario","html_url":"https://github.com/aenario","followers_url":"https://api.github.com/users/aenario/followers","following_url":"https://api.github.com/users/aenario/following{/other_user}","gists_url":"https://api.github.com/users/aenario/gists{/gist_id}","starred_url":"https://api.github.com/users/aenario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aenario/subscriptions","organizations_url":"https://api.github.com/users/aenario/orgs","repos_url":"https://api.github.com/users/aenario/repos","events_url":"https://api.github.com/users/aenario/events{/privacy}","received_events_url":"https://api.github.com/users/aenario/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-contacts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-contacts/issues/146/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-contacts/statuses/d55472c4a201fa95faa61411b8bdfcfde9e53e85","head":{"label":"m4dz:features/search","ref":"features/search","sha":"d55472c4a201fa95faa61411b8bdfcfde9e53e85","user":{"login":"m4dz","id":471486,"avatar_url":"https://avatars.githubusercontent.com/u/471486?v=3","gravatar_id":"","url":"https://api.github.com/users/m4dz","html_url":"https://github.com/m4dz","followers_url":"https://api.github.com/users/m4dz/followers","following_url":"https://api.github.com/users/m4dz/following{/other_user}","gists_url":"https://api.github.com/users/m4dz/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dz/subscriptions","organizations_url":"https://api.github.com/users/m4dz/orgs","repos_url":"https://api.github.com/users/m4dz/repos","events_url":"https://api.github.com/users/m4dz/events{/privacy}","received_events_url":"https://api.github.com/users/m4dz/received_events","type":"User","site_admin":false},"repo":{"id":31056436,"name":"cozy-contacts","full_name":"m4dz/cozy-contacts","owner":{"login":"m4dz","id":471486,"avatar_url":"https://avatars.githubusercontent.com/u/471486?v=3","gravatar_id":"","url":"https://api.github.com/users/m4dz","html_url":"https://github.com/m4dz","followers_url":"https://api.github.com/users/m4dz/followers","following_url":"https://api.github.com/users/m4dz/following{/other_user}","gists_url":"https://api.github.com/users/m4dz/gists{/gist_id}","starred_url":"https://api.github.com/users/m4dz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4dz/subscriptions","organizations_url":"https://api.github.com/users/m4dz/orgs","repos_url":"https://api.github.com/users/m4dz/repos","events_url":"https://api.github.com/users/m4dz/events{/privacy}","received_events_url":"https://api.github.com/users/m4dz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m4dz/cozy-contacts","description":"CRM for individuals","fork":true,"url":"https://api.github.com/repos/m4dz/cozy-contacts","forks_url":"https://api.github.com/repos/m4dz/cozy-contacts/forks","keys_url":"https://api.github.com/repos/m4dz/cozy-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m4dz/cozy-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m4dz/cozy-contacts/teams","hooks_url":"https://api.github.com/repos/m4dz/cozy-contacts/hooks","issue_events_url":"https://api.github.com/repos/m4dz/cozy-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/m4dz/cozy-contacts/events","assignees_url":"https://api.github.com/repos/m4dz/cozy-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/m4dz/cozy-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/m4dz/cozy-contacts/tags","blobs_url":"https://api.github.com/repos/m4dz/cozy-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m4dz/cozy-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m4dz/cozy-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/m4dz/cozy-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m4dz/cozy-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/m4dz/cozy-contacts/languages","stargazers_url":"https://api.github.com/repos/m4dz/cozy-contacts/stargazers","contributors_url":"https://api.github.com/repos/m4dz/cozy-contacts/contributors","subscribers_url":"https://api.github.com/repos/m4dz/cozy-contacts/subscribers","subscription_url":"https://api.github.com/repos/m4dz/cozy-contacts/subscription","commits_url":"https://api.github.com/repos/m4dz/cozy-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/m4dz/cozy-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/m4dz/cozy-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/m4dz/cozy-contacts/issues/comments{/number}","contents_url":"https://api.github.com/repos/m4dz/cozy-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/m4dz/cozy-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m4dz/cozy-contacts/merges","archive_url":"https://api.github.com/repos/m4dz/cozy-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m4dz/cozy-contacts/downloads","issues_url":"https://api.github.com/repos/m4dz/cozy-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/m4dz/cozy-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/m4dz/cozy-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/m4dz/cozy-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m4dz/cozy-contacts/labels{/name}","releases_url":"https://api.github.com/repos/m4dz/cozy-contacts/releases{/id}","created_at":"2015-02-20T08:29:26Z","updated_at":"2015-02-20T08:29:26Z","pushed_at":"2015-09-30T12:06:22Z","git_url":"git://github.com/m4dz/cozy-contacts.git","ssh_url":"git@github.com:m4dz/cozy-contacts.git","clone_url":"https://github.com/m4dz/cozy-contacts.git","svn_url":"https://github.com/m4dz/cozy-contacts","homepage":"http://mycozycloud.github.io/cozy-contacts/","size":7283,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cozy:development","ref":"development","sha":"7bdc67c60aa6a4cd74941dafdc68b83963c69f18","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":10243176,"name":"cozy-contacts","full_name":"cozy/cozy-contacts","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-contacts","description":"CRM for individuals","fork":false,"url":"https://api.github.com/repos/cozy/cozy-contacts","forks_url":"https://api.github.com/repos/cozy/cozy-contacts/forks","keys_url":"https://api.github.com/repos/cozy/cozy-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-contacts/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-contacts/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-contacts/events","assignees_url":"https://api.github.com/repos/cozy/cozy-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-contacts/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-contacts/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-contacts/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-contacts/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-contacts/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-contacts/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-contacts/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-contacts/merges","archive_url":"https://api.github.com/repos/cozy/cozy-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-contacts/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-contacts/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-contacts/releases{/id}","created_at":"2013-05-23T12:25:11Z","updated_at":"2015-08-31T15:52:37Z","pushed_at":"2015-10-01T12:21:13Z","git_url":"git://github.com/cozy/cozy-contacts.git","ssh_url":"git@github.com:cozy/cozy-contacts.git","clone_url":"https://github.com/cozy/cozy-contacts.git","svn_url":"https://github.com/cozy/cozy-contacts","homepage":"http://cozy.io","size":8204,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":34,"forks":18,"open_issues":34,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146"},"html":{"href":"https://github.com/cozy/cozy-contacts/pull/146"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-contacts/issues/146"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-contacts/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-contacts/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-contacts/statuses/d55472c4a201fa95faa61411b8bdfcfde9e53e85"}}}}