diff options
| author | ryderr <r@okfoc.us> | 2014-10-16 10:43:17 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-10-16 10:43:17 -0400 |
| commit | 5f91a568db7f69489851c373e54cf911d29e3054 (patch) | |
| tree | 3b92d3a0782353fefa8967c78762d324913df730 /public/assets/javascripts/ui/editor/EditorSettings.js | |
| parent | 20f37d08394df097db45e0092e4420f31b5be161 (diff) | |
| parent | 1a15b32d8cc8fcf27861f94151ca63eb6d8736c2 (diff) | |
merge
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorSettings.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/EditorSettings.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js index ac361a7..240f713 100644 --- a/public/assets/javascripts/ui/editor/EditorSettings.js +++ b/public/assets/javascripts/ui/editor/EditorSettings.js @@ -45,10 +45,10 @@ var EditorSettings = FormView.extend({ } if (data.colors && data.colors.wall) { - this.parent.lightControl.load(data.colors) + this.parent.colorControl.load(data.colors) } else { - this.parent.lightControl.loadDefaults() + this.parent.colorControl.loadDefaults() } if (data.walls) { @@ -81,7 +81,9 @@ var EditorSettings = FormView.extend({ this.parent.collaborators.show() }, - clone: function(){ + clone: function(e){ + e.preventDefault() + var names = this.$name.val().split(" ") if ( ! isNaN(Number( names[names.length-1] )) ) { names[names.length-1] = Number( names[names.length-1] ) + 1 @@ -93,11 +95,14 @@ var EditorSettings = FormView.extend({ this.$id.val('new') this.$name.val( names.join(" ") ) this.action = this.createAction + this.thumbnailState = null - window.history.pushState(null, document.title, "/builder/new") + window.history.pushState(null, document.title, "/project/new") }, - clear: function(){ + clear: function(e){ + e.preventDefault() + Scenery.removeAll() }, @@ -121,6 +126,9 @@ var EditorSettings = FormView.extend({ $(".inuse").removeClass("inuse") $("[data-role='toggle-project-settings']").toggleClass("inuse", state) + if (state) { + this.parent.cursor.message("settings") + } }, enterSubmit: function (e) { |
