diff options
author | hwc487 | 2012-06-04 09:15:12 -0700 |
---|---|---|
committer | hwc487 | 2012-06-04 09:15:12 -0700 |
commit | 3f5351c5d75080727953caf5d8d9a312c1c9391b (patch) | |
tree | dcbc2db4e137e115b43a6117331ed1176f85904b /js/document/views | |
parent | 4aacbf5d3c7a42a3621eb3ae2723542a455e7720 (diff) | |
parent | 3abba04025dbc0daadb08184833a2558c442b8e1 (diff) | |
download | ninja-3f5351c5d75080727953caf5d8d9a312c1c9391b.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/document/views')
-rwxr-xr-x | js/document/views/design.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index c7313708..dedfe8b6 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -129,7 +129,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
129 | // | 129 | // |
130 | onTemplateLoad: { | 130 | onTemplateLoad: { |
131 | value: function (e) { | 131 | value: function (e) { |
132 | //console.log(this.iframe.contentWindow); | 132 | //TODO: Remove, this is a temp patch for webRequest API gate |
133 | this.application.ninja.documentController.redirectRequests = true; | 133 | this.application.ninja.documentController.redirectRequests = true; |
134 | //TODO: Add support to constructing URL with a base HREF | 134 | //TODO: Add support to constructing URL with a base HREF |
135 | var basetag = this.content.document.getElementsByTagName('base'); | 135 | var basetag = this.content.document.getElementsByTagName('base'); |
@@ -245,7 +245,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
245 | this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); | 245 | this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); |
246 | //Getting style and link tags in document | 246 | //Getting style and link tags in document |
247 | var stags = this.document.getElementsByTagName('style'), | 247 | var stags = this.document.getElementsByTagName('style'), |
248 | ltags = this.document.getElementsByTagName('link'), i, | 248 | ltags = this.document.getElementsByTagName('link'), i, orgNodes, |
249 | scripttags = this.document.getElementsByTagName('script'); | 249 | scripttags = this.document.getElementsByTagName('script'); |
250 | //Temporarily checking for disabled special case (we must enabled for Ninja to access styles) | 250 | //Temporarily checking for disabled special case (we must enabled for Ninja to access styles) |
251 | this.ninjaDisableAttribute(stags); | 251 | this.ninjaDisableAttribute(stags); |
@@ -286,6 +286,12 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
286 | } | 286 | } |
287 | //Storing node list for reference (might need to store in the model) | 287 | //Storing node list for reference (might need to store in the model) |
288 | this._liveNodeList = this.model.documentRoot.getElementsByTagName('*'); | 288 | this._liveNodeList = this.model.documentRoot.getElementsByTagName('*'); |
289 | //Getting list of original nodes | ||
290 | orgNodes = this.document.getElementsByTagName('*'); | ||
291 | //TODO: Figure out if this is ideal for identifying nodes created by Ninja | ||
292 | for (var n in orgNodes) { | ||
293 | if (orgNodes[n].getAttribute) orgNodes[n].setAttribute('data-ninja-node', 'true'); | ||
294 | } | ||
289 | //Initiliazing document model | 295 | //Initiliazing document model |
290 | document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); | 296 | document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); |
291 | //Makign callback if specified | 297 | //Makign callback if specified |