From d878aa470074d5698a316512b513949fa22073f2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 18 May 2012 15:23:15 -0700 Subject: Fixing save logic Moved dirty marker clearing code to model. --- js/controllers/document-controller.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index f1523d87..cf618360 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -145,18 +145,19 @@ var DocumentController = exports.DocumentController = Montage.create(Component, value: function(event) { // if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ - // - this.activeDocument.model.save(this.testCallback.bind(this)); //this.fileSaveResult.bind(this) + //Currently we don't need a callback handler + //this.activeDocument.model.save(this.saveExecuted.bind(this)); + this.activeDocument.model.save(); } else { - //Error: + //Error: cloud not available and/or no active document } } }, - testCallback: { + //////////////////////////////////////////////////////////////////// + // + saveExecuted: { value: function (value) { - console.log(value); - //TODO: Move this to the model.save() - this.activeDocument.model.needsSave = false; + //File saved, any callbacks or events should go here } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From fdfba499f0b84360b96096fa866a981e96e8756c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 18 May 2012 16:35:56 -0700 Subject: fixing the color chip for the document root Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 2 ++ js/controllers/elements/body-controller.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index f1523d87..7721d32d 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js @@ -489,6 +489,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component, if(currentDocument) { currentDocument.serializeDocument(); + this.application.ninja.selectionController._selectionContainer = null; + currentDocument.model.views.design.propertiesPanel.clear(); currentDocument.model.views.design.hide(); } diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 5c23dcf7..7a3a66f5 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -30,7 +30,7 @@ exports.BodyController = Montage.create(ElementController, { value: function(el, p) { switch(p) { case "background" : - return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", true, true)); + return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); case "border": return 0; case "height": -- cgit v1.2.3