diff options
author | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-24 13:54:00 -0700 |
commit | fd4af6d81725dfa0630ac5e52ba95405336f4074 (patch) | |
tree | 868197f79862e98b9c7f5a1f296d64832c68d48f /js/document/views/design.js | |
parent | de25d2b7d05476d4f0d385b5e910db189f682d21 (diff) | |
parent | 70ff8dd670bc37c14caf850e06791d1e293b1e4b (diff) | |
download | ninja-fd4af6d81725dfa0630ac5e52ba95405336f4074.tar.gz |
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-x | js/document/views/design.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 13f89692..d772aa86 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,16 @@ 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 | //Storing node list for reference (might need to store in the model) | ||
290 | this._liveNodeList = this.model.documentRoot.getElementsByTagName('*'); | ||
291 | //Initiliazing document model | ||
292 | document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); | ||
282 | //Makign callback if specified | 293 | //Makign callback if specified |
283 | if (this._callback) this._callback(); | 294 | if (this._callback) this._callback(); |
284 | } | 295 | } |