Created
August 26, 2011 20:19
-
-
Save ramon/1174332 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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