Skip to content

Instantly share code, notes, and snippets.

@ramon
Created August 26, 2011 20:19
Show Gist options
  • Save ramon/1174332 to your computer and use it in GitHub Desktop.
Save ramon/1174332 to your computer and use it in GitHub Desktop.
Ext.Loader.setConfig({
enabled: true,
paths: {
MW360: 'app',
}
});
Ext.ns('MW360')
Ext.define('MW360', {
config: {
apiUrl: '/',
version: '0.1',
},
requires: [
'MW360.Cache', // Components Cache
//'MW360.History', // URL History
],
uses: [
'MW360.ApplicationLogin', // Application Login
'MW360.Application' // Application
],
statics: {
getUrl: function(path) {
return self.getUrl() + 'path'
},
createView: function(view, rebuild = false) {
return MW360.Cache.View.create(view, rebuild);
}
loadController: function(controller) {
return MW360.Cache.Controller.create(controller);
}
},
constructor: function(login = false) {
if (login) {
Ext.require('MW360.ApplicationLogin');
this.app = Ext.create('MW360.ApplicationLogin');
} else {
this.app = Ext.create('MW360.Application')
}
return this;
}
});
Ext.onReady(function() {
var mw360 = new MW360();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment