{"action":"created","comment":{"url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/comments/78382037","id":78382037,"diff_hunk":"@@ -158,162 +158,165 @@ Contact.prototype.onShowContactlistClicked = function (event) {\n \tthis.onCancelClicked();\n \t\n \tvar editInput = \n-\t\t\"<form class='edit-item-form' hidden>\" +\n+\t  \"<form class='edit-item-form' hidden>\" +\n \t          \"<input type='text' name='edit-item-input'\" +\n \t               \"title='Edit item'>\" + \n \t          \"<button type='submit' class='visually-hidden'>Edit item</button>\" +\n \t    \"</form>\";\n-\n+\t\n \tthis.showUl.html(\"\");\n \tvar listItem = $(event.target).parent();\n \tvar i = this.listContact.find(\"li\").index(listItem);\n \tthis.showUlid = i;\n \t\n \tthis.showUl.prepend(\n-\t\t\"<h4>Double-click to edit information</h4>\" +\n-\t\t\"<h2>\" + this.persons[i].firstName + \" \" + this.persons[i].lastName + \"</h2>\"\n+\t  \"<h4>Double-click to edit information</h4>\" +\n+\t  \"<h2>\" + this.persons[i].firstName + \" \" + this.persons[i].lastName + \"</h2>\"\n \t);\n \tvar showStr = \"<ul>First name: <li><div class='value'>\" + this.persons[i].firstName + \"</div>\" + editInput + \"</li></ul>\" +\n-\t\t\"<ul>Last name: <li><div class='value'>\" + this.persons[i].lastName + \"</div>\" + editInput + \"</li></ul>\" +\n-\t\t\"<ul>Phone Number:\"; \n+\t  \"<ul>Last name: <li><div class='value'>\" + this.persons[i].lastName + \"</div>\" + editInput + \"</li></ul>\" +\n+\t  \"<ul>Phone Number:\"; \n \tfor(var j = 0; j < this.persons[i].phoneNumber.length; j += 1)\n-\t\tshowStr += \"<li><div class = 'value'>\" + this.persons[i].phoneNumber[j] + \"</div>\" + editInput + \"</li>\";\n+\t  showStr += \"<li><div class = 'value'>\" + this.persons[i].phoneNumber[j] + \"</div>\" + editInput + \"</li>\";\n \tshowStr += \"</ul><ul>Address:\";\n \tif(this.persons[i][\"Address\"][0]) {\n-\t\tfor(var j = 0; j < this.persons[i][\"Address\"].length; j += 1)\n-\t\t\tshowStr += \"<li><div class='value'>\" + this.persons[i].Address[j] + \"</div>\" + editInput + \"</li>\";\n+\t  for(var j = 0; j < this.persons[i][\"Address\"].length; j += 1)\n+\t    showStr += \"<li><div class='value'>\" + this.persons[i].Address[j] + \"</div>\" + editInput + \"</li>\";\n \t}\n \tshowStr += \"</ul>\";\n \tthis.showUl.append(showStr);\n };\n \n Contact.prototype.addItem = function(person) {\n-    if(person) {\n+\tif(person) {\n \t    var ajax = $.ajax('/items', {\n \t        type: 'POST',\n \t        data: JSON.stringify(person),\n \t        dataType: 'json',\n \t        contentType: 'application/json'\n \t    });\n \t    ajax.done(this.getItems.bind(this));\n-    }\n+\t}\n };\n \n Contact.prototype.getItems = function() {\n-    var ajax = $.ajax('/items', {\n-        type: 'GET',\n-        dataType: 'json'\n-    });\n-    ajax.done(this.onGetItemsDone.bind(this));\n+\tvar ajax = $.ajax('/items', {\n+\t    type: 'GET',\n+\t    dataType: 'json'\n+\t});\n+\tajax.done(this.onGetItemsDone.bind(this));\n };\n \n Contact.prototype.onGetItemsDone = function(items) {\n-    this.persons = items;\n-    this.updateItemsView();\n-    console.log(items);\n+\tthis.persons = items;\n+\tthis.updateItemsView();\n+\tconsole.log(items);\n };\n \n Contact.prototype.updateItemsView = function() {\n \tthis.listUl.html(\"\");\n \tvar xSvg = $(\".hidden\").clone();\n \tfor(var i = 0; i < this.persons.length; i++) {\n-\t\tthis.listUl.append(\n-\t\t\t\"<li><a href='#0' class=person>\" + \n-\t\t\tthis.persons[i].firstName + \" \" + this.persons[i].lastName + \n-\t\t\t\"</a>\" + xSvg.html() + \"</li>\"\n-\t\t);\n-\t\tthis.listUl.find(\"svg\").eq(i).addClass(\"del-item\");\n+\t  this.listUl.append(\n+\t    \"<li><a href='#0' class=person>\" + \n+\t    this.persons[i].firstName + \" \" + this.persons[i].lastName + \n+\t    \"</a>\" + xSvg.html() + \"</li>\"\n+\t  );\n+\t  this.listUl.find(\"svg\").eq(i).addClass(\"del-item\");\n \t}\n };\n \n Contact.prototype.onDelItemClicked = function(event) {\n \tvar selectedli = $(event.target).closest(\"li\");\n \tvar i = this.listUl.find(\"li\").index(selectedli);\n \tthis.showContact.hide();\n-    this.deleteItem(this.persons[i]._id);\n+\t  this.deleteItem(this.persons[i]._id);","path":"public/main.js","position":255,"original_position":255,"commit_id":"15c4aaa32862ed0d0e16205705773a363a7c86e1","original_commit_id":"15c4aaa32862ed0d0e16205705773a363a7c86e1","user":{"login":"aric87","id":9463572,"avatar_url":"https://avatars.githubusercontent.com/u/9463572?v=3","gravatar_id":"","url":"https://api.github.com/users/aric87","html_url":"https://github.com/aric87","followers_url":"https://api.github.com/users/aric87/followers","following_url":"https://api.github.com/users/aric87/following{/other_user}","gists_url":"https://api.github.com/users/aric87/gists{/gist_id}","starred_url":"https://api.github.com/users/aric87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aric87/subscriptions","organizations_url":"https://api.github.com/users/aric87/orgs","repos_url":"https://api.github.com/users/aric87/repos","events_url":"https://api.github.com/users/aric87/events{/privacy}","received_events_url":"https://api.github.com/users/aric87/received_events","type":"User","site_admin":false},"body":"extra space character at the beginning of the line","created_at":"2016-09-12T14:24:23Z","updated_at":"2016-09-12T14:24:23Z","html_url":"https://github.com/wangmeng255/mongo-contacts/pull/1#discussion_r78382037","pull_request_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/comments/78382037"},"html":{"href":"https://github.com/wangmeng255/mongo-contacts/pull/1#discussion_r78382037"},"pull_request":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1","id":84561171,"html_url":"https://github.com/wangmeng255/mongo-contacts/pull/1","diff_url":"https://github.com/wangmeng255/mongo-contacts/pull/1.diff","patch_url":"https://github.com/wangmeng255/mongo-contacts/pull/1.patch","issue_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/1","number":1,"state":"open","locked":false,"title":"Dev","user":{"login":"wangmeng255","id":19181171,"avatar_url":"https://avatars.githubusercontent.com/u/19181171?v=3","gravatar_id":"","url":"https://api.github.com/users/wangmeng255","html_url":"https://github.com/wangmeng255","followers_url":"https://api.github.com/users/wangmeng255/followers","following_url":"https://api.github.com/users/wangmeng255/following{/other_user}","gists_url":"https://api.github.com/users/wangmeng255/gists{/gist_id}","starred_url":"https://api.github.com/users/wangmeng255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangmeng255/subscriptions","organizations_url":"https://api.github.com/users/wangmeng255/orgs","repos_url":"https://api.github.com/users/wangmeng255/repos","events_url":"https://api.github.com/users/wangmeng255/events{/privacy}","received_events_url":"https://api.github.com/users/wangmeng255/received_events","type":"User","site_admin":false},"body":"I almost finish the full stack project. Can anyone give me some suggestions?","created_at":"2016-09-08T21:55:52Z","updated_at":"2016-09-12T14:24:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7a94e78bb4e698a62f1eb50de972a352746e20b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1/commits","review_comments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1/comments","review_comment_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/1/comments","statuses_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/statuses/15c4aaa32862ed0d0e16205705773a363a7c86e1","head":{"label":"wangmeng255:dev","ref":"dev","sha":"15c4aaa32862ed0d0e16205705773a363a7c86e1","user":{"login":"wangmeng255","id":19181171,"avatar_url":"https://avatars.githubusercontent.com/u/19181171?v=3","gravatar_id":"","url":"https://api.github.com/users/wangmeng255","html_url":"https://github.com/wangmeng255","followers_url":"https://api.github.com/users/wangmeng255/followers","following_url":"https://api.github.com/users/wangmeng255/following{/other_user}","gists_url":"https://api.github.com/users/wangmeng255/gists{/gist_id}","starred_url":"https://api.github.com/users/wangmeng255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangmeng255/subscriptions","organizations_url":"https://api.github.com/users/wangmeng255/orgs","repos_url":"https://api.github.com/users/wangmeng255/repos","events_url":"https://api.github.com/users/wangmeng255/events{/privacy}","received_events_url":"https://api.github.com/users/wangmeng255/received_events","type":"User","site_admin":false},"repo":{"id":67433124,"name":"mongo-contacts","full_name":"wangmeng255/mongo-contacts","owner":{"login":"wangmeng255","id":19181171,"avatar_url":"https://avatars.githubusercontent.com/u/19181171?v=3","gravatar_id":"","url":"https://api.github.com/users/wangmeng255","html_url":"https://github.com/wangmeng255","followers_url":"https://api.github.com/users/wangmeng255/followers","following_url":"https://api.github.com/users/wangmeng255/following{/other_user}","gists_url":"https://api.github.com/users/wangmeng255/gists{/gist_id}","starred_url":"https://api.github.com/users/wangmeng255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangmeng255/subscriptions","organizations_url":"https://api.github.com/users/wangmeng255/orgs","repos_url":"https://api.github.com/users/wangmeng255/repos","events_url":"https://api.github.com/users/wangmeng255/events{/privacy}","received_events_url":"https://api.github.com/users/wangmeng255/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wangmeng255/mongo-contacts","description":null,"fork":false,"url":"https://api.github.com/repos/wangmeng255/mongo-contacts","forks_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/forks","keys_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/teams","hooks_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/hooks","issue_events_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/events","assignees_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/tags","blobs_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/languages","stargazers_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/stargazers","contributors_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/contributors","subscribers_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/subscribers","subscription_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/subscription","commits_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/merges","archive_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/downloads","issues_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/labels{/name}","releases_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/releases{/id}","deployments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/deployments","created_at":"2016-09-05T15:46:30Z","updated_at":"2016-09-06T04:51:32Z","pushed_at":"2016-09-08T21:55:52Z","git_url":"git://github.com/wangmeng255/mongo-contacts.git","ssh_url":"git@github.com:wangmeng255/mongo-contacts.git","clone_url":"https://github.com/wangmeng255/mongo-contacts.git","svn_url":"https://github.com/wangmeng255/mongo-contacts","homepage":null,"size":109,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wangmeng255:master","ref":"master","sha":"3cbf4f971225c71e7d76ed3ac197146a03a18d63","user":{"login":"wangmeng255","id":19181171,"avatar_url":"https://avatars.githubusercontent.com/u/19181171?v=3","gravatar_id":"","url":"https://api.github.com/users/wangmeng255","html_url":"https://github.com/wangmeng255","followers_url":"https://api.github.com/users/wangmeng255/followers","following_url":"https://api.github.com/users/wangmeng255/following{/other_user}","gists_url":"https://api.github.com/users/wangmeng255/gists{/gist_id}","starred_url":"https://api.github.com/users/wangmeng255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangmeng255/subscriptions","organizations_url":"https://api.github.com/users/wangmeng255/orgs","repos_url":"https://api.github.com/users/wangmeng255/repos","events_url":"https://api.github.com/users/wangmeng255/events{/privacy}","received_events_url":"https://api.github.com/users/wangmeng255/received_events","type":"User","site_admin":false},"repo":{"id":67433124,"name":"mongo-contacts","full_name":"wangmeng255/mongo-contacts","owner":{"login":"wangmeng255","id":19181171,"avatar_url":"https://avatars.githubusercontent.com/u/19181171?v=3","gravatar_id":"","url":"https://api.github.com/users/wangmeng255","html_url":"https://github.com/wangmeng255","followers_url":"https://api.github.com/users/wangmeng255/followers","following_url":"https://api.github.com/users/wangmeng255/following{/other_user}","gists_url":"https://api.github.com/users/wangmeng255/gists{/gist_id}","starred_url":"https://api.github.com/users/wangmeng255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangmeng255/subscriptions","organizations_url":"https://api.github.com/users/wangmeng255/orgs","repos_url":"https://api.github.com/users/wangmeng255/repos","events_url":"https://api.github.com/users/wangmeng255/events{/privacy}","received_events_url":"https://api.github.com/users/wangmeng255/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wangmeng255/mongo-contacts","description":null,"fork":false,"url":"https://api.github.com/repos/wangmeng255/mongo-contacts","forks_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/forks","keys_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/teams","hooks_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/hooks","issue_events_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/events","assignees_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/tags","blobs_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/languages","stargazers_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/stargazers","contributors_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/contributors","subscribers_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/subscribers","subscription_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/subscription","commits_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/merges","archive_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/downloads","issues_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/labels{/name}","releases_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/releases{/id}","deployments_url":"https://api.github.com/repos/wangmeng255/mongo-contacts/deployments","created_at":"2016-09-05T15:46:30Z","updated_at":"2016-09-06T04:51:32Z","pushed_at":"2016-09-08T21:55:52Z","git_url":"git://github.com/wangmeng255/mongo-contacts.git","ssh_url":"git@github.com:wangmeng255/mongo-contacts.git","clone_url":"https://github.com/wangmeng255/mongo-contacts.git","svn_url":"https://github.com/wangmeng255/mongo-contacts","homepage":null,"size":109,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1"},"html":{"href":"https://github.com/wangmeng255/mongo-contacts/pull/1"},"issue":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/1"},"comments":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/wangmeng255/mongo-contacts/statuses/15c4aaa32862ed0d0e16205705773a363a7c86e1"}}}}
{"actor":{"display_login":"aric87"}}