aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/application.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-20 15:16:30 -0700
committerArmen Kesablyan2012-06-20 15:16:30 -0700
commit65b989c7759af923fb9456d34bff89f91831ea1e (patch)
treee408be732a3eee71229bfc7dbf7cace998ce18de /node_modules/montage/ui/application.js
parent38f571d1fdf02d36c3816637af7b2ca2493809da (diff)
parentfc818d31de267d2b77fda3b3029ad38d48698be8 (diff)
downloadninja-65b989c7759af923fb9456d34bff89f91831ea1e.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: node_modules/montage/ui/application.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/application.js')
-rwxr-xr-xnode_modules/montage/ui/application.js34
1 files changed, 15 insertions, 19 deletions
diff --git a/node_modules/montage/ui/application.js b/node_modules/montage/ui/application.js
index 43443ecc..025ef950 100755
--- a/node_modules/montage/ui/application.js
+++ b/node_modules/montage/ui/application.js
@@ -137,31 +137,27 @@ var Application = exports.Application = Montage.create(Montage, /** @lends monta
137 value: null 137 value: null
138 }, 138 },
139 139
140 /** 140 _load: {
141 Description TODO 141 value: function(applicationRequire, callback) {
142 @function 142 var template = Template.create().initWithDocument(window.document, applicationRequire),
143 @param {Function} callback A function to invoke after the method has completed. 143 rootComponent,
144 */
145 load: {
146 value: function(callback) {
147 var template = Template.create().initWithDocument(window.document),
148 component,
149 self = this; 144 self = this;
150 145
151 self = Application.isPrototypeOf(self) ? self : Application.create();
152
153 // assign to the exports so that it is available in the deserialization of the template 146 // assign to the exports so that it is available in the deserialization of the template
154 exports.application = self; 147 exports.application = self;
155 148
156 ///// TODO: Remove this hack when montage exposes this 149 require.async("ui/component").then(function(exports) {
157 this._template = template; 150 rootComponent = exports.__root__;
151 rootComponent.element = document;
152 template.instantiateWithOwnerAndDocument(null, window.document, function() {
153 self.callDelegateMethod("willFinishLoading", self);
154 rootComponent.needsDraw = true;
155 if (callback) {
156 callback(self);
157 }
158 158
159 template.instantiateWithOwnerAndDocument(null, window.document, function() { 159 });
160 require("ui/component").__root__.needsDraw = true; 160 }).end();
161 if (callback) {
162 callback(self);
163 }
164 });
165 } 161 }
166 }, 162 },
167 163