aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index cf96208f..17ae8cc3 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -166,23 +166,34 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
166 } 166 }
167 }, 167 },
168 //////////////////////////////////////////////////////////////////// 168 ////////////////////////////////////////////////////////////////////
169 //TODO: Check for appropiate structures 169 //
170 handleExecuteSave: { 170 handleExecuteSave: {
171 value: function(event) { 171 value: function(event) {
172 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 172 //
173 //Text and HTML document classes should return the same save object for fileSave 173 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
174 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); 174 //
175 } 175 this.activeDocument.model.save(this.testCallback.bind(this)); //this.fileSaveResult.bind(this)
176 } else {
177 //Error:
178 }
176 } 179 }
177 }, 180 },
181 testCallback: {
182 value: function (value) {
183 console.log(value);
184 }
185 },
178 //////////////////////////////////////////////////////////////////// 186 ////////////////////////////////////////////////////////////////////
179 //TODO: Check for appropiate structures 187 //TODO: Check for appropiate structures
180 handleExecuteSaveAll: { 188 handleExecuteSaveAll: {
181 value: function(event) { 189 value: function(event) {
182 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 190 //
183 //Text and HTML document classes should return the same save object for fileSave 191 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
184 this.application.ninja.ioMediator.fileSave(this.activeDocument.saveAll(), this.fileSaveResult.bind(this)); 192 //
185 } 193 this.activeDocument.model.saveAll(this.testCallback.bind(this)); //this.fileSaveResult.bind(this)
194 } else {
195 //Error:
196 }
186 } 197 }
187 }, 198 },
188 //////////////////////////////////////////////////////////////////// 199 ////////////////////////////////////////////////////////////////////