diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 5e2a6461..df3c74f8 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -59,10 +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 | 61 | ||
62 | this.eventManager.addEventListener("recordStyleChanged", this, false); | 62 | this.eventManager.addEventListener("recordStyleChanged", this, false); |
63 | |||
64 | |||
65 | |||
66 | } | 63 | } |
67 | }, | 64 | }, |
68 | 65 | ||
@@ -119,8 +116,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
119 | //TODO: Check for appropiate structures | 116 | //TODO: Check for appropiate structures |
120 | handleExecuteSave: { | 117 | handleExecuteSave: { |
121 | value: function(event) { | 118 | value: function(event) { |
122 | //Text and HTML document classes should return the same save object for fileSave | 119 | if(!!this.activeDocument){ |
123 | this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); | 120 | //Text and HTML document classes should return the same save object for fileSave |
121 | this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); | ||
122 | } | ||
124 | } | 123 | } |
125 | }, | 124 | }, |
126 | //////////////////////////////////////////////////////////////////// | 125 | //////////////////////////////////////////////////////////////////// |
@@ -460,5 +459,5 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
460 | value: function() { | 459 | value: function() { |
461 | return "userDocument_" + (this._iframeCounter++); | 460 | return "userDocument_" + (this._iframeCounter++); |
462 | } | 461 | } |
463 | } | 462 | } |
464 | }); | 463 | }); |