aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-22 22:47:25 -0800
committerJose Antonio Marquez2012-02-22 22:47:25 -0800
commit593b2c954cf507bcb61d27f18d63b1406e7364c4 (patch)
tree67590154bd4ec92f4bca1c5c87a04cfffff23a09 /js/controllers
parent3524a22fa0745bb223ab6bcc312ca970a001157f (diff)
downloadninja-593b2c954cf507bcb61d27f18d63b1406e7364c4.tar.gz
Cleaning up and commenting CSS IO
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 48e33267..a6f600cc 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -59,6 +59,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
59 this.eventManager.addEventListener("executeNewFile", this, false); 59 this.eventManager.addEventListener("executeNewFile", this, false);
60 this.eventManager.addEventListener("executeSave", this, false); 60 this.eventManager.addEventListener("executeSave", this, false);
61 this.eventManager.addEventListener("executeSaveAs", this, false); 61 this.eventManager.addEventListener("executeSaveAs", this, false);
62 this.eventManager.addEventListener("executeSaveAll", this, false);
62 63
63 this.eventManager.addEventListener("recordStyleChanged", this, false); 64 this.eventManager.addEventListener("recordStyleChanged", this, false);
64 65
@@ -130,6 +131,16 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
130 } 131 }
131 }, 132 },
132 //////////////////////////////////////////////////////////////////// 133 ////////////////////////////////////////////////////////////////////
134 //TODO: Check for appropiate structures
135 handleExecuteSaveAll: {
136 value: function(event) {
137 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
138 //Text and HTML document classes should return the same save object for fileSave
139 this.application.ninja.ioMediator.fileSave(this.activeDocument.saveAll(), this.fileSaveResult.bind(this));
140 }
141 }
142 },
143 ////////////////////////////////////////////////////////////////////
133 handleExecuteSaveAs: { 144 handleExecuteSaveAs: {
134 value: function(event) { 145 value: function(event) {
135 var saveAsSettings = event._event.settings || {}; 146 var saveAsSettings = event._event.settings || {};