aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-05 14:07:06 -0700
committerValerio Virgillito2012-06-05 14:07:06 -0700
commit6372f7acc7e1d9fd6aa93e4afd476ac882a34ecd (patch)
treebde8fdf10ca51be66f58239b52b7232f763f5958 /js/controllers
parentfae2c19f64a00098fe42da5e9c6cb7cdcc8c8721 (diff)
downloadninja-6372f7acc7e1d9fd6aa93e4afd476ac882a34ecd.tar.gz
fixing the save as
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js12
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 }