summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-06-12 14:52:34 -0400
committerJules Laplace <jules@okfoc.us>2014-06-12 14:52:34 -0400
commit5a215e1b00e4fd026a83e81baa7a45c28435f73c (patch)
tree6f4cbfab683b03e546951d526a0127dce012a7d9 /public/assets/javascripts/ui/editor/EditorView.js
parent2525d1c20120ecb5224c9896a2e1acd77385cbc4 (diff)
routes for starting a new project
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorView.js')
-rw-r--r--public/assets/javascripts/ui/editor/EditorView.js28
1 files changed, 25 insertions, 3 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js
index 91329de..7cabeb7 100644
--- a/public/assets/javascripts/ui/editor/EditorView.js
+++ b/public/assets/javascripts/ui/editor/EditorView.js
@@ -1,13 +1,35 @@
var EditorView = View.extend({
-// el: "#editorControls",
+ el: "#editorView",
+
+ action: "/api/layouts/",
events: {
},
+
+ initialize: function(){
+ this.toolbar = new EditorToolbar ({ parent: this })
+ this.settings = new EditorSettings ({ parent: this })
+ },
- load: function(){
+ load: function(name){
+ },
+
+ loadLayout: function(name){
+ if (! name || name == "new") {
+ this.ready({ isNew: true, _id: "new", name: "" })
+ return
+ }
+
+ name = sanitize(name)
+
+ $.get(this.action + name, $.proxy(this.ready, this))
+ },
+
+ ready: function(data){
$("#map").hide()
- }
+ this.settings.load(data)
+ },
})