{"action":"created","comment":{"url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/comments/75277670","id":75277670,"diff_hunk":"@@ -138,34 +133,72 @@ function generateTodoListElement(todo) {\n         updInput.setAttribute(\"type\", \"text\");\n         var updConfirmButton = document.createElement(\"input\");\n         updConfirmButton.id = \"upd-confirm\" + todo.id;\n+        updConfirmButton.classList.add(\"button\");\n         updConfirmButton.setAttribute(\"type\", \"submit\");\n         updConfirmButton.setAttribute(\"value\", \"Confirm\");\n         updForm.appendChild(updInput);\n         updForm.appendChild(updConfirmButton);\n         updInput.setAttribute(\"value\", todo.title);\n         todoText.parentNode.replaceChild(updForm, todoText);\n         updForm.onsubmit = function() {\n-            updateTodo(todo.id, updInput.value, todo.isComplete, reloadTodoList);\n+            var dataToSend = JSON.stringify({\n+                title: updInput.value,\n+                completeState: todo.isComplete\n+            });\n+            makeRequest(\"api/todo/\" + todo.id, \"PUT\", dataToSend, \"Failed to update item.\")\n+                .then(reloadTodoList);\n         };\n     };\n \n-    var completedBtn = document.createElement(\"button\");\n-    completedBtn.innerHTML = \"Done\";\n-    completedBtn.className = \"completed-btn\";\n-\n+    //if the todo has been tagged as complete then add the complete css class to the element\n+    //if the todo is uncomplete but already has the complete css class then remove it\n     if (todo.isComplete) {\n-        todoText.classList.add(\"todo-complete\");\n-    } else if (todoText.classList.contains(\"todo-complete\")) {\n-        todoText.classList.remove(\"todo-complete\");\n+        listItem.classList.add(\"todo-item-complete\");\n+        todoText.classList.add(\"todo-text-complete\");\n+    } else if (todoText.classList.contains(\"todo-text-complete\")) {","path":"public/main.js","position":249,"original_position":249,"commit_id":"94a0519cc2371e7d7f5d9a1cfc343eddafd9a253","original_commit_id":"94a0519cc2371e7d7f5d9a1cfc343eddafd9a253","user":{"login":"jebbinSCL","id":11422633,"avatar_url":"https://avatars.githubusercontent.com/u/11422633?v=3","gravatar_id":"","url":"https://api.github.com/users/jebbinSCL","html_url":"https://github.com/jebbinSCL","followers_url":"https://api.github.com/users/jebbinSCL/followers","following_url":"https://api.github.com/users/jebbinSCL/following{/other_user}","gists_url":"https://api.github.com/users/jebbinSCL/gists{/gist_id}","starred_url":"https://api.github.com/users/jebbinSCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebbinSCL/subscriptions","organizations_url":"https://api.github.com/users/jebbinSCL/orgs","repos_url":"https://api.github.com/users/jebbinSCL/repos","events_url":"https://api.github.com/users/jebbinSCL/events{/privacy}","received_events_url":"https://api.github.com/users/jebbinSCL/received_events","type":"User","site_admin":false},"body":"Will this case ever be hit? I'm not sure, but it seems like it wouldn't be. ","created_at":"2016-08-18T09:41:49Z","updated_at":"2016-08-18T09:41:49Z","html_url":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7#discussion_r75277670","pull_request_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/comments/75277670"},"html":{"href":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7#discussion_r75277670"},"pull_request":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7","id":81648793,"html_url":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7","diff_url":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7.diff","patch_url":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7.patch","issue_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/7","number":7,"state":"open","locked":false,"title":"Filter buttons","user":{"login":"BRHoward","id":10777232,"avatar_url":"https://avatars.githubusercontent.com/u/10777232?v=3","gravatar_id":"","url":"https://api.github.com/users/BRHoward","html_url":"https://github.com/BRHoward","followers_url":"https://api.github.com/users/BRHoward/followers","following_url":"https://api.github.com/users/BRHoward/following{/other_user}","gists_url":"https://api.github.com/users/BRHoward/gists{/gist_id}","starred_url":"https://api.github.com/users/BRHoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BRHoward/subscriptions","organizations_url":"https://api.github.com/users/BRHoward/orgs","repos_url":"https://api.github.com/users/BRHoward/repos","events_url":"https://api.github.com/users/BRHoward/events{/privacy}","received_events_url":"https://api.github.com/users/BRHoward/received_events","type":"User","site_admin":false},"body":" - Added css button class with some styling\r\n - Added buttons for filtering view of all, completed and active todos\r\n - Changed XMLHttpRequest out for fetch API\r\n - Polling the server for changes every 30 seconds\r\n - Added relevant tests\r\n - Added grunt task for automatically restarting the server every time files change","created_at":"2016-08-17T14:05:31Z","updated_at":"2016-08-18T09:41:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44edf2e3683a3169582d429b5efec37091d44215","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7/commits","review_comments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7/comments","review_comment_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/7/comments","statuses_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/statuses/94a0519cc2371e7d7f5d9a1cfc343eddafd9a253","head":{"label":"BRHoward:filter_buttons","ref":"filter_buttons","sha":"94a0519cc2371e7d7f5d9a1cfc343eddafd9a253","user":{"login":"BRHoward","id":10777232,"avatar_url":"https://avatars.githubusercontent.com/u/10777232?v=3","gravatar_id":"","url":"https://api.github.com/users/BRHoward","html_url":"https://github.com/BRHoward","followers_url":"https://api.github.com/users/BRHoward/followers","following_url":"https://api.github.com/users/BRHoward/following{/other_user}","gists_url":"https://api.github.com/users/BRHoward/gists{/gist_id}","starred_url":"https://api.github.com/users/BRHoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BRHoward/subscriptions","organizations_url":"https://api.github.com/users/BRHoward/orgs","repos_url":"https://api.github.com/users/BRHoward/repos","events_url":"https://api.github.com/users/BRHoward/events{/privacy}","received_events_url":"https://api.github.com/users/BRHoward/received_events","type":"User","site_admin":false},"repo":{"id":65718409,"name":"todo-grad-project-bhoward","full_name":"BRHoward/todo-grad-project-bhoward","owner":{"login":"BRHoward","id":10777232,"avatar_url":"https://avatars.githubusercontent.com/u/10777232?v=3","gravatar_id":"","url":"https://api.github.com/users/BRHoward","html_url":"https://github.com/BRHoward","followers_url":"https://api.github.com/users/BRHoward/followers","following_url":"https://api.github.com/users/BRHoward/following{/other_user}","gists_url":"https://api.github.com/users/BRHoward/gists{/gist_id}","starred_url":"https://api.github.com/users/BRHoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BRHoward/subscriptions","organizations_url":"https://api.github.com/users/BRHoward/orgs","repos_url":"https://api.github.com/users/BRHoward/repos","events_url":"https://api.github.com/users/BRHoward/events{/privacy}","received_events_url":"https://api.github.com/users/BRHoward/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BRHoward/todo-grad-project-bhoward","description":null,"fork":false,"url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward","forks_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/forks","keys_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/teams","hooks_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/hooks","issue_events_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/events{/number}","events_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/events","assignees_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/assignees{/user}","branches_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/branches{/branch}","tags_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/tags","blobs_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/refs{/sha}","trees_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/statuses/{sha}","languages_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/languages","stargazers_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/stargazers","contributors_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/contributors","subscribers_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/subscribers","subscription_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/subscription","commits_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/commits{/sha}","git_commits_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/commits{/sha}","comments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/comments{/number}","issue_comment_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/comments{/number}","contents_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/contents/{+path}","compare_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/merges","archive_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/downloads","issues_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues{/number}","pulls_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls{/number}","milestones_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/milestones{/number}","notifications_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/labels{/name}","releases_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/releases{/id}","deployments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/deployments","created_at":"2016-08-15T08:50:56Z","updated_at":"2016-08-15T09:09:50Z","pushed_at":"2016-08-18T08:07:26Z","git_url":"git://github.com/BRHoward/todo-grad-project-bhoward.git","ssh_url":"git@github.com:BRHoward/todo-grad-project-bhoward.git","clone_url":"https://github.com/BRHoward/todo-grad-project-bhoward.git","svn_url":"https://github.com/BRHoward/todo-grad-project-bhoward","homepage":null,"size":58,"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":"BRHoward:master","ref":"master","sha":"9ab53941a5c70c25fb518c0ec3abf3d86913e1f7","user":{"login":"BRHoward","id":10777232,"avatar_url":"https://avatars.githubusercontent.com/u/10777232?v=3","gravatar_id":"","url":"https://api.github.com/users/BRHoward","html_url":"https://github.com/BRHoward","followers_url":"https://api.github.com/users/BRHoward/followers","following_url":"https://api.github.com/users/BRHoward/following{/other_user}","gists_url":"https://api.github.com/users/BRHoward/gists{/gist_id}","starred_url":"https://api.github.com/users/BRHoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BRHoward/subscriptions","organizations_url":"https://api.github.com/users/BRHoward/orgs","repos_url":"https://api.github.com/users/BRHoward/repos","events_url":"https://api.github.com/users/BRHoward/events{/privacy}","received_events_url":"https://api.github.com/users/BRHoward/received_events","type":"User","site_admin":false},"repo":{"id":65718409,"name":"todo-grad-project-bhoward","full_name":"BRHoward/todo-grad-project-bhoward","owner":{"login":"BRHoward","id":10777232,"avatar_url":"https://avatars.githubusercontent.com/u/10777232?v=3","gravatar_id":"","url":"https://api.github.com/users/BRHoward","html_url":"https://github.com/BRHoward","followers_url":"https://api.github.com/users/BRHoward/followers","following_url":"https://api.github.com/users/BRHoward/following{/other_user}","gists_url":"https://api.github.com/users/BRHoward/gists{/gist_id}","starred_url":"https://api.github.com/users/BRHoward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BRHoward/subscriptions","organizations_url":"https://api.github.com/users/BRHoward/orgs","repos_url":"https://api.github.com/users/BRHoward/repos","events_url":"https://api.github.com/users/BRHoward/events{/privacy}","received_events_url":"https://api.github.com/users/BRHoward/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BRHoward/todo-grad-project-bhoward","description":null,"fork":false,"url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward","forks_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/forks","keys_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/teams","hooks_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/hooks","issue_events_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/events{/number}","events_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/events","assignees_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/assignees{/user}","branches_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/branches{/branch}","tags_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/tags","blobs_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/refs{/sha}","trees_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/statuses/{sha}","languages_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/languages","stargazers_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/stargazers","contributors_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/contributors","subscribers_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/subscribers","subscription_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/subscription","commits_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/commits{/sha}","git_commits_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/git/commits{/sha}","comments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/comments{/number}","issue_comment_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/comments{/number}","contents_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/contents/{+path}","compare_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/merges","archive_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/downloads","issues_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues{/number}","pulls_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls{/number}","milestones_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/milestones{/number}","notifications_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/labels{/name}","releases_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/releases{/id}","deployments_url":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/deployments","created_at":"2016-08-15T08:50:56Z","updated_at":"2016-08-15T09:09:50Z","pushed_at":"2016-08-18T08:07:26Z","git_url":"git://github.com/BRHoward/todo-grad-project-bhoward.git","ssh_url":"git@github.com:BRHoward/todo-grad-project-bhoward.git","clone_url":"https://github.com/BRHoward/todo-grad-project-bhoward.git","svn_url":"https://github.com/BRHoward/todo-grad-project-bhoward","homepage":null,"size":58,"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/BRHoward/todo-grad-project-bhoward/pulls/7"},"html":{"href":"https://github.com/BRHoward/todo-grad-project-bhoward/pull/7"},"issue":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/7"},"comments":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/BRHoward/todo-grad-project-bhoward/statuses/94a0519cc2371e7d7f5d9a1cfc343eddafd9a253"}}}}
{"actor":{"display_login":"jebbinSCL"}}