diff options
author | Valerio Virgillito | 2012-06-05 14:07:34 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-05 14:07:34 -0700 |
commit | 15b4986e96c19415cf6197b81c172735f97bfa7f (patch) | |
tree | bde8fdf10ca51be66f58239b52b7232f763f5958 /js | |
parent | fae2c19f64a00098fe42da5e9c6cb7cdcc8c8721 (diff) | |
parent | 6372f7acc7e1d9fd6aa93e4afd476ac882a34ecd (diff) | |
download | ninja-15b4986e96c19415cf6197b81c172735f97bfa7f.tar.gz |
Merge pull request #269 from mencio/save-as-fix
fixing the save as
Diffstat (limited to 'js')
-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 | } |