{"action":"created","comment":{"url":"https://api.github.com/repos/jakataja/inherit-me/pulls/comments/62867370","id":62867370,"diff_hunk":"@@ -0,0 +1,307 @@\n+/*jslint plusplus: true */\n+/*global PatternF, PatternP, PatternC: false */\n+\n+var plants,\n+  plantsList = [],\n+  currList = [],\n+  pattern,\n+  selectedPattern,\n+  nextBtn,\n+  prevBtn,\n+  housePlantsChbx,\n+  sortPriceChbx,\n+  displayRowsNum = 10,\n+  currPage = 0,\n+  request = new XMLHttpRequest();\n+\n+function getLocalStorage() {\n+  \"use strict\";\n+  return JSON.parse(localStorage.getItem(\"plantsList\")).plants;\n+}\n+\n+request.onreadystatechange = function () {\n+  \"use strict\";\n+  if (request.readyState === 4) {\n+    if (request.status === 200) {\n+      localStorage.setItem(\"plantsList\", request.responseText);\n+      plants = getLocalStorage();\n+    }\n+  }\n+};\n+\n+request.open(\"Get\", \"plants.json\");\n+\n+function createListRow(data, index) {\n+\n+  \"use strict\";\n+\n+  var row, f, i, c, field,\n+    fields = [\"species\",\n+      \"price\",\n+      \"life\",\n+      \"flowers\",\n+      \"bloom\",\n+      \"environment\",\n+      \"dust\",\n+      \"fruits\",\n+      \"leafs\",\n+      \"height\"];\n+\n+  // create list row\n+  row = document.createElement(\"div\");\n+  if (data instanceof pattern.Flower || data.instance === \"Flower\") {\n+    row.className = \"plant-row clearfix flower\";\n+  } else if (data instanceof pattern.Tree || data.instance === \"Tree\") {\n+    row.className = \"plant-row clearfix tree\";\n+  }\n+\n+  // set field and classes\n+  for (i = 0; i < fields.length; i++) {\n+    field = document.createElement(\"div\");\n+    field.className = \"plant-\" + fields[i] + \" clearfix\";\n+    row.appendChild(field);\n+  }\n+\n+\n+  // fill fields with data\n+  for (f in data.options ) {\n+    if (data.options.hasOwnProperty(f)) {\n+      c =  f.split(/[A-Z]/)[0];\n+      row.querySelector(\".plant-\" + c).innerHTML = data.options[f];\n+    }\n+  }\n+\n+  row.style.opacity = 0;\n+  document.getElementsByClassName(\"plant-list\")[0].appendChild(row);\n+\n+  setTimeout(function () {\n+    row.style.opacity = 1;\n+  }, 50 * (index % displayRowsNum));\n+\n+}\n+\n+function clearList() {\n+\n+  \"use strict\";\n+\n+  var row, rows, i;\n+  rows = document.getElementsByClassName(\"plant-row\");\n+\n+  if (rows.length < 2) {\n+    return;\n+  }\n+\n+  for (i = rows.length - 1; i > 0; i--) {\n+    row = rows[i];\n+    row.parentNode.removeChild(row);\n+  }\n+}\n+\n+function renderList() {\n+\n+  \"use strict\";\n+  currList.map(function (plant, i) {\n+    console.log(plant.options.species,i)\n+    if (i >= displayRowsNum * currPage && i < displayRowsNum * (currPage + 1)) {\n+      createListRow(plant, i);\n+    }\n+  });\n+}\n+\n+function sortList() {\n+\n+  console.log(\"sortList\")\n+\n+  \"use strict\";","path":"app/js/index.js","position":115,"original_position":115,"commit_id":"db20483ae0f8c6776231cbb9af4da76c7c9bc3c9","original_commit_id":"db20483ae0f8c6776231cbb9af4da76c7c9bc3c9","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":"Expected an assignment or function call and instead saw an expression.","created_at":"2016-05-11T15:15:40Z","updated_at":"2016-05-11T15:15:40Z","html_url":"https://github.com/jakataja/inherit-me/pull/1#discussion_r62867370","pull_request_url":"https://api.github.com/repos/jakataja/inherit-me/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jakataja/inherit-me/pulls/comments/62867370"},"html":{"href":"https://github.com/jakataja/inherit-me/pull/1#discussion_r62867370"},"pull_request":{"href":"https://api.github.com/repos/jakataja/inherit-me/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jakataja/inherit-me/pulls/1","id":69161552,"html_url":"https://github.com/jakataja/inherit-me/pull/1","diff_url":"https://github.com/jakataja/inherit-me/pull/1.diff","patch_url":"https://github.com/jakataja/inherit-me/pull/1.patch","issue_url":"https://api.github.com/repos/jakataja/inherit-me/issues/1","number":1,"state":"open","locked":false,"title":"Inherit dev","user":{"login":"jakataja","id":16820386,"avatar_url":"https://avatars.githubusercontent.com/u/16820386?v=3","gravatar_id":"","url":"https://api.github.com/users/jakataja","html_url":"https://github.com/jakataja","followers_url":"https://api.github.com/users/jakataja/followers","following_url":"https://api.github.com/users/jakataja/following{/other_user}","gists_url":"https://api.github.com/users/jakataja/gists{/gist_id}","starred_url":"https://api.github.com/users/jakataja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakataja/subscriptions","organizations_url":"https://api.github.com/users/jakataja/orgs","repos_url":"https://api.github.com/users/jakataja/repos","events_url":"https://api.github.com/users/jakataja/events{/privacy}","received_events_url":"https://api.github.com/users/jakataja/received_events","type":"User","site_admin":false},"body":"@rootical @przemko1984 ","created_at":"2016-05-06T14:47:58Z","updated_at":"2016-05-11T15:15:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48d5c8b7e430229bb2dcc1004230ba77f8f3c15f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jakataja/inherit-me/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jakataja/inherit-me/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jakataja/inherit-me/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jakataja/inherit-me/issues/1/comments","statuses_url":"https://api.github.com/repos/jakataja/inherit-me/statuses/db20483ae0f8c6776231cbb9af4da76c7c9bc3c9","head":{"label":"jakataja:inherit-dev","ref":"inherit-dev","sha":"db20483ae0f8c6776231cbb9af4da76c7c9bc3c9","user":{"login":"jakataja","id":16820386,"avatar_url":"https://avatars.githubusercontent.com/u/16820386?v=3","gravatar_id":"","url":"https://api.github.com/users/jakataja","html_url":"https://github.com/jakataja","followers_url":"https://api.github.com/users/jakataja/followers","following_url":"https://api.github.com/users/jakataja/following{/other_user}","gists_url":"https://api.github.com/users/jakataja/gists{/gist_id}","starred_url":"https://api.github.com/users/jakataja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakataja/subscriptions","organizations_url":"https://api.github.com/users/jakataja/orgs","repos_url":"https://api.github.com/users/jakataja/repos","events_url":"https://api.github.com/users/jakataja/events{/privacy}","received_events_url":"https://api.github.com/users/jakataja/received_events","type":"User","site_admin":false},"repo":{"id":57216296,"name":"inherit-me","full_name":"jakataja/inherit-me","owner":{"login":"jakataja","id":16820386,"avatar_url":"https://avatars.githubusercontent.com/u/16820386?v=3","gravatar_id":"","url":"https://api.github.com/users/jakataja","html_url":"https://github.com/jakataja","followers_url":"https://api.github.com/users/jakataja/followers","following_url":"https://api.github.com/users/jakataja/following{/other_user}","gists_url":"https://api.github.com/users/jakataja/gists{/gist_id}","starred_url":"https://api.github.com/users/jakataja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakataja/subscriptions","organizations_url":"https://api.github.com/users/jakataja/orgs","repos_url":"https://api.github.com/users/jakataja/repos","events_url":"https://api.github.com/users/jakataja/events{/privacy}","received_events_url":"https://api.github.com/users/jakataja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakataja/inherit-me","description":"","fork":false,"url":"https://api.github.com/repos/jakataja/inherit-me","forks_url":"https://api.github.com/repos/jakataja/inherit-me/forks","keys_url":"https://api.github.com/repos/jakataja/inherit-me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakataja/inherit-me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakataja/inherit-me/teams","hooks_url":"https://api.github.com/repos/jakataja/inherit-me/hooks","issue_events_url":"https://api.github.com/repos/jakataja/inherit-me/issues/events{/number}","events_url":"https://api.github.com/repos/jakataja/inherit-me/events","assignees_url":"https://api.github.com/repos/jakataja/inherit-me/assignees{/user}","branches_url":"https://api.github.com/repos/jakataja/inherit-me/branches{/branch}","tags_url":"https://api.github.com/repos/jakataja/inherit-me/tags","blobs_url":"https://api.github.com/repos/jakataja/inherit-me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakataja/inherit-me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakataja/inherit-me/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakataja/inherit-me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakataja/inherit-me/statuses/{sha}","languages_url":"https://api.github.com/repos/jakataja/inherit-me/languages","stargazers_url":"https://api.github.com/repos/jakataja/inherit-me/stargazers","contributors_url":"https://api.github.com/repos/jakataja/inherit-me/contributors","subscribers_url":"https://api.github.com/repos/jakataja/inherit-me/subscribers","subscription_url":"https://api.github.com/repos/jakataja/inherit-me/subscription","commits_url":"https://api.github.com/repos/jakataja/inherit-me/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakataja/inherit-me/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakataja/inherit-me/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakataja/inherit-me/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakataja/inherit-me/contents/{+path}","compare_url":"https://api.github.com/repos/jakataja/inherit-me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakataja/inherit-me/merges","archive_url":"https://api.github.com/repos/jakataja/inherit-me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakataja/inherit-me/downloads","issues_url":"https://api.github.com/repos/jakataja/inherit-me/issues{/number}","pulls_url":"https://api.github.com/repos/jakataja/inherit-me/pulls{/number}","milestones_url":"https://api.github.com/repos/jakataja/inherit-me/milestones{/number}","notifications_url":"https://api.github.com/repos/jakataja/inherit-me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakataja/inherit-me/labels{/name}","releases_url":"https://api.github.com/repos/jakataja/inherit-me/releases{/id}","deployments_url":"https://api.github.com/repos/jakataja/inherit-me/deployments","created_at":"2016-04-27T13:40:08Z","updated_at":"2016-04-27T13:40:08Z","pushed_at":"2016-05-11T15:15:26Z","git_url":"git://github.com/jakataja/inherit-me.git","ssh_url":"git@github.com:jakataja/inherit-me.git","clone_url":"https://github.com/jakataja/inherit-me.git","svn_url":"https://github.com/jakataja/inherit-me","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":null,"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":"jakataja:master","ref":"master","sha":"7d8f54450878fe8c7f5372f6a9be24228ce9ff0d","user":{"login":"jakataja","id":16820386,"avatar_url":"https://avatars.githubusercontent.com/u/16820386?v=3","gravatar_id":"","url":"https://api.github.com/users/jakataja","html_url":"https://github.com/jakataja","followers_url":"https://api.github.com/users/jakataja/followers","following_url":"https://api.github.com/users/jakataja/following{/other_user}","gists_url":"https://api.github.com/users/jakataja/gists{/gist_id}","starred_url":"https://api.github.com/users/jakataja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakataja/subscriptions","organizations_url":"https://api.github.com/users/jakataja/orgs","repos_url":"https://api.github.com/users/jakataja/repos","events_url":"https://api.github.com/users/jakataja/events{/privacy}","received_events_url":"https://api.github.com/users/jakataja/received_events","type":"User","site_admin":false},"repo":{"id":57216296,"name":"inherit-me","full_name":"jakataja/inherit-me","owner":{"login":"jakataja","id":16820386,"avatar_url":"https://avatars.githubusercontent.com/u/16820386?v=3","gravatar_id":"","url":"https://api.github.com/users/jakataja","html_url":"https://github.com/jakataja","followers_url":"https://api.github.com/users/jakataja/followers","following_url":"https://api.github.com/users/jakataja/following{/other_user}","gists_url":"https://api.github.com/users/jakataja/gists{/gist_id}","starred_url":"https://api.github.com/users/jakataja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakataja/subscriptions","organizations_url":"https://api.github.com/users/jakataja/orgs","repos_url":"https://api.github.com/users/jakataja/repos","events_url":"https://api.github.com/users/jakataja/events{/privacy}","received_events_url":"https://api.github.com/users/jakataja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakataja/inherit-me","description":"","fork":false,"url":"https://api.github.com/repos/jakataja/inherit-me","forks_url":"https://api.github.com/repos/jakataja/inherit-me/forks","keys_url":"https://api.github.com/repos/jakataja/inherit-me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakataja/inherit-me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakataja/inherit-me/teams","hooks_url":"https://api.github.com/repos/jakataja/inherit-me/hooks","issue_events_url":"https://api.github.com/repos/jakataja/inherit-me/issues/events{/number}","events_url":"https://api.github.com/repos/jakataja/inherit-me/events","assignees_url":"https://api.github.com/repos/jakataja/inherit-me/assignees{/user}","branches_url":"https://api.github.com/repos/jakataja/inherit-me/branches{/branch}","tags_url":"https://api.github.com/repos/jakataja/inherit-me/tags","blobs_url":"https://api.github.com/repos/jakataja/inherit-me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakataja/inherit-me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakataja/inherit-me/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakataja/inherit-me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakataja/inherit-me/statuses/{sha}","languages_url":"https://api.github.com/repos/jakataja/inherit-me/languages","stargazers_url":"https://api.github.com/repos/jakataja/inherit-me/stargazers","contributors_url":"https://api.github.com/repos/jakataja/inherit-me/contributors","subscribers_url":"https://api.github.com/repos/jakataja/inherit-me/subscribers","subscription_url":"https://api.github.com/repos/jakataja/inherit-me/subscription","commits_url":"https://api.github.com/repos/jakataja/inherit-me/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakataja/inherit-me/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakataja/inherit-me/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakataja/inherit-me/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakataja/inherit-me/contents/{+path}","compare_url":"https://api.github.com/repos/jakataja/inherit-me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakataja/inherit-me/merges","archive_url":"https://api.github.com/repos/jakataja/inherit-me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakataja/inherit-me/downloads","issues_url":"https://api.github.com/repos/jakataja/inherit-me/issues{/number}","pulls_url":"https://api.github.com/repos/jakataja/inherit-me/pulls{/number}","milestones_url":"https://api.github.com/repos/jakataja/inherit-me/milestones{/number}","notifications_url":"https://api.github.com/repos/jakataja/inherit-me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakataja/inherit-me/labels{/name}","releases_url":"https://api.github.com/repos/jakataja/inherit-me/releases{/id}","deployments_url":"https://api.github.com/repos/jakataja/inherit-me/deployments","created_at":"2016-04-27T13:40:08Z","updated_at":"2016-04-27T13:40:08Z","pushed_at":"2016-05-11T15:15:26Z","git_url":"git://github.com/jakataja/inherit-me.git","ssh_url":"git@github.com:jakataja/inherit-me.git","clone_url":"https://github.com/jakataja/inherit-me.git","svn_url":"https://github.com/jakataja/inherit-me","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":null,"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/jakataja/inherit-me/pulls/1"},"html":{"href":"https://github.com/jakataja/inherit-me/pull/1"},"issue":{"href":"https://api.github.com/repos/jakataja/inherit-me/issues/1"},"comments":{"href":"https://api.github.com/repos/jakataja/inherit-me/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jakataja/inherit-me/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jakataja/inherit-me/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jakataja/inherit-me/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jakataja/inherit-me/statuses/db20483ae0f8c6776231cbb9af4da76c7c9bc3c9"}}}}