diff options
-rwxr-xr-x | js/controllers/document-controller.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index bb0041eb..4f2eff50 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -186,9 +186,9 @@ exports.DocumentController = Montage.create(Component, { | |||
186 | handleExecuteSaveAs: { | 186 | handleExecuteSaveAs: { |
187 | value: function(event) { | 187 | value: function(event) { |
188 | var saveAsSettings = event._event.settings || {}; | 188 | var saveAsSettings = event._event.settings || {}; |
189 | if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ | 189 | if((typeof this.currentDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ |
190 | saveAsSettings.fileName = this.activeDocument.model.file.name; | 190 | saveAsSettings.fileName = this.currentDocument.model.file.name; |
191 | saveAsSettings.folderUri = this.activeDocument.model.file.uri.substring(0, this.activeDocument.model.file.uri.lastIndexOf("/")); | 191 | saveAsSettings.folderUri = this.currentDocument.model.file.uri.substring(0, this.currentDocument.model.file.uri.lastIndexOf("/")); |
192 | saveAsSettings.callback = this.saveAsCallback.bind(this); | 192 | saveAsSettings.callback = this.saveAsCallback.bind(this); |
193 | this.application.ninja.newFileController.showSaveAsDialog(saveAsSettings); | 193 | this.application.ninja.newFileController.showSaveAsDialog(saveAsSettings); |
194 | } | 194 | } |
@@ -204,9 +204,9 @@ exports.DocumentController = Montage.create(Component, { | |||
204 | //TODO: Is this used, should be cleaned up | 204 | //TODO: Is this used, should be cleaned up |
205 | handleExecuteFileCloseAll:{ | 205 | handleExecuteFileCloseAll:{ |
206 | value: function(event) { | 206 | value: function(event) { |
207 | if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){ | 207 | if(this.currentDocument && this.application.ninja.coreIoApi.cloudAvailable()){ |
208 | while(this._documents.length > 0){ | 208 | while(this.currentDocument.length > 0){ |
209 | this.closeDocument(this._documents[this._documents.length -1].uuid); | 209 | this.closeDocument(this.currentDocument[this.currentDocument.length -1].uuid); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } |