diff options
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorView.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/EditorView.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js index 7cabeb7..1093c76 100644 --- a/public/assets/javascripts/ui/editor/EditorView.js +++ b/public/assets/javascripts/ui/editor/EditorView.js @@ -2,7 +2,8 @@ var EditorView = View.extend({ el: "#editorView", - action: "/api/layouts/", + projecttAction: "/api/projects/", + layoutAction: "/api/layouts/", events: { }, @@ -10,25 +11,21 @@ var EditorView = View.extend({ initialize: function(){ this.toolbar = new EditorToolbar ({ parent: this }) this.settings = new EditorSettings ({ parent: this }) + this.mediaViewer = new MediaViewer ({ parent: this }) + this.mediaUpload = new MediaUpload ({ parent: this }) }, 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)) + loadLayout: function(layout){ + layout = sanitize(layout) + $.get(this.layoutAction + layout, $.proxy(this.ready, this)) }, ready: function(data){ $("#map").hide() - this.settings.load(data) + this.settings.loadLayout(data) }, }) |
