diff options
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index f3c135ed..79fe461b 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -63,7 +63,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
63 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |
64 | // | 64 | // |
65 | init: { | 65 | init: { |
66 | value:function(file, context, callback, view) { | 66 | value:function(file, context, callback, view, template) { //TODO: Add template support logic |
67 | //Storing callback data for loaded dispatch | 67 | //Storing callback data for loaded dispatch |
68 | this.loaded.callback = callback; | 68 | this.loaded.callback = callback; |
69 | this.loaded.context = context; | 69 | this.loaded.context = context; |
@@ -85,16 +85,19 @@ exports.HtmlDocument = Montage.create(Component, { | |||
85 | this.model.views.design.show(); | 85 | this.model.views.design.show(); |
86 | this.model.views.design.iframe.style.opacity = 0; | 86 | this.model.views.design.iframe.style.opacity = 0; |
87 | this.model.views.design.content = this.model.file.content; | 87 | this.model.views.design.content = this.model.file.content; |
88 | //TODO: Improve reference | ||
89 | this.model.views.design.model = this.model; | ||
90 | // | ||
88 | //TODO: Clean up | 91 | //TODO: Clean up |
89 | this.model.views.design.render(function () { | 92 | this.model.views.design.render(function () { |
90 | //TODO: Identify and remove usage of '_document' | 93 | //TODO: Identify and remove usage of '_document' |
91 | this._document = this.model.views.design.document; | 94 | this._document = this.model.views.design.document; |
92 | //TODO: Check for needed | 95 | //TODO: Remove usage, seems as not needed |
93 | this.documentRoot = this.model.views.design.document.body; | 96 | this.documentRoot = this.model.views.design.document.body; |
94 | //TODO: Why is this needed? | 97 | //TODO: Why is this needed? |
95 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); | 98 | this._liveNodeList = this.model.views.design.document.body.getElementsByTagName('*'); |
96 | //Initiliazing document model | 99 | //Initiliazing document model |
97 | document.application.njUtils.makeElementModel(this.documentRoot, "Body", "body"); | 100 | document.application.njUtils.makeElementModel(this.model.views.design.document.body, "Body", "body"); |
98 | //Adding observer to know when template is ready | 101 | //Adding observer to know when template is ready |
99 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); | 102 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); |
100 | this._observer.observe(this.model.views.design.document.head, {childList: true}); | 103 | this._observer.observe(this.model.views.design.document.head, {childList: true}); |
@@ -115,11 +118,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
115 | this.loaded.callback.call(this.loaded.context, this); | 118 | this.loaded.callback.call(this.loaded.context, this); |
116 | //Setting opacity to be viewable after load | 119 | //Setting opacity to be viewable after load |
117 | this.model.views.design.iframe.style.opacity = 1; | 120 | this.model.views.design.iframe.style.opacity = 1; |
118 | 121 | //TODO: Remove, this is a temp hard-coded hack | |
119 | |||
120 | |||
121 | |||
122 | |||
123 | this.application.ninja.appModel.show3dGrid = true; | 122 | this.application.ninja.appModel.show3dGrid = true; |
124 | } | 123 | } |
125 | } | 124 | } |