aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-18 17:12:53 -0700
committerNivesh Rajbhandari2012-05-18 17:12:53 -0700
commit8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50 (patch)
tree345d582d72c2064e6e4ebbd23cbb7bb6c81e96df /js/controllers/document-controller.js
parentca70f18a62a2a2b5670be132361e3a3f5907d920 (diff)
parente7c288fe8f5d3a9e5c9f0eb0a045c6c195a0e7b8 (diff)
downloadninja-8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50.tar.gz
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index f1523d87..f6b850b2 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -145,18 +145,19 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
145 value: function(event) { 145 value: function(event) {
146 // 146 //
147 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 147 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
148 // 148 //Currently we don't need a callback handler
149 this.activeDocument.model.save(this.testCallback.bind(this)); //this.fileSaveResult.bind(this) 149 //this.activeDocument.model.save(this.saveExecuted.bind(this));
150 this.activeDocument.model.save();
150 } else { 151 } else {
151 //Error: 152 //Error: cloud not available and/or no active document
152 } 153 }
153 } 154 }
154 }, 155 },
155 testCallback: { 156 ////////////////////////////////////////////////////////////////////
157 //
158 saveExecuted: {
156 value: function (value) { 159 value: function (value) {
157 console.log(value); 160 //File saved, any callbacks or events should go here
158 //TODO: Move this to the model.save()
159 this.activeDocument.model.needsSave = false;
160 } 161 }
161 }, 162 },
162 //////////////////////////////////////////////////////////////////// 163 ////////////////////////////////////////////////////////////////////
@@ -489,6 +490,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
489 if(currentDocument) { 490 if(currentDocument) {
490 currentDocument.serializeDocument(); 491 currentDocument.serializeDocument();
491 492
493 this.application.ninja.selectionController._selectionContainer = null;
494 currentDocument.model.views.design.propertiesPanel.clear();
492 currentDocument.model.views.design.hide(); 495 currentDocument.model.views.design.hide();
493 } 496 }
494 497