Moved all js file under src folder.

This commit is contained in:
BorisLevitskiy
2015-04-09 16:01:12 +03:00
parent 2dc592ed2e
commit ddc8e5b8b5
24 changed files with 20 additions and 20 deletions

37
src/js/core/appShell.js Normal file
View File

@@ -0,0 +1,37 @@
(function() {
"use strict";
function AppShell(diContainer) {
this.models = {};
this.di = diContainer;
this.runList = [];
this.compositionList = [];
}
AppShell.prototype.get = function(name) {
return this.di.resolve(name);
};
AppShell.prototype.set = function(name, def) {
this.di.register(name, def);
};
AppShell.prototype.run = function(func) {
this.runList.push(func);
};
AppShell.prototype.compose = function (func) {
this.compositionList.push(func);
};
AppShell.prototype.initialize = function () {
callInvocationList(this.compositionList);
callInvocationList(this.runList);
};
function callInvocationList(functions) {
functions.forEach(function(o){ o(); });
}
window.core.AppShell = AppShell;
})();