From 5bf88b70e5cfbc68f3d28e8ad412a98be8e55c11 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 14:27:20 -0700 Subject: fixing the save as Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 10 +++++----- 1 file 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, { value:function(saveAsDetails){ var fileUri = null, filename = saveAsDetails.filename, destination = saveAsDetails.destination; //update document metadata - this.activeDocument.name = ""+filename; + this.currentDocument.model.file.name = ""+filename; //prepare new file uri if(destination && (destination.charAt(destination.length -1) !== "/")){ destination = destination + "/"; } fileUri = destination+filename; - this.activeDocument.uri = fileUri; + this.currentDocument.model.file.uri = fileUri; //save a new file //use the ioMediator.fileSaveAll when implemented - this.activeDocument.model.file.name = filename; - this.activeDocument.model.file.uri = fileUri; - this.activeDocument.model.save(); + this.currentDocument.model.file.name = filename; + this.currentDocument.model.file.uri = fileUri; + this.currentDocument.model.save(); } }, -- cgit v1.2.3