aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 84b994ce..7d38c600 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -104,16 +104,26 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
104 handleExecuteSave: { 104 handleExecuteSave: {
105 value: function(event) { 105 value: function(event) {
106 //Text and HTML document classes should return the same save object for fileSave 106 //Text and HTML document classes should return the same save object for fileSave
107 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.clearDocumentDirtyFlag.bind(this)); 107 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this));
108 } 108 }
109 }, 109 },
110 110 ////////////////////////////////////////////////////////////////////
111 //
112 fileSaveResult: {
113 value: function (result) {
114 if(result.status === 204){
115 this.clearDocumentDirtyFlag();
116 }
117 }
118 },
119 ////////////////////////////////////////////////////////////////////
120
121
111 clearDocumentDirtyFlag:{ 122 clearDocumentDirtyFlag:{
112 value: function(){ 123 value: function(){
113 this.activeDocument.dirtyFlag = false; 124 this.activeDocument.dirtyFlag = false;
114 } 125 }
115 }, 126 },
116 ////////////////////////////////////////////////////////////////////
117 127
118 128
119 createNewFile:{ 129 createNewFile:{