diff options
author | Jose Antonio Marquez | 2012-06-25 11:53:19 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-25 11:53:19 -0700 |
commit | 245e70117f9605dc5603328c97685b2e5a10f220 (patch) | |
tree | 063b1b147b246bd93b259a2d84d3bc70928f4174 /js/document/mediators/template.js | |
parent | e74b08a510176d163da9e0bdd771d9b28176a12a (diff) | |
parent | de38cd3479bd5865e058938095120fa3526fc9b3 (diff) | |
download | ninja-245e70117f9605dc5603328c97685b2e5a10f220.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/document/mediators/template.js')
-rwxr-xr-x | js/document/mediators/template.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js index c5b46c3a..f43b1a2c 100755 --- a/js/document/mediators/template.js +++ b/js/document/mediators/template.js | |||
@@ -158,6 +158,15 @@ exports.TemplateDocumentMediator = Montage.create(Component, { | |||
158 | ninjaContentTagDoc.removeAttribute('style'); | 158 | ninjaContentTagDoc.removeAttribute('style'); |
159 | ninjaContentTagDoc.removeAttribute('data-ninja-style'); | 159 | ninjaContentTagDoc.removeAttribute('data-ninja-style'); |
160 | } | 160 | } |
161 | // TODO - clean up into single method | ||
162 | ninjaContentTagMem = template.document.getElementsByTagName('ninja-viewport')[0], ninjaContentTagDoc = template.file.content.document.getElementsByTagName('ninja-viewport')[0]; | ||
163 | if (ninjaContentTagMem && ninjaContentTagMem.getAttribute('data-ninja-style') !== null) { | ||
164 | ninjaContentTagDoc.setAttribute('style', ninjaContentTagMem.getAttribute('data-ninja-style')); | ||
165 | ninjaContentTagDoc.removeAttribute('data-ninja-style'); | ||
166 | } else if (ninjaContentTagMem && ninjaContentTagMem.getAttribute('data-ninja-style') === null) { | ||
167 | ninjaContentTagDoc.removeAttribute('style'); | ||
168 | ninjaContentTagDoc.removeAttribute('data-ninja-style'); | ||
169 | } | ||
161 | } else { | 170 | } else { |
162 | if (template.body && template.body.getAttribute('data-ninja-style') !== null) { | 171 | if (template.body && template.body.getAttribute('data-ninja-style') !== null) { |
163 | template.file.content.document.body.setAttribute('style', template.body.getAttribute('data-ninja-style')); | 172 | template.file.content.document.body.setAttribute('style', template.body.getAttribute('data-ninja-style')); |