summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-07-17 12:18:45 -0400
committerJules Laplace <jules@okfoc.us>2014-07-17 12:18:45 -0400
commit4ee827ad464dfa0edb664d27e5069811877deb1e (patch)
tree69c6ecb890a6af7f6c247c74f81bc36db591e970 /public/assets/javascripts/ui/editor/EditorView.js
parentb97f3d39ac0e387385aae2685dbe830ee53a686c (diff)
parentf20841988ccd27780d3801e4a6c32bf9afcc9368 (diff)
merge
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorView.js')
-rw-r--r--public/assets/javascripts/ui/editor/EditorView.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js
index b87ac83..4067c4d 100644
--- a/public/assets/javascripts/ui/editor/EditorView.js
+++ b/public/assets/javascripts/ui/editor/EditorView.js
@@ -2,8 +2,8 @@
var EditorView = View.extend({
el: "#editorView",
- projectAction: "/api/projects/",
- layoutAction: "/api/layouts/",
+ projectAction: "/api/project/",
+ layoutAction: "/api/layout/",
events: {
},
@@ -13,18 +13,19 @@ var EditorView = View.extend({
this.settings = new EditorSettings ({ parent: this })
this.mediaViewer = new MediaViewer ({ parent: this })
this.mediaUpload = new MediaUpload ({ parent: this })
+ this.mediaEditor = new MediaEditor ({ parent: this })
this.wallpaperPicker = new WallpaperPicker ({ parent: this })
this.lightControl = new LightControl ({ parent: this })
},
load: function(name){
name = sanitize(name)
- $.get(this.projectAction + name, $.proxy(this.ready, this))
+ $.get(this.projectAction + name, this.ready.bind(this))
},
loadLayout: function(layout){
layout = sanitize(layout)
- $.get(this.layoutAction + layout, $.proxy(this.readyLayout, this))
+ $.get(this.layoutAction + layout, this.readyLayout.bind(this))
},
ready: function(data){
@@ -36,7 +37,14 @@ var EditorView = View.extend({
readyLayout: function(data){
data.isNew = true
this.ready(data)
+ },
+
+ pick: function(scenery){
+ this.mediaEditor.pick(scenery)
+ },
+
+ hideExtras: function(){
+ this.mediaEditor.hide()
}
})
-