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.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js
index e9239e4..e5dd844 100644
--- a/public/assets/javascripts/ui/editor/EditorSettings.js
+++ b/public/assets/javascripts/ui/editor/EditorSettings.js
@@ -9,6 +9,7 @@ var EditorSettings = FormView.extend({
events: {
"keydown": 'stopPropagation',
"keydown [name=name]": 'enterSubmit',
+ "click [data-role='show-collaborators']": 'showCollaborators',
"click [data-role='save-project']": 'save',
"click [data-role='clone-project']": 'clone',
"click [data-role='clear-project']": 'clear',
@@ -28,7 +29,8 @@ var EditorSettings = FormView.extend({
load: function(data){
this.action = data.isNew ? this.createAction : this.updateAction
-
+ this.parent.data = data
+
data.rooms && Rooms.deserialize(data.rooms)
data.startPosition && scene.camera.move(data.startPosition)
@@ -36,7 +38,6 @@ var EditorSettings = FormView.extend({
this.$name.val( "Room " + moment().format("DD/MM/YYYY ha") )
}
else {
- // console.log(data)
this.thumbnailIsStale()
this.$id.val( data._id )
@@ -48,6 +49,11 @@ var EditorSettings = FormView.extend({
}
},
+ showCollaborators: function(e){
+ e && e.preventDefault()
+ this.parent.collaborators.show()
+ },
+
clone: function(){
var names = this.$name.val().split(" ")
if ( ! isNaN(Number( names[names.length-1] )) ) {
@@ -152,6 +158,8 @@ var EditorSettings = FormView.extend({
Minotaur.hide()
window.history.pushState(null, document.title, "/project/" + data.slug + "/edit")
+
+ this.parent.data = data
},
})