diff options
author | Valerio Virgillito | 2012-06-01 15:26:30 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-01 15:26:30 -0700 |
commit | 4bb571a9551bba8a37bf3afd639412173d58bc71 (patch) | |
tree | 1be2a2883de37c44b471dae95b891ac8e67fc95b /js/document/views | |
parent | 8bbabd61e600e0a4aee72377c962d9147db1d8e1 (diff) | |
parent | 41e1d1f57aa60514ebeaa640e19ec4d145c33314 (diff) | |
download | ninja-4bb571a9551bba8a37bf3afd639412173d58bc71.tar.gz |
Merge pull request #262 from joseeight/Document
Fixing webGL helper, setting up montage flag for clean up
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 |