summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorView.js
diff options
context:
space:
mode:
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)
+ },
})