diff options
| -rw-r--r-- | public/assets/javascripts/ui/site/LayoutsModal.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/public/assets/javascripts/ui/site/LayoutsModal.js b/public/assets/javascripts/ui/site/LayoutsModal.js index 73c63e8..5974fc3 100644 --- a/public/assets/javascripts/ui/site/LayoutsModal.js +++ b/public/assets/javascripts/ui/site/LayoutsModal.js @@ -48,7 +48,6 @@ var ProjectsModal = ModalView.extend(LayoutsIndex.prototype).extend({ events: { "click .templates span": 'toggleActive', - "click [data-role='create-new-layout']": 'createNewLayout', "submit form": 'newProject', }, @@ -71,10 +70,6 @@ var ProjectsModal = ModalView.extend(LayoutsIndex.prototype).extend({ window.location.pathname = "/project/" + $layout.data("slug") + "/edit" }, - createNewLayout: function(){ - window.location.pathname = "/layout/new" - }, - newProject: function(e){ e && e.preventDefault() window.location.pathname = "/project/new" @@ -117,6 +112,7 @@ var NewProjectModal = ModalView.extend(LayoutsIndex.prototype).extend({ action: "/api/layout", events: { + "click [data-role='create-new-layout']": 'createNewLayout', "click .templates span": 'choose', "submit form": 'choose', }, @@ -133,6 +129,10 @@ var NewProjectModal = ModalView.extend(LayoutsIndex.prototype).extend({ var layout = $(e.currentTarget).data("slug") if (! layout || ! layout.length) return window.location.pathname = "/project/new/" + layout - } + }, + + createNewLayout: function(){ + window.location.pathname = "/project/new/empty" + }, }) |
