diff options
author | Valerio Virgillito | 2012-02-21 14:32:17 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-21 14:32:17 -0800 |
commit | b1daf0b285a4a96bfd0086709c20e3682d75551a (patch) | |
tree | c6e8bcf8b7c0639a1e52009c3d1a89c95d2a91d6 /js/controllers | |
parent | 10c5ca3b1ac764b611051dc590f3092f269b1bf6 (diff) | |
download | ninja-b1daf0b285a4a96bfd0086709c20e3682d75551a.tar.gz |
fixing the dirty flag and removing sass changes
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 9a063280..e0402219 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -131,20 +131,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
131 | fileSaveResult: { | 131 | fileSaveResult: { |
132 | value: function (result) { | 132 | value: function (result) { |
133 | if(result.status === 204){ | 133 | if(result.status === 204){ |
134 | this.clearDocumentDirtyFlag(); | 134 | this.activeDocument.needsSave = false; |
135 | } | 135 | } |
136 | } | 136 | } |
137 | }, | 137 | }, |
138 | //////////////////////////////////////////////////////////////////// | 138 | |
139 | |||
140 | |||
141 | clearDocumentDirtyFlag:{ | ||
142 | value: function(){ | ||
143 | this.activeDocument.dirtyFlag = false; | ||
144 | } | ||
145 | }, | ||
146 | |||
147 | |||
148 | createNewFile:{ | 139 | createNewFile:{ |
149 | value:function(newFileObj){ | 140 | value:function(newFileObj){ |
150 | //console.log(newFileObj);//contains the template uri and the new file uri | 141 | //console.log(newFileObj);//contains the template uri and the new file uri |
@@ -282,7 +273,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
282 | 273 | ||
283 | closeDocument: { | 274 | closeDocument: { |
284 | value: function(id) { | 275 | value: function(id) { |
285 | if(this.activeDocument.dirtyFlag === true){ | 276 | if(this.activeDocument.needsSave === true){ |
286 | //if file dirty then alert user to save | 277 | //if file dirty then alert user to save |
287 | } | 278 | } |
288 | 279 | ||