From b1daf0b285a4a96bfd0086709c20e3682d75551a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 21 Feb 2012 14:32:17 -0800 Subject: fixing the dirty flag and removing sass changes Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'js/controllers/document-controller.js') 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, fileSaveResult: { value: function (result) { if(result.status === 204){ - this.clearDocumentDirtyFlag(); + this.activeDocument.needsSave = false; } } }, - //////////////////////////////////////////////////////////////////// - - - clearDocumentDirtyFlag:{ - value: function(){ - this.activeDocument.dirtyFlag = false; - } - }, - - + createNewFile:{ value:function(newFileObj){ //console.log(newFileObj);//contains the template uri and the new file uri @@ -282,7 +273,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, closeDocument: { value: function(id) { - if(this.activeDocument.dirtyFlag === true){ + if(this.activeDocument.needsSave === true){ //if file dirty then alert user to save } -- cgit v1.2.3