aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-31 10:34:59 -0700
committerValerio Virgillito2012-05-31 10:34:59 -0700
commitd04aa0b195826b3b3c70f68aa8aba1be9e30a648 (patch)
treefdc55a4785b975b11e6421362f86edae176dcdfa /js/controllers
parente1fe603a7c002073f8ac13623f8cc8dc43efb59d (diff)
downloadninja-d04aa0b195826b3b3c70f68aa8aba1be9e30a648.tar.gz
fixing the close and save
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index c9557a57..f85e2f97 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -150,10 +150,10 @@ exports.DocumentController = Montage.create(Component, {
150 handleExecuteSave: { 150 handleExecuteSave: {
151 value: function(event) { 151 value: function(event) {
152 // 152 //
153 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 153 if((typeof this.currentDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
154 //Currently we don't need a callback handler 154 //Currently we don't need a callback handler
155 //this.activeDocument.model.save(this.saveExecuted.bind(this)); 155 //this.activeDocument.model.save(this.saveExecuted.bind(this));
156 this.activeDocument.model.save(); 156 this.currentDocument.model.save();
157 } else { 157 } else {
158 //Error: cloud not available and/or no active document 158 //Error: cloud not available and/or no active document
159 } 159 }
@@ -194,16 +194,13 @@ exports.DocumentController = Montage.create(Component, {
194 //////////////////////////////////////////////////////////////////// 194 ////////////////////////////////////////////////////////////////////
195 handleExecuteFileClose:{ 195 handleExecuteFileClose:{
196 value: function(event) { 196 value: function(event) {
197 if (this.activeDocument) { 197 this.closeFile(this.currentDocument);
198 this.closeFile(this.activeDocument);
199 }
200 } 198 }
201 }, 199 },
202 //////////////////////////////////////////////////////////////////// 200 ////////////////////////////////////////////////////////////////////
203 //TODO: Is this used, should be cleaned up 201 //TODO: Is this used, should be cleaned up
204 handleExecuteFileCloseAll:{ 202 handleExecuteFileCloseAll:{
205 value: function(event) { 203 value: function(event) {
206 var i=0;//TODO: who is using this??
207 if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){ 204 if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){
208 while(this._documents.length > 0){ 205 while(this._documents.length > 0){
209 this.closeDocument(this._documents[this._documents.length -1].uuid); 206 this.closeDocument(this._documents[this._documents.length -1].uuid);