summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/site/LayoutsModal.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-10-10 20:56:38 -0400
committerJules Laplace <jules@okfoc.us>2014-10-10 20:56:38 -0400
commit031b75cdcaa994ad677f29e61932e4078ba96f4c (patch)
tree9530628301eb324f4860d0aa13f63038aba25662 /public/assets/javascripts/ui/site/LayoutsModal.js
parent4263bc016e828f7407b446e27bdf64d898758627 (diff)
hook up new template button which just loads an empty layout
Diffstat (limited to 'public/assets/javascripts/ui/site/LayoutsModal.js')
-rw-r--r--public/assets/javascripts/ui/site/LayoutsModal.js12
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"
+ },
})