diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 11 |
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 || {}; |