aboutsummaryrefslogtreecommitdiff
path: root/js/document/views/design.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-xjs/document/views/design.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js
index c7313708..9aeb370a 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -63,11 +63,6 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
63 set: function(value) {this._document = value;} 63 set: function(value) {this._document = value;}
64 }, 64 },
65 //////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////
66 //
67 propertiesPanel: {
68 value: null
69 },
70 ////////////////////////////////////////////////////////////////////
71 // 66 //
72 _liveNodeList: { 67 _liveNodeList: {
73 value: null 68 value: null
@@ -129,7 +124,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
129 // 124 //
130 onTemplateLoad: { 125 onTemplateLoad: {
131 value: function (e) { 126 value: function (e) {
132 //console.log(this.iframe.contentWindow); 127 //TODO: Remove, this is a temp patch for webRequest API gate
133 this.application.ninja.documentController.redirectRequests = true; 128 this.application.ninja.documentController.redirectRequests = true;
134 //TODO: Add support to constructing URL with a base HREF 129 //TODO: Add support to constructing URL with a base HREF
135 var basetag = this.content.document.getElementsByTagName('base'); 130 var basetag = this.content.document.getElementsByTagName('base');
@@ -245,7 +240,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
245 this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]); 240 this.document.body.removeChild(this.document.getElementsByTagName('ninjaloadinghack')[0]);
246 //Getting style and link tags in document 241 //Getting style and link tags in document
247 var stags = this.document.getElementsByTagName('style'), 242 var stags = this.document.getElementsByTagName('style'),
248 ltags = this.document.getElementsByTagName('link'), i, 243 ltags = this.document.getElementsByTagName('link'), i, orgNodes,
249 scripttags = this.document.getElementsByTagName('script'); 244 scripttags = this.document.getElementsByTagName('script');
250 //Temporarily checking for disabled special case (we must enabled for Ninja to access styles) 245 //Temporarily checking for disabled special case (we must enabled for Ninja to access styles)
251 this.ninjaDisableAttribute(stags); 246 this.ninjaDisableAttribute(stags);
@@ -286,6 +281,12 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
286 } 281 }
287 //Storing node list for reference (might need to store in the model) 282 //Storing node list for reference (might need to store in the model)
288 this._liveNodeList = this.model.documentRoot.getElementsByTagName('*'); 283 this._liveNodeList = this.model.documentRoot.getElementsByTagName('*');
284 //Getting list of original nodes
285 orgNodes = this.document.getElementsByTagName('*');
286 //TODO: Figure out if this is ideal for identifying nodes created by Ninja
287 for (var n in orgNodes) {
288 if (orgNodes[n].getAttribute) orgNodes[n].setAttribute('data-ninja-node', 'true');
289 }
289 //Initiliazing document model 290 //Initiliazing document model
290 document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body"); 291 document.application.njUtils.makeElementModel(this.model.documentRoot, "Body", "body");
291 //Makign callback if specified 292 //Makign callback if specified