diff options
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-x | js/document/views/design.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 13f89692..06708957 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -113,7 +113,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
113 | render: { | 113 | render: { |
114 | value: function (callback, template) { | 114 | value: function (callback, template) { |
115 | //TODO: Remove, this is a temp patch for webRequest API gate | 115 | //TODO: Remove, this is a temp patch for webRequest API gate |
116 | this.application.ninja.documentController._hackRootFlag = false; | 116 | this.application.ninja.documentController.redirectRequests = false; |
117 | //Storing callback for dispatch ready | 117 | //Storing callback for dispatch ready |
118 | this._callback = callback; | 118 | this._callback = callback; |
119 | this._template = template; | 119 | this._template = template; |
@@ -131,7 +131,8 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
131 | // | 131 | // |
132 | onTemplateLoad: { | 132 | onTemplateLoad: { |
133 | value: function (e) { | 133 | value: function (e) { |
134 | this.application.ninja.documentController._hackRootFlag = true; | 134 | //console.log(this.iframe.contentWindow); |
135 | this.application.ninja.documentController.redirectRequests = true; | ||
135 | //TODO: Add support to constructing URL with a base HREF | 136 | //TODO: Add support to constructing URL with a base HREF |
136 | var basetag = this.content.document.getElementsByTagName('base'); | 137 | var basetag = this.content.document.getElementsByTagName('base'); |
137 | //Removing event | 138 | //Removing event |
@@ -279,6 +280,14 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
279 | } else { | 280 | } else { |
280 | //Else there is not data to parse | 281 | //Else there is not data to parse |
281 | } | 282 | } |
283 | //TODO: Verify appropiate location for this operation | ||
284 | if (this._template && this._template.type === 'banner') { | ||
285 | this.model.documentRoot = this.document.body.getElementsByTagName('ninja-content')[0]; | ||
286 | } else { | ||
287 | this.model.documentRoot = this.document.body; | ||
288 | } | ||
289 | //Initiliazing document model | ||
290 | document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); | ||
282 | //Makign callback if specified | 291 | //Makign callback if specified |
283 | if (this._callback) this._callback(); | 292 | if (this._callback) this._callback(); |
284 | } | 293 | } |