aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/body-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-28 14:08:06 -0700
committerValerio Virgillito2012-06-28 14:08:06 -0700
commit3ba9accb8e1887bfd6f1f912b6135073a3d9c70c (patch)
tree82984e11a4103265674bb27161a3f76023f9caae /js/controllers/elements/body-controller.js
parent56d6311f398e04eee3883a5c848fec3b2b53c981 (diff)
parentc1a3bfcc53e4526d5bb54687ba18ccaaefa96fc2 (diff)
downloadninja-3ba9accb8e1887bfd6f1f912b6135073a3d9c70c.tar.gz
Merge pull request #349 from joseeight/Color
Color
Diffstat (limited to 'js/controllers/elements/body-controller.js')
-rwxr-xr-xjs/controllers/elements/body-controller.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js
index 604b22d0..bc4d2e42 100755
--- a/js/controllers/elements/body-controller.js
+++ b/js/controllers/elements/body-controller.js
@@ -39,6 +39,8 @@ exports.BodyController = Montage.create(ElementController, {
39 value: function(el, p) { 39 value: function(el, p) {
40 switch(p) { 40 switch(p) {
41 case "background" : 41 case "background" :
42 case "background-image":
43 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-image"));
42 case "background-color": 44 case "background-color":
43 if(this.application.ninja.currentDocument.model.views.design._template) { 45 if(this.application.ninja.currentDocument.model.views.design._template) {
44 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el.parentNode, "background-color")); 46 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el.parentNode, "background-color"));
@@ -62,6 +64,9 @@ exports.BodyController = Montage.create(ElementController, {
62 value: function(el, p, value) { 64 value: function(el, p, value) {
63 switch(p) { 65 switch(p) {
64 case "background": 66 case "background":
67 case "background-image":
68 this.application.ninja.stylesController.setElementStyle(el, "background-image", value);
69 break;
65 case "background-color": 70 case "background-color":
66 if(this.application.ninja.currentDocument.model.views.design._template) { 71 if(this.application.ninja.currentDocument.model.views.design._template) {
67 this.application.ninja.stylesController.setElementStyle(el.parentNode, "background-color", value); 72 this.application.ninja.stylesController.setElementStyle(el.parentNode, "background-color", value);