aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-14 11:45:57 -0800
committerJose Antonio Marquez2012-02-14 11:45:57 -0800
commit646b269da2387582531258d14a3f2ff550617323 (patch)
tree41e3ac0983aeae883fae0bd1165de7b66de83650 /js/controllers
parenta956f7919cf43424c2675cce24c5637f9064dcb3 (diff)
downloadninja-646b269da2387582531258d14a3f2ff550617323.tar.gz
Cleaning up mediator
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:{