diff options
author | Valerio Virgillito | 2012-06-07 22:26:28 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-07 22:26:28 -0700 |
commit | d14249dd2d76e9eb8d14733c10393d36bd2ea8ee (patch) | |
tree | 5bd5147b1b130c81ca8be3dbc192a04038247062 | |
parent | a67e6e8783dcdfd3a3bbcff36dc086dded6c7656 (diff) | |
parent | 4a4a4498b0c55111ff49d1dc939fe22cbe31e975 (diff) | |
download | ninja-d14249dd2d76e9eb8d14733c10393d36bd2ea8ee.tar.gz |
Merge pull request #283 from mqg734/BodyPI
Body PI fixes.
-rwxr-xr-x | js/controllers/elements/body-controller.js | 2 | ||||
-rwxr-xr-x | js/controllers/styles-controller.js | 4 | ||||
-rwxr-xr-x | js/models/element-model.js | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index a2aa041f..0dc11b82 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js | |||
@@ -31,7 +31,7 @@ exports.BodyController = Montage.create(ElementController, { | |||
31 | switch(p) { | 31 | switch(p) { |
32 | case "background" : | 32 | case "background" : |
33 | case "background-color": | 33 | case "background-color": |
34 | return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); | 34 | return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); |
35 | case "border": | 35 | case "border": |
36 | return 0; | 36 | return 0; |
37 | case "height": | 37 | case "height": |
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 83722184..a25a05df 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -154,6 +154,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
154 | styles['-webkit-transform-style'] = 'preserve-3d'; | 154 | styles['-webkit-transform-style'] = 'preserve-3d'; |
155 | needsRule = true; | 155 | needsRule = true; |
156 | } | 156 | } |
157 | if(this.getElementStyle(this.currentDocument.model.documentRoot, "background-color", false, false) == null) { | ||
158 | styles['background-color'] = "transparent"; | ||
159 | needsRule = true; | ||
160 | } | ||
157 | 161 | ||
158 | if(needsRule) { | 162 | if(needsRule) { |
159 | rule = this.addRule('.ninja-body{}'); | 163 | rule = this.addRule('.ninja-body{}'); |
diff --git a/js/models/element-model.js b/js/models/element-model.js index c9fb58d8..76f15b21 100755 --- a/js/models/element-model.js +++ b/js/models/element-model.js | |||
@@ -49,6 +49,12 @@ var getInfoForElement = function(el) { | |||
49 | isShape = true; | 49 | isShape = true; |
50 | } | 50 | } |
51 | 51 | ||
52 | if(el.nodeName.toLowerCase() === "ninja-content") { | ||
53 | elementName = "body"; | ||
54 | controller = elementNameToController(elementName); | ||
55 | pi = elementNameToPi(elementName); | ||
56 | } | ||
57 | |||
52 | // TODO: Add this in case there is no controller for the component | 58 | // TODO: Add this in case there is no controller for the component |
53 | /* | 59 | /* |
54 | if(el.getAttribute("data-montage-id")) { | 60 | if(el.getAttribute("data-montage-id")) { |