summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/EditorSettings.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorSettings.js')
-rw-r--r--public/assets/javascripts/ui/editor/EditorSettings.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js
index b9f4560..13a6f60 100644
--- a/public/assets/javascripts/ui/editor/EditorSettings.js
+++ b/public/assets/javascripts/ui/editor/EditorSettings.js
@@ -2,11 +2,12 @@
var EditorSettings = FormView.extend({
el: "#editorSettings",
- createAction: "/api/projects/new",
- updateAction: "/api/projects/edit",
- destroyAction: "/api/projects/destroy",
+ createAction: "/api/project/new",
+ updateAction: "/api/project/edit",
+ destroyAction: "/api/project/destroy",
events: {
+ "keydown": 'stopPropagation',
"keydown [name=name]": 'enterSubmit',
"click [data-role='save-project']": 'save',
"click [data-role='clone-project']": 'clone',
@@ -32,7 +33,7 @@ var EditorSettings = FormView.extend({
data.startPosition && scene.camera.move(data.startPosition)
if (! data.isNew) {
- console.log(data)
+ // console.log(data)
this.$id.val( data._id )
this.$name.val( data.name )
@@ -65,7 +66,7 @@ var EditorSettings = FormView.extend({
destroy: function(){
var msg = "Are you sure you want to delete the project " + sanitize(this.$name.val()) + "?"
- ConfirmModal.confirm(msg, $.proxy(function(){
+ ConfirmModal.confirm(msg, function(){
$.ajax({
url: this.destroyAction,
type: "delete",
@@ -74,7 +75,7 @@ var EditorSettings = FormView.extend({
window.location.href = "/project"
}
})
- }, this))
+ }.bind(this))
},
toggle: function(){