diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-12 17:19:11 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-12 17:19:11 -0400 |
| commit | e37702d371b459847a43f7c6f953dff31684d823 (patch) | |
| tree | 0592cdd1f7f92b3718a3f66ac7b4f4d1009915ef /public/assets/javascripts/ui/editor/EditorView.js | |
| parent | 036427dfe207249ca5d6260ae1f6e8006ff90dd9 (diff) | |
media viewer appears
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) }, }) |
