{"action":"created","comment":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/24388504","id":24388504,"diff_hunk":"@@ -41,78 +41,116 @@ openFarmModule.factory('guideService', ['$http',\n         pushToAlerts(response, code, alerts);\n       });\n     };\n+\n+    var calculateStartOfYear = function(){\n+      // calculate year start time based on user preference/location\n+      return moment('01 01', 'MM DD');\n+    };\n+\n+    var scaleSeasonsToDays = function(){\n+      // The domain is maxWidth of the seasons div. Probably could\n+      // be more flexible.\n+      // The range is # days in a year\n+\n+      var maxWidth;\n+\n+      maxWidth = $('.seasons').width();\n+\n+      var scale = {\n+        'range': maxWidth,\n+        'domain': moment.duration(1, 'year').asDays(),\n+      };\n+\n+      scale.convertPositionToWeek = function(position){\n+        intPosition = parseInt(position, 10);","path":"app/assets/javascripts/angular-libs/angular.openfarm.guides.js","position":25,"original_position":25,"commit_id":"3084db7e168fcee7732d3b6925dcc6c5cc5f55a5","original_commit_id":"3084db7e168fcee7732d3b6925dcc6c5cc5f55a5","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'intPosition' is not defined.","created_at":"2015-02-10T04:31:33Z","updated_at":"2015-02-10T04:31:33Z","html_url":"https://github.com/openfarmcc/OpenFarm/pull/490#discussion_r24388504","pull_request_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490","_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/24388504"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/490#discussion_r24388504"},"pull_request":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490"}}},"pull_request":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490","id":28629604,"html_url":"https://github.com/openfarmcc/OpenFarm/pull/490","diff_url":"https://github.com/openfarmcc/OpenFarm/pull/490.diff","patch_url":"https://github.com/openfarmcc/OpenFarm/pull/490.patch","issue_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/490","number":490,"state":"open","locked":false,"title":"Add timespan object, create modular CSS, add initial timeline","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"body":"This is part of a bigger change that will include the timespan object. I still have to link up the front-end and back-end here, so it's in progress. Just putting it out there for people to have a look at.\r\n\r\n# What's changed\r\n* Adding a timespan object, todo: mutations, actually creating them @RickCarlino would love to hear your thoughts about it. There's some chat on it in the #guide-creation channel on slack.\r\n* Adding the timeline manipulation functionality on the guide edit/new pages.\r\n* Refactoring some of the SCSS to be more modular, as suggested by @growdigital.\r\n* Added some tests\r\n\r\n# Todo:\r\n*[ ] Actually need to link the dragging on the front-end with the data that gets sent. ","created_at":"2015-02-04T11:01:40Z","updated_at":"2015-02-10T04:31:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8e79d101ff1b5c3a793264e3f9530c65530d270","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490/commits","review_comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490/comments","review_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/{number}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/490/comments","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/3084db7e168fcee7732d3b6925dcc6c5cc5f55a5","head":{"label":"simonv3:add-timeline","ref":"add-timeline","sha":"3084db7e168fcee7732d3b6925dcc6c5cc5f55a5","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"repo":{"id":21980604,"name":"OpenFarm","full_name":"simonv3/OpenFarm","owner":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simonv3/OpenFarm","description":"A free and open database for farming and gardening knowledge. Data will be crowdsourced and rated. Will feature advanced search of the plant database, responsive frontend, forum for community discussion on each entry, and an open API.","fork":true,"url":"https://api.github.com/repos/simonv3/OpenFarm","forks_url":"https://api.github.com/repos/simonv3/OpenFarm/forks","keys_url":"https://api.github.com/repos/simonv3/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonv3/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonv3/OpenFarm/teams","hooks_url":"https://api.github.com/repos/simonv3/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/simonv3/OpenFarm/events","assignees_url":"https://api.github.com/repos/simonv3/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/simonv3/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/simonv3/OpenFarm/tags","blobs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonv3/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonv3/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonv3/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/simonv3/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/simonv3/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/simonv3/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/simonv3/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/simonv3/OpenFarm/subscription","commits_url":"https://api.github.com/repos/simonv3/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonv3/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonv3/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/comments/{number}","contents_url":"https://api.github.com/repos/simonv3/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/simonv3/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonv3/OpenFarm/merges","archive_url":"https://api.github.com/repos/simonv3/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonv3/OpenFarm/downloads","issues_url":"https://api.github.com/repos/simonv3/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/simonv3/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/simonv3/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/simonv3/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonv3/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/simonv3/OpenFarm/releases{/id}","created_at":"2014-07-18T13:09:02Z","updated_at":"2015-02-06T10:54:44Z","pushed_at":"2015-02-10T04:31:25Z","git_url":"git://github.com/simonv3/OpenFarm.git","ssh_url":"git@github.com:simonv3/OpenFarm.git","clone_url":"https://github.com/simonv3/OpenFarm.git","svn_url":"https://github.com/simonv3/OpenFarm","homepage":"OpenFarm.cc","size":72895,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openfarmcc:master","ref":"master","sha":"67f284d07d469cb72d74aa3096595f59f0b87929","user":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"repo":{"id":13895958,"name":"OpenFarm","full_name":"openfarmcc/OpenFarm","owner":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfarmcc/OpenFarm","description":"A free and open database for farming and gardening knowledge. You can grow anything!","fork":false,"url":"https://api.github.com/repos/openfarmcc/OpenFarm","forks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/forks","keys_url":"https://api.github.com/repos/openfarmcc/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfarmcc/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfarmcc/OpenFarm/teams","hooks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/events","assignees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/openfarmcc/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/tags","blobs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/openfarmcc/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscription","commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/comments/{number}","contents_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/openfarmcc/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfarmcc/OpenFarm/merges","archive_url":"https://api.github.com/repos/openfarmcc/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfarmcc/OpenFarm/downloads","issues_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/openfarmcc/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/openfarmcc/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfarmcc/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/openfarmcc/OpenFarm/releases{/id}","created_at":"2013-10-27T04:46:37Z","updated_at":"2015-02-02T04:20:19Z","pushed_at":"2015-02-02T04:20:19Z","git_url":"git://github.com/openfarmcc/OpenFarm.git","ssh_url":"git@github.com:openfarmcc/OpenFarm.git","clone_url":"https://github.com/openfarmcc/OpenFarm.git","svn_url":"https://github.com/openfarmcc/OpenFarm","homepage":"https://OpenFarm.cc","size":74256,"stargazers_count":222,"watchers_count":222,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":40,"forks":57,"open_issues":40,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/490"},"issue":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/490"},"comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/490/comments"},"review_comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490/comments"},"review_comment":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/490/commits"},"statuses":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/3084db7e168fcee7732d3b6925dcc6c5cc5f55a5"}}}}