diff options
author | Valerio Virgillito | 2012-06-05 14:27:20 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-05 14:27:20 -0700 |
commit | 5bf88b70e5cfbc68f3d28e8ad412a98be8e55c11 (patch) | |
tree | d2984383c555caaab963b0dec62c9270f98c2f4e | |
parent | 0d7ff08d74ab28247de8a84b84796c183aa47f0d (diff) | |
download | ninja-5bf88b70e5cfbc68f3d28e8ad412a98be8e55c11.tar.gz |
fixing the save as
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
-rwxr-xr-x | js/controllers/document-controller.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 4f2eff50..a3ebac24 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -291,19 +291,19 @@ exports.DocumentController = Montage.create(Component, { | |||
291 | value:function(saveAsDetails){ | 291 | value:function(saveAsDetails){ |
292 | var fileUri = null, filename = saveAsDetails.filename, destination = saveAsDetails.destination; | 292 | var fileUri = null, filename = saveAsDetails.filename, destination = saveAsDetails.destination; |
293 | //update document metadata | 293 | //update document metadata |
294 | this.activeDocument.name = ""+filename; | 294 | this.currentDocument.model.file.name = ""+filename; |
295 | //prepare new file uri | 295 | //prepare new file uri |
296 | if(destination && (destination.charAt(destination.length -1) !== "/")){ | 296 | if(destination && (destination.charAt(destination.length -1) !== "/")){ |
297 | destination = destination + "/"; | 297 | destination = destination + "/"; |
298 | } | 298 | } |
299 | fileUri = destination+filename; | 299 | fileUri = destination+filename; |
300 | 300 | ||
301 | this.activeDocument.uri = fileUri; | 301 | this.currentDocument.model.file.uri = fileUri; |
302 | //save a new file | 302 | //save a new file |
303 | //use the ioMediator.fileSaveAll when implemented | 303 | //use the ioMediator.fileSaveAll when implemented |
304 | this.activeDocument.model.file.name = filename; | 304 | this.currentDocument.model.file.name = filename; |
305 | this.activeDocument.model.file.uri = fileUri; | 305 | this.currentDocument.model.file.uri = fileUri; |
306 | this.activeDocument.model.save(); | 306 | this.currentDocument.model.save(); |
307 | } | 307 | } |
308 | }, | 308 | }, |
309 | 309 | ||