{"action":"created","comment":{"url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/comments/24989744","id":24989744,"diff_hunk":"@@ -0,0 +1,40 @@\n+var IngredientView = function (container, model) {\n+  // Get all the relevant elements of the view (ones that show data\n+  // and/or ones that responed to interaction)\n+\n+  // Test fixture\n+  model.addDishToMenu(1);\n+  model.addDishToMenu(3);\n+  model.addDishToMenu(100);\n+  var testDish = model.getDish(1);\n+  // ----\n+\n+  this.setNumberOfGuests = function() {\n+    var guestContainer = container.find('#ingredient-guests');\n+    guestContainer.append('<h3>INGREDIENTS FOR '+model.getNumberOfGuests()+' PEOPLE</h3>');\n+  };\n+\n+  this.addIngredients = function(dish) {\n+    var ingredientContainer = container.find('#ingredient-container');\n+    _.each(dish.ingredients, function(ingredient) {\n+      console.log('hej', ingredientContainer)\n+      ingredientContainer.append('<div class=\"row\">'+\n+                '<div class=\"col-md-2\">'+ingredient.quantity+'</div>'+\n+                '<div class=\"col-md-6\">'+ingredient.name+'</div>'+\n+                '<div class=\"col-md-2\">SEK</div>'+\n+                '<div class=\"col-md-2\">'+ingredient.price+'</div>'+\n+              '</div>')\n+    });\n+  };\n+\n+  this.setTotalPrice = function(dish) {\n+    container.find('#price-per-dish').html(model.getDishPrice(dish.id));\n+  };\n+\n+\n+  // Main\n+  console.log(container);","path":"js/view/ingredientView.js","position":36,"original_position":36,"commit_id":"94b95446be9ed5c36b76e6a3eafc4135c5b96b20","original_commit_id":"94b95446be9ed5c36b76e6a3eafc4135c5b96b20","user":{"login":"sievan","id":2275998,"avatar_url":"https://avatars.githubusercontent.com/u/2275998?v=3","gravatar_id":"","url":"https://api.github.com/users/sievan","html_url":"https://github.com/sievan","followers_url":"https://api.github.com/users/sievan/followers","following_url":"https://api.github.com/users/sievan/following{/other_user}","gists_url":"https://api.github.com/users/sievan/gists{/gist_id}","starred_url":"https://api.github.com/users/sievan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sievan/subscriptions","organizations_url":"https://api.github.com/users/sievan/orgs","repos_url":"https://api.github.com/users/sievan/repos","events_url":"https://api.github.com/users/sievan/events{/privacy}","received_events_url":"https://api.github.com/users/sievan/received_events","type":"User","site_admin":false},"body":"Remove","created_at":"2015-02-19T14:14:16Z","updated_at":"2015-02-19T14:14:16Z","html_url":"https://github.com/sievan/dinnerplanner-html/pull/2#discussion_r24989744","pull_request_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/comments/24989744"},"html":{"href":"https://github.com/sievan/dinnerplanner-html/pull/2#discussion_r24989744"},"pull_request":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2","id":29613972,"html_url":"https://github.com/sievan/dinnerplanner-html/pull/2","diff_url":"https://github.com/sievan/dinnerplanner-html/pull/2.diff","patch_url":"https://github.com/sievan/dinnerplanner-html/pull/2.patch","issue_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/2","number":2,"state":"open","locked":false,"title":"Refactored IngredientView out of DescriptionView","user":{"login":"Trulls","id":8722581,"avatar_url":"https://avatars.githubusercontent.com/u/8722581?v=3","gravatar_id":"","url":"https://api.github.com/users/Trulls","html_url":"https://github.com/Trulls","followers_url":"https://api.github.com/users/Trulls/followers","following_url":"https://api.github.com/users/Trulls/following{/other_user}","gists_url":"https://api.github.com/users/Trulls/gists{/gist_id}","starred_url":"https://api.github.com/users/Trulls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trulls/subscriptions","organizations_url":"https://api.github.com/users/Trulls/orgs","repos_url":"https://api.github.com/users/Trulls/repos","events_url":"https://api.github.com/users/Trulls/events{/privacy}","received_events_url":"https://api.github.com/users/Trulls/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-19T14:13:02Z","updated_at":"2015-02-19T14:14:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3ae8028546027e091c30fe004163e33c036eb41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/2/comments","statuses_url":"https://api.github.com/repos/sievan/dinnerplanner-html/statuses/94b95446be9ed5c36b76e6a3eafc4135c5b96b20","head":{"label":"refactor-ingredients","ref":"refactor-ingredients","sha":"94b95446be9ed5c36b76e6a3eafc4135c5b96b20","user":{"login":"sievan","id":2275998,"avatar_url":"https://avatars.githubusercontent.com/u/2275998?v=3","gravatar_id":"","url":"https://api.github.com/users/sievan","html_url":"https://github.com/sievan","followers_url":"https://api.github.com/users/sievan/followers","following_url":"https://api.github.com/users/sievan/following{/other_user}","gists_url":"https://api.github.com/users/sievan/gists{/gist_id}","starred_url":"https://api.github.com/users/sievan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sievan/subscriptions","organizations_url":"https://api.github.com/users/sievan/orgs","repos_url":"https://api.github.com/users/sievan/repos","events_url":"https://api.github.com/users/sievan/events{/privacy}","received_events_url":"https://api.github.com/users/sievan/received_events","type":"User","site_admin":false},"repo":{"id":30075363,"name":"dinnerplanner-html","full_name":"sievan/dinnerplanner-html","owner":{"login":"sievan","id":2275998,"avatar_url":"https://avatars.githubusercontent.com/u/2275998?v=3","gravatar_id":"","url":"https://api.github.com/users/sievan","html_url":"https://github.com/sievan","followers_url":"https://api.github.com/users/sievan/followers","following_url":"https://api.github.com/users/sievan/following{/other_user}","gists_url":"https://api.github.com/users/sievan/gists{/gist_id}","starred_url":"https://api.github.com/users/sievan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sievan/subscriptions","organizations_url":"https://api.github.com/users/sievan/orgs","repos_url":"https://api.github.com/users/sievan/repos","events_url":"https://api.github.com/users/sievan/events{/privacy}","received_events_url":"https://api.github.com/users/sievan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sievan/dinnerplanner-html","description":"","fork":true,"url":"https://api.github.com/repos/sievan/dinnerplanner-html","forks_url":"https://api.github.com/repos/sievan/dinnerplanner-html/forks","keys_url":"https://api.github.com/repos/sievan/dinnerplanner-html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sievan/dinnerplanner-html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sievan/dinnerplanner-html/teams","hooks_url":"https://api.github.com/repos/sievan/dinnerplanner-html/hooks","issue_events_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/events{/number}","events_url":"https://api.github.com/repos/sievan/dinnerplanner-html/events","assignees_url":"https://api.github.com/repos/sievan/dinnerplanner-html/assignees{/user}","branches_url":"https://api.github.com/repos/sievan/dinnerplanner-html/branches{/branch}","tags_url":"https://api.github.com/repos/sievan/dinnerplanner-html/tags","blobs_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/refs{/sha}","trees_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sievan/dinnerplanner-html/statuses/{sha}","languages_url":"https://api.github.com/repos/sievan/dinnerplanner-html/languages","stargazers_url":"https://api.github.com/repos/sievan/dinnerplanner-html/stargazers","contributors_url":"https://api.github.com/repos/sievan/dinnerplanner-html/contributors","subscribers_url":"https://api.github.com/repos/sievan/dinnerplanner-html/subscribers","subscription_url":"https://api.github.com/repos/sievan/dinnerplanner-html/subscription","commits_url":"https://api.github.com/repos/sievan/dinnerplanner-html/commits{/sha}","git_commits_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/commits{/sha}","comments_url":"https://api.github.com/repos/sievan/dinnerplanner-html/comments{/number}","issue_comment_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/comments/{number}","contents_url":"https://api.github.com/repos/sievan/dinnerplanner-html/contents/{+path}","compare_url":"https://api.github.com/repos/sievan/dinnerplanner-html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sievan/dinnerplanner-html/merges","archive_url":"https://api.github.com/repos/sievan/dinnerplanner-html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sievan/dinnerplanner-html/downloads","issues_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues{/number}","pulls_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls{/number}","milestones_url":"https://api.github.com/repos/sievan/dinnerplanner-html/milestones{/number}","notifications_url":"https://api.github.com/repos/sievan/dinnerplanner-html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sievan/dinnerplanner-html/labels{/name}","releases_url":"https://api.github.com/repos/sievan/dinnerplanner-html/releases{/id}","created_at":"2015-01-30T14:30:08Z","updated_at":"2015-02-19T13:59:51Z","pushed_at":"2015-02-19T14:10:56Z","git_url":"git://github.com/sievan/dinnerplanner-html.git","ssh_url":"git@github.com:sievan/dinnerplanner-html.git","clone_url":"https://github.com/sievan/dinnerplanner-html.git","svn_url":"https://github.com/sievan/dinnerplanner-html","homepage":null,"size":1101,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"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":1,"default_branch":"master"}},"base":{"label":"master","ref":"master","sha":"8a9de12d6cfc21b7c03c89cfc72e487b281df4dc","user":{"login":"sievan","id":2275998,"avatar_url":"https://avatars.githubusercontent.com/u/2275998?v=3","gravatar_id":"","url":"https://api.github.com/users/sievan","html_url":"https://github.com/sievan","followers_url":"https://api.github.com/users/sievan/followers","following_url":"https://api.github.com/users/sievan/following{/other_user}","gists_url":"https://api.github.com/users/sievan/gists{/gist_id}","starred_url":"https://api.github.com/users/sievan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sievan/subscriptions","organizations_url":"https://api.github.com/users/sievan/orgs","repos_url":"https://api.github.com/users/sievan/repos","events_url":"https://api.github.com/users/sievan/events{/privacy}","received_events_url":"https://api.github.com/users/sievan/received_events","type":"User","site_admin":false},"repo":{"id":30075363,"name":"dinnerplanner-html","full_name":"sievan/dinnerplanner-html","owner":{"login":"sievan","id":2275998,"avatar_url":"https://avatars.githubusercontent.com/u/2275998?v=3","gravatar_id":"","url":"https://api.github.com/users/sievan","html_url":"https://github.com/sievan","followers_url":"https://api.github.com/users/sievan/followers","following_url":"https://api.github.com/users/sievan/following{/other_user}","gists_url":"https://api.github.com/users/sievan/gists{/gist_id}","starred_url":"https://api.github.com/users/sievan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sievan/subscriptions","organizations_url":"https://api.github.com/users/sievan/orgs","repos_url":"https://api.github.com/users/sievan/repos","events_url":"https://api.github.com/users/sievan/events{/privacy}","received_events_url":"https://api.github.com/users/sievan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sievan/dinnerplanner-html","description":"","fork":true,"url":"https://api.github.com/repos/sievan/dinnerplanner-html","forks_url":"https://api.github.com/repos/sievan/dinnerplanner-html/forks","keys_url":"https://api.github.com/repos/sievan/dinnerplanner-html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sievan/dinnerplanner-html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sievan/dinnerplanner-html/teams","hooks_url":"https://api.github.com/repos/sievan/dinnerplanner-html/hooks","issue_events_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/events{/number}","events_url":"https://api.github.com/repos/sievan/dinnerplanner-html/events","assignees_url":"https://api.github.com/repos/sievan/dinnerplanner-html/assignees{/user}","branches_url":"https://api.github.com/repos/sievan/dinnerplanner-html/branches{/branch}","tags_url":"https://api.github.com/repos/sievan/dinnerplanner-html/tags","blobs_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/refs{/sha}","trees_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sievan/dinnerplanner-html/statuses/{sha}","languages_url":"https://api.github.com/repos/sievan/dinnerplanner-html/languages","stargazers_url":"https://api.github.com/repos/sievan/dinnerplanner-html/stargazers","contributors_url":"https://api.github.com/repos/sievan/dinnerplanner-html/contributors","subscribers_url":"https://api.github.com/repos/sievan/dinnerplanner-html/subscribers","subscription_url":"https://api.github.com/repos/sievan/dinnerplanner-html/subscription","commits_url":"https://api.github.com/repos/sievan/dinnerplanner-html/commits{/sha}","git_commits_url":"https://api.github.com/repos/sievan/dinnerplanner-html/git/commits{/sha}","comments_url":"https://api.github.com/repos/sievan/dinnerplanner-html/comments{/number}","issue_comment_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/comments/{number}","contents_url":"https://api.github.com/repos/sievan/dinnerplanner-html/contents/{+path}","compare_url":"https://api.github.com/repos/sievan/dinnerplanner-html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sievan/dinnerplanner-html/merges","archive_url":"https://api.github.com/repos/sievan/dinnerplanner-html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sievan/dinnerplanner-html/downloads","issues_url":"https://api.github.com/repos/sievan/dinnerplanner-html/issues{/number}","pulls_url":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls{/number}","milestones_url":"https://api.github.com/repos/sievan/dinnerplanner-html/milestones{/number}","notifications_url":"https://api.github.com/repos/sievan/dinnerplanner-html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sievan/dinnerplanner-html/labels{/name}","releases_url":"https://api.github.com/repos/sievan/dinnerplanner-html/releases{/id}","created_at":"2015-01-30T14:30:08Z","updated_at":"2015-02-19T13:59:51Z","pushed_at":"2015-02-19T14:10:56Z","git_url":"git://github.com/sievan/dinnerplanner-html.git","ssh_url":"git@github.com:sievan/dinnerplanner-html.git","clone_url":"https://github.com/sievan/dinnerplanner-html.git","svn_url":"https://github.com/sievan/dinnerplanner-html","homepage":null,"size":1101,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2"},"html":{"href":"https://github.com/sievan/dinnerplanner-html/pull/2"},"issue":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/2"},"comments":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sievan/dinnerplanner-html/statuses/94b95446be9ed5c36b76e6a3eafc4135c5b96b20"}}}}