aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-05 14:27:48 -0700
committerValerio Virgillito2012-06-05 14:27:48 -0700
commit783097854612a292ac1be18ff15d88343013f773 (patch)
treed2984383c555caaab963b0dec62c9270f98c2f4e /js/controllers/document-controller.js
parentfcf99196e6471960891635efbca1af66d5fe5523 (diff)
parent5bf88b70e5cfbc68f3d28e8ad412a98be8e55c11 (diff)
downloadninja-783097854612a292ac1be18ff15d88343013f773.tar.gz
Merge pull request #271 from mencio/element-model-fixes
fixing the save as
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js10
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