summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/ui/editor')
-rw-r--r--public/assets/javascripts/ui/editor/EditorSettings.js10
-rw-r--r--public/assets/javascripts/ui/editor/EditorView.js4
2 files changed, 12 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js
index 2b29961..026607a 100644
--- a/public/assets/javascripts/ui/editor/EditorSettings.js
+++ b/public/assets/javascripts/ui/editor/EditorSettings.js
@@ -110,7 +110,6 @@ var EditorSettings = FormView.extend({
clear: function(e){
e.preventDefault()
-
Scenery.removeAll()
},
@@ -215,6 +214,7 @@ var EditorSettings = FormView.extend({
clickSave: function(){
this.toggle(false)
this.save()
+ this.isVisible = true
},
success: function(data){
@@ -226,7 +226,13 @@ var EditorSettings = FormView.extend({
Minotaur.hide()
window.history.pushState(null, document.title, "/project/" + data.slug + "/edit")
-
+
+ this.parent.share.setLink( "http://vvalls.com/project/" + data.slug )
+ if (this.isVisible) {
+ this.isVisible = false
+ this.parent.share.show()
+ }
+
this.parent.data = data
},
diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js
index 2872ab9..3773366 100644
--- a/public/assets/javascripts/ui/editor/EditorView.js
+++ b/public/assets/javascripts/ui/editor/EditorView.js
@@ -21,6 +21,7 @@ var EditorView = View.extend({
this.textEditor = new TextEditor ({ parent: this })
this.collaborators = new Collaborators ({ parent: this })
this.presets = new Presets ({ parent: this })
+ this.share = new ShareView ({ parent: this })
},
load: function(name){
@@ -41,6 +42,8 @@ var EditorView = View.extend({
ready: function(data){
$("#map").hide()
+ this.data = data
+
this.settings.load(data)
this.info.load(data)
},
@@ -70,6 +73,7 @@ var EditorView = View.extend({
hideExtras: function(){
this.mediaEditor.hide()
this.textEditor.hide()
+ this.share.hide()
Scenery.resize.hide()
Scenery.hovering = false
}