{"action":"created","comment":{"url":"https://api.github.com/repos/nymag/clay-kiln/pulls/comments/60611600","id":60611600,"diff_hunk":"@@ -0,0 +1,30 @@\n+var edit = require('../services/edit'),\n+  dom = require('../services/dom'),\n+  progress = require('../services/progress');\n+\n+module.exports = function () {\n+  function constructor(el) {\n+    this.el = el;\n+    this.form = dom.find(el, '.select-page-type');\n+  }\n+\n+  constructor.prototype = {\n+    events: {\n+      '.create-article-page click': 'onNewArticle'\n+    },\n+\n+    onNewArticle: function (e) {\n+      e.preventDefault();\n+\n+      return edit.createPage()\n+        .then(function (url) {\n+          location.href = url;\n+        })","path":"controllers/pane-new-page.js","position":22,"original_position":22,"commit_id":"18013ef6f7f498a53aef0ce7e3f0f2c38cc078f9","original_commit_id":"73d8e509fcea3d350bfd8c8df7b63495db9f2a03","user":{"login":"cruzanmo","id":22883,"avatar_url":"https://avatars.githubusercontent.com/u/22883?v=3","gravatar_id":"","url":"https://api.github.com/users/cruzanmo","html_url":"https://github.com/cruzanmo","followers_url":"https://api.github.com/users/cruzanmo/followers","following_url":"https://api.github.com/users/cruzanmo/following{/other_user}","gists_url":"https://api.github.com/users/cruzanmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cruzanmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruzanmo/subscriptions","organizations_url":"https://api.github.com/users/cruzanmo/orgs","repos_url":"https://api.github.com/users/cruzanmo/repos","events_url":"https://api.github.com/users/cruzanmo/events{/privacy}","received_events_url":"https://api.github.com/users/cruzanmo/received_events","type":"User","site_admin":false},"body":"ok, fine. if you are looking for a trickier way:\r\n```\r\nedit.createPage()\r\n  .then(_.partial(_.set, window.location, 'href'))\r\n```","created_at":"2016-04-21T16:18:54Z","updated_at":"2016-04-21T16:18:54Z","html_url":"https://github.com/nymag/clay-kiln/pull/433#discussion_r60611600","pull_request_url":"https://api.github.com/repos/nymag/clay-kiln/pulls/433","_links":{"self":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/comments/60611600"},"html":{"href":"https://github.com/nymag/clay-kiln/pull/433#discussion_r60611600"},"pull_request":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/433"}}},"pull_request":{"url":"https://api.github.com/repos/nymag/clay-kiln/pulls/433","id":67244889,"html_url":"https://github.com/nymag/clay-kiln/pull/433","diff_url":"https://github.com/nymag/clay-kiln/pull/433.diff","patch_url":"https://github.com/nymag/clay-kiln/pull/433.patch","issue_url":"https://api.github.com/repos/nymag/clay-kiln/issues/433","number":433,"state":"open","locked":false,"title":"New page type selector","user":{"login":"davidandrewfrey","id":4967321,"avatar_url":"https://avatars.githubusercontent.com/u/4967321?v=3","gravatar_id":"","url":"https://api.github.com/users/davidandrewfrey","html_url":"https://github.com/davidandrewfrey","followers_url":"https://api.github.com/users/davidandrewfrey/followers","following_url":"https://api.github.com/users/davidandrewfrey/following{/other_user}","gists_url":"https://api.github.com/users/davidandrewfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/davidandrewfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidandrewfrey/subscriptions","organizations_url":"https://api.github.com/users/davidandrewfrey/orgs","repos_url":"https://api.github.com/users/davidandrewfrey/repos","events_url":"https://api.github.com/users/davidandrewfrey/events{/privacy}","received_events_url":"https://api.github.com/users/davidandrewfrey/received_events","type":"User","site_admin":false},"body":"Creates a pane to give writers options for creating pages of various types:\r\nhttps://trello.com/c/3OIIu04o/6-m-ability-to-select-a-layout-when-creating-a-new-page\r\n\r\nUpdated the way the panes are generated. Pane templates are located at the bottom of the template.nunjucks and then cloned and populated as needed.","created_at":"2016-04-20T19:32:36Z","updated_at":"2016-04-21T16:18:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ac00070732257d9a4591160dd6d495704c15b3f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nymag/clay-kiln/pulls/433/commits","review_comments_url":"https://api.github.com/repos/nymag/clay-kiln/pulls/433/comments","review_comment_url":"https://api.github.com/repos/nymag/clay-kiln/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nymag/clay-kiln/issues/433/comments","statuses_url":"https://api.github.com/repos/nymag/clay-kiln/statuses/18013ef6f7f498a53aef0ce7e3f0f2c38cc078f9","head":{"label":"nymag:new-page-type-selector","ref":"new-page-type-selector","sha":"18013ef6f7f498a53aef0ce7e3f0f2c38cc078f9","user":{"login":"nymag","id":1136688,"avatar_url":"https://avatars.githubusercontent.com/u/1136688?v=3","gravatar_id":"","url":"https://api.github.com/users/nymag","html_url":"https://github.com/nymag","followers_url":"https://api.github.com/users/nymag/followers","following_url":"https://api.github.com/users/nymag/following{/other_user}","gists_url":"https://api.github.com/users/nymag/gists{/gist_id}","starred_url":"https://api.github.com/users/nymag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nymag/subscriptions","organizations_url":"https://api.github.com/users/nymag/orgs","repos_url":"https://api.github.com/users/nymag/repos","events_url":"https://api.github.com/users/nymag/events{/privacy}","received_events_url":"https://api.github.com/users/nymag/received_events","type":"Organization","site_admin":false},"repo":{"id":35441695,"name":"clay-kiln","full_name":"nymag/clay-kiln","owner":{"login":"nymag","id":1136688,"avatar_url":"https://avatars.githubusercontent.com/u/1136688?v=3","gravatar_id":"","url":"https://api.github.com/users/nymag","html_url":"https://github.com/nymag","followers_url":"https://api.github.com/users/nymag/followers","following_url":"https://api.github.com/users/nymag/following{/other_user}","gists_url":"https://api.github.com/users/nymag/gists{/gist_id}","starred_url":"https://api.github.com/users/nymag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nymag/subscriptions","organizations_url":"https://api.github.com/users/nymag/orgs","repos_url":"https://api.github.com/users/nymag/repos","events_url":"https://api.github.com/users/nymag/events{/privacy}","received_events_url":"https://api.github.com/users/nymag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nymag/clay-kiln","description":"Editing tools for Clay","fork":false,"url":"https://api.github.com/repos/nymag/clay-kiln","forks_url":"https://api.github.com/repos/nymag/clay-kiln/forks","keys_url":"https://api.github.com/repos/nymag/clay-kiln/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nymag/clay-kiln/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nymag/clay-kiln/teams","hooks_url":"https://api.github.com/repos/nymag/clay-kiln/hooks","issue_events_url":"https://api.github.com/repos/nymag/clay-kiln/issues/events{/number}","events_url":"https://api.github.com/repos/nymag/clay-kiln/events","assignees_url":"https://api.github.com/repos/nymag/clay-kiln/assignees{/user}","branches_url":"https://api.github.com/repos/nymag/clay-kiln/branches{/branch}","tags_url":"https://api.github.com/repos/nymag/clay-kiln/tags","blobs_url":"https://api.github.com/repos/nymag/clay-kiln/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nymag/clay-kiln/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nymag/clay-kiln/git/refs{/sha}","trees_url":"https://api.github.com/repos/nymag/clay-kiln/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nymag/clay-kiln/statuses/{sha}","languages_url":"https://api.github.com/repos/nymag/clay-kiln/languages","stargazers_url":"https://api.github.com/repos/nymag/clay-kiln/stargazers","contributors_url":"https://api.github.com/repos/nymag/clay-kiln/contributors","subscribers_url":"https://api.github.com/repos/nymag/clay-kiln/subscribers","subscription_url":"https://api.github.com/repos/nymag/clay-kiln/subscription","commits_url":"https://api.github.com/repos/nymag/clay-kiln/commits{/sha}","git_commits_url":"https://api.github.com/repos/nymag/clay-kiln/git/commits{/sha}","comments_url":"https://api.github.com/repos/nymag/clay-kiln/comments{/number}","issue_comment_url":"https://api.github.com/repos/nymag/clay-kiln/issues/comments{/number}","contents_url":"https://api.github.com/repos/nymag/clay-kiln/contents/{+path}","compare_url":"https://api.github.com/repos/nymag/clay-kiln/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nymag/clay-kiln/merges","archive_url":"https://api.github.com/repos/nymag/clay-kiln/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nymag/clay-kiln/downloads","issues_url":"https://api.github.com/repos/nymag/clay-kiln/issues{/number}","pulls_url":"https://api.github.com/repos/nymag/clay-kiln/pulls{/number}","milestones_url":"https://api.github.com/repos/nymag/clay-kiln/milestones{/number}","notifications_url":"https://api.github.com/repos/nymag/clay-kiln/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nymag/clay-kiln/labels{/name}","releases_url":"https://api.github.com/repos/nymag/clay-kiln/releases{/id}","deployments_url":"https://api.github.com/repos/nymag/clay-kiln/deployments","created_at":"2015-05-11T18:21:37Z","updated_at":"2016-04-06T22:32:22Z","pushed_at":"2016-04-21T01:46:02Z","git_url":"git://github.com/nymag/clay-kiln.git","ssh_url":"git@github.com:nymag/clay-kiln.git","clone_url":"https://github.com/nymag/clay-kiln.git","svn_url":"https://github.com/nymag/clay-kiln","homepage":"","size":1542,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":1,"default_branch":"master"}},"base":{"label":"nymag:master","ref":"master","sha":"bfd1f7169ebe023a7372d5bc2f6e8a911af916ca","user":{"login":"nymag","id":1136688,"avatar_url":"https://avatars.githubusercontent.com/u/1136688?v=3","gravatar_id":"","url":"https://api.github.com/users/nymag","html_url":"https://github.com/nymag","followers_url":"https://api.github.com/users/nymag/followers","following_url":"https://api.github.com/users/nymag/following{/other_user}","gists_url":"https://api.github.com/users/nymag/gists{/gist_id}","starred_url":"https://api.github.com/users/nymag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nymag/subscriptions","organizations_url":"https://api.github.com/users/nymag/orgs","repos_url":"https://api.github.com/users/nymag/repos","events_url":"https://api.github.com/users/nymag/events{/privacy}","received_events_url":"https://api.github.com/users/nymag/received_events","type":"Organization","site_admin":false},"repo":{"id":35441695,"name":"clay-kiln","full_name":"nymag/clay-kiln","owner":{"login":"nymag","id":1136688,"avatar_url":"https://avatars.githubusercontent.com/u/1136688?v=3","gravatar_id":"","url":"https://api.github.com/users/nymag","html_url":"https://github.com/nymag","followers_url":"https://api.github.com/users/nymag/followers","following_url":"https://api.github.com/users/nymag/following{/other_user}","gists_url":"https://api.github.com/users/nymag/gists{/gist_id}","starred_url":"https://api.github.com/users/nymag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nymag/subscriptions","organizations_url":"https://api.github.com/users/nymag/orgs","repos_url":"https://api.github.com/users/nymag/repos","events_url":"https://api.github.com/users/nymag/events{/privacy}","received_events_url":"https://api.github.com/users/nymag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nymag/clay-kiln","description":"Editing tools for Clay","fork":false,"url":"https://api.github.com/repos/nymag/clay-kiln","forks_url":"https://api.github.com/repos/nymag/clay-kiln/forks","keys_url":"https://api.github.com/repos/nymag/clay-kiln/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nymag/clay-kiln/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nymag/clay-kiln/teams","hooks_url":"https://api.github.com/repos/nymag/clay-kiln/hooks","issue_events_url":"https://api.github.com/repos/nymag/clay-kiln/issues/events{/number}","events_url":"https://api.github.com/repos/nymag/clay-kiln/events","assignees_url":"https://api.github.com/repos/nymag/clay-kiln/assignees{/user}","branches_url":"https://api.github.com/repos/nymag/clay-kiln/branches{/branch}","tags_url":"https://api.github.com/repos/nymag/clay-kiln/tags","blobs_url":"https://api.github.com/repos/nymag/clay-kiln/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nymag/clay-kiln/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nymag/clay-kiln/git/refs{/sha}","trees_url":"https://api.github.com/repos/nymag/clay-kiln/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nymag/clay-kiln/statuses/{sha}","languages_url":"https://api.github.com/repos/nymag/clay-kiln/languages","stargazers_url":"https://api.github.com/repos/nymag/clay-kiln/stargazers","contributors_url":"https://api.github.com/repos/nymag/clay-kiln/contributors","subscribers_url":"https://api.github.com/repos/nymag/clay-kiln/subscribers","subscription_url":"https://api.github.com/repos/nymag/clay-kiln/subscription","commits_url":"https://api.github.com/repos/nymag/clay-kiln/commits{/sha}","git_commits_url":"https://api.github.com/repos/nymag/clay-kiln/git/commits{/sha}","comments_url":"https://api.github.com/repos/nymag/clay-kiln/comments{/number}","issue_comment_url":"https://api.github.com/repos/nymag/clay-kiln/issues/comments{/number}","contents_url":"https://api.github.com/repos/nymag/clay-kiln/contents/{+path}","compare_url":"https://api.github.com/repos/nymag/clay-kiln/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nymag/clay-kiln/merges","archive_url":"https://api.github.com/repos/nymag/clay-kiln/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nymag/clay-kiln/downloads","issues_url":"https://api.github.com/repos/nymag/clay-kiln/issues{/number}","pulls_url":"https://api.github.com/repos/nymag/clay-kiln/pulls{/number}","milestones_url":"https://api.github.com/repos/nymag/clay-kiln/milestones{/number}","notifications_url":"https://api.github.com/repos/nymag/clay-kiln/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nymag/clay-kiln/labels{/name}","releases_url":"https://api.github.com/repos/nymag/clay-kiln/releases{/id}","deployments_url":"https://api.github.com/repos/nymag/clay-kiln/deployments","created_at":"2015-05-11T18:21:37Z","updated_at":"2016-04-06T22:32:22Z","pushed_at":"2016-04-21T01:46:02Z","git_url":"git://github.com/nymag/clay-kiln.git","ssh_url":"git@github.com:nymag/clay-kiln.git","clone_url":"https://github.com/nymag/clay-kiln.git","svn_url":"https://github.com/nymag/clay-kiln","homepage":"","size":1542,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/433"},"html":{"href":"https://github.com/nymag/clay-kiln/pull/433"},"issue":{"href":"https://api.github.com/repos/nymag/clay-kiln/issues/433"},"comments":{"href":"https://api.github.com/repos/nymag/clay-kiln/issues/433/comments"},"review_comments":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/433/comments"},"review_comment":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nymag/clay-kiln/pulls/433/commits"},"statuses":{"href":"https://api.github.com/repos/nymag/clay-kiln/statuses/18013ef6f7f498a53aef0ce7e3f0f2c38cc078f9"}}}}