aboutsummaryrefslogtreecommitdiff
path: root/js/document/views
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-30 22:54:36 -0700
committerJose Antonio Marquez2012-05-30 22:54:36 -0700
commit322532ba45158835f7228f0149ddf6e22215bfa3 (patch)
tree1480485460777b11b7dbf80a91a0be2175beafc9 /js/document/views
parent01277e9fe29eee098ed9398b9815eab2d1a52882 (diff)
downloadninja-322532ba45158835f7228f0149ddf6e22215bfa3.tar.gz
Attempting to track clean nodes
Need to figure out CSS overwrite issue <style>
Diffstat (limited to 'js/document/views')
-rwxr-xr-xjs/document/views/design.js10
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