diff options
author | Kruti Shah | 2012-06-26 09:46:59 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-26 09:46:59 -0700 |
commit | 4b4a95140d52e191e5e637371dfc369e50e7f9c8 (patch) | |
tree | 274b55f66527a9925032c5d6da4baa6f12be8ada /js/document/views | |
parent | 4bf8e4cdc179c3b388fc06f26008808aa4b77eb0 (diff) | |
parent | f0d4d89d856b99da1ca8dd3366c48bb76ba6b1f6 (diff) | |
download | ninja-4b4a95140d52e191e5e637371dfc369e50e7f9c8.tar.gz |
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/document/views')
-rwxr-xr-x | js/document/views/design.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 44c61617..d5c5c6c4 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -281,6 +281,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
281 | this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); | 281 | this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); |
282 | //Getting style and link tags in document | 282 | //Getting style and link tags in document |
283 | var htags = this.document.getElementsByTagName('html'), | 283 | var htags = this.document.getElementsByTagName('html'), |
284 | bannerWrapper, | ||
284 | userStyles, | 285 | userStyles, |
285 | stags = this.document.getElementsByTagName('style'), | 286 | stags = this.document.getElementsByTagName('style'), |
286 | ltags = this.document.getElementsByTagName('link'), i, orgNodes, | 287 | ltags = this.document.getElementsByTagName('link'), i, orgNodes, |
@@ -326,6 +327,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
326 | //TODO: Verify appropiate location for this operation | 327 | //TODO: Verify appropiate location for this operation |
327 | if (this._template && this._template.type === 'banner') { | 328 | if (this._template && this._template.type === 'banner') { |
328 | this.documentRoot = this.document.body.getElementsByTagName('ninja-content')[0]; | 329 | this.documentRoot = this.document.body.getElementsByTagName('ninja-content')[0]; |
330 | bannerWrapper = this.documentRoot.parentNode; | ||
329 | } else { | 331 | } else { |
330 | this.documentRoot = this.document.body; | 332 | this.documentRoot = this.document.body; |
331 | } | 333 | } |
@@ -349,6 +351,11 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
349 | this.documentRoot.setAttribute('data-ninja-style', userStyles); | 351 | this.documentRoot.setAttribute('data-ninja-style', userStyles); |
350 | } | 352 | } |
351 | } | 353 | } |
354 | if(bannerWrapper) { | ||
355 | if(userStyles = bannerWrapper.getAttribute('style')) { | ||
356 | bannerWrapper.setAttribute('data-ninja-style', userStyles); | ||
357 | } | ||
358 | } | ||
352 | //Making callback if specified | 359 | //Making callback if specified |
353 | if (this._callback) this._callback(); | 360 | if (this._callback) this._callback(); |
354 | } | 361 | } |