diff options
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/document-html.js | 8 | ||||
-rwxr-xr-x | js/document/html-document.js | 2 | ||||
-rw-r--r-- | js/document/templates/montage-web/main.reel/main.js | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 841e66ed..8cb88516 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -67,8 +67,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
67 | 67 | ||
68 | // this.init(file.name, file.uri, file.extension, iframe, uuid, callback); | 68 | // this.init(file.name, file.uri, file.extension, iframe, uuid, callback); |
69 | 69 | ||
70 | |||
70 | this.iframe = this.createView(); | 71 | this.iframe = this.createView(); |
71 | this.iframe.addEventListener("load", this.handleWebTemplateLoad.bind(this), true); | ||
72 | 72 | ||
73 | //this.selectionExclude = ["HTML", "BODY", "Viewport", "UserContent", "stageBG"]; | 73 | //this.selectionExclude = ["HTML", "BODY", "Viewport", "UserContent", "stageBG"]; |
74 | //this.currentView = "design"; | 74 | //this.currentView = "design"; |
@@ -96,6 +96,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
96 | // ifr.style.opacity = 0; | 96 | // ifr.style.opacity = 0; |
97 | 97 | ||
98 | ifr.src = "js/document/templates/montage-web/index.html"; | 98 | ifr.src = "js/document/templates/montage-web/index.html"; |
99 | ifr.addEventListener("load", this.handleWebTemplateLoad.bind(this), true); | ||
99 | 100 | ||
100 | return document.getElementById("iframeContainer").appendChild(ifr); | 101 | return document.getElementById("iframeContainer").appendChild(ifr); |
101 | } | 102 | } |
@@ -124,8 +125,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
124 | 125 | ||
125 | // TODO: We don't need this anymore -> need to setup the main container still | 126 | // TODO: We don't need this anymore -> need to setup the main container still |
126 | //Adding a handler for the main user document reel to finish loading | 127 | //Adding a handler for the main user document reel to finish loading |
127 | //this._document.body.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); | 128 | // this.documentRoot.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); |
128 | this.documentRoot.addEventListener("userTemplateDidLoad", this.userTemplateDidLoad.bind(this), false); | ||
129 | 129 | ||
130 | // Live node list of the current loaded document | 130 | // Live node list of the current loaded document |
131 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); | 131 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); |
@@ -314,7 +314,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
314 | // Setting up the currentSelectedContainer to the document body. | 314 | // Setting up the currentSelectedContainer to the document body. |
315 | userTemplateDidLoad: { | 315 | userTemplateDidLoad: { |
316 | value: function(){ | 316 | value: function(){ |
317 | this.application.ninja.currentSelectedContainer = this.documentRoot; | 317 | // this.application.ninja.currentSelectedContainer = this.documentRoot; |
318 | } | 318 | } |
319 | } | 319 | } |
320 | }); | 320 | }); |
diff --git a/js/document/html-document.js b/js/document/html-document.js index 9873fdd1..54db9eaa 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -826,7 +826,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
826 | // Setting up the currentSelectedContainer to the document body. | 826 | // Setting up the currentSelectedContainer to the document body. |
827 | userTemplateDidLoad: { | 827 | userTemplateDidLoad: { |
828 | value: function(){ | 828 | value: function(){ |
829 | this.application.ninja.currentSelectedContainer = this.documentRoot; | 829 | //this.application.ninja.currentSelectedContainer = this.documentRoot; |
830 | } | 830 | } |
831 | }, | 831 | }, |
832 | 832 | ||
diff --git a/js/document/templates/montage-web/main.reel/main.js b/js/document/templates/montage-web/main.reel/main.js index 019c675e..d5ac88d5 100644 --- a/js/document/templates/montage-web/main.reel/main.js +++ b/js/document/templates/montage-web/main.reel/main.js | |||
@@ -38,10 +38,11 @@ exports.Main = Montage.create(Component, { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | // Dispatch event when this template has loaded. | 40 | // Dispatch event when this template has loaded. |
41 | /* | ||
41 | var newEvent = document.createEvent( "CustomEvent" ); | 42 | var newEvent = document.createEvent( "CustomEvent" ); |
42 | newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); | 43 | newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); |
43 | |||
44 | document.body.dispatchEvent( newEvent ); | 44 | document.body.dispatchEvent( newEvent ); |
45 | */ | ||
45 | 46 | ||
46 | } | 47 | } |
47 | } | 48 | } |