aboutsummaryrefslogtreecommitdiff
path: root/js/document/mediators/template.js
diff options
context:
space:
mode:
authorKruti Shah2012-06-26 09:46:59 -0700
committerKruti Shah2012-06-26 09:46:59 -0700
commit4b4a95140d52e191e5e637371dfc369e50e7f9c8 (patch)
tree274b55f66527a9925032c5d6da4baa6f12be8ada /js/document/mediators/template.js
parent4bf8e4cdc179c3b388fc06f26008808aa4b77eb0 (diff)
parentf0d4d89d856b99da1ca8dd3366c48bb76ba6b1f6 (diff)
downloadninja-4b4a95140d52e191e5e637371dfc369e50e7f9c8.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/document/mediators/template.js')
-rwxr-xr-xjs/document/mediators/template.js9
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'));