aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-18 17:12:53 -0700
committerNivesh Rajbhandari2012-05-18 17:12:53 -0700
commit8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50 (patch)
tree345d582d72c2064e6e4ebbd23cbb7bb6c81e96df /js/controllers
parentca70f18a62a2a2b5670be132361e3a3f5907d920 (diff)
parente7c288fe8f5d3a9e5c9f0eb0a045c6c195a0e7b8 (diff)
downloadninja-8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50.tar.gz
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js17
-rwxr-xr-xjs/controllers/elements/body-controller.js2
2 files changed, 11 insertions, 8 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index f1523d87..f6b850b2 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -145,18 +145,19 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
145 value: function(event) { 145 value: function(event) {
146 // 146 //
147 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 147 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
148 // 148 //Currently we don't need a callback handler
149 this.activeDocument.model.save(this.testCallback.bind(this)); //this.fileSaveResult.bind(this) 149 //this.activeDocument.model.save(this.saveExecuted.bind(this));
150 this.activeDocument.model.save();
150 } else { 151 } else {
151 //Error: 152 //Error: cloud not available and/or no active document
152 } 153 }
153 } 154 }
154 }, 155 },
155 testCallback: { 156 ////////////////////////////////////////////////////////////////////
157 //
158 saveExecuted: {
156 value: function (value) { 159 value: function (value) {
157 console.log(value); 160 //File saved, any callbacks or events should go here
158 //TODO: Move this to the model.save()
159 this.activeDocument.model.needsSave = false;
160 } 161 }
161 }, 162 },
162 //////////////////////////////////////////////////////////////////// 163 ////////////////////////////////////////////////////////////////////
@@ -489,6 +490,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
489 if(currentDocument) { 490 if(currentDocument) {
490 currentDocument.serializeDocument(); 491 currentDocument.serializeDocument();
491 492
493 this.application.ninja.selectionController._selectionContainer = null;
494 currentDocument.model.views.design.propertiesPanel.clear();
492 currentDocument.model.views.design.hide(); 495 currentDocument.model.views.design.hide();
493 } 496 }
494 497
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, {
30 value: function(el, p) { 30 value: function(el, p) {
31 switch(p) { 31 switch(p) {
32 case "background" : 32 case "background" :
33 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", true, true)); 33 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true));
34 case "border": 34 case "border":
35 return 0; 35 return 0;
36 case "height": 36 case "height":