diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index c9557a57..f85e2f97 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -150,10 +150,10 @@ exports.DocumentController = Montage.create(Component, { | |||
150 | handleExecuteSave: { | 150 | handleExecuteSave: { |
151 | value: function(event) { | 151 | value: function(event) { |
152 | // | 152 | // |
153 | if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ | 153 | if((typeof this.currentDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ |
154 | //Currently we don't need a callback handler | 154 | //Currently we don't need a callback handler |
155 | //this.activeDocument.model.save(this.saveExecuted.bind(this)); | 155 | //this.activeDocument.model.save(this.saveExecuted.bind(this)); |
156 | this.activeDocument.model.save(); | 156 | this.currentDocument.model.save(); |
157 | } else { | 157 | } else { |
158 | //Error: cloud not available and/or no active document | 158 | //Error: cloud not available and/or no active document |
159 | } | 159 | } |
@@ -194,16 +194,13 @@ exports.DocumentController = Montage.create(Component, { | |||
194 | //////////////////////////////////////////////////////////////////// | 194 | //////////////////////////////////////////////////////////////////// |
195 | handleExecuteFileClose:{ | 195 | handleExecuteFileClose:{ |
196 | value: function(event) { | 196 | value: function(event) { |
197 | if (this.activeDocument) { | 197 | this.closeFile(this.currentDocument); |
198 | this.closeFile(this.activeDocument); | ||
199 | } | ||
200 | } | 198 | } |
201 | }, | 199 | }, |
202 | //////////////////////////////////////////////////////////////////// | 200 | //////////////////////////////////////////////////////////////////// |
203 | //TODO: Is this used, should be cleaned up | 201 | //TODO: Is this used, should be cleaned up |
204 | handleExecuteFileCloseAll:{ | 202 | handleExecuteFileCloseAll:{ |
205 | value: function(event) { | 203 | value: function(event) { |
206 | var i=0;//TODO: who is using this?? | ||
207 | if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){ | 204 | if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){ |
208 | while(this._documents.length > 0){ | 205 | while(this._documents.length > 0){ |
209 | this.closeDocument(this._documents[this._documents.length -1].uuid); | 206 | this.closeDocument(this._documents[this._documents.length -1].uuid); |