Skip to content

Instantly share code, notes, and snippets.

@mikekunze
Created January 5, 2012 02:08
Show Gist options
  • Save mikekunze/1563320 to your computer and use it in GitHub Desktop.
Save mikekunze/1563320 to your computer and use it in GitHub Desktop.
main client application for bang.js,
Ext.namespace('Ext.bang.views');
Ext.namespace('Ext.bang.util');
Ext.bang.util.run = function(provider, response) {
var object = Ext.JSON.decode(response.result);
object.main();
};
Ext.bang.util.startup = function() {
Ext.direct.Manager.addProvider({
url: '/bang/getJS',
type: 'remoting',
actions: {
remotejs: [
{name: 'getJS', len: 1},
{name: 'logMessage', len: 1},
{name: 'broadcastMessage', len: 1}
]
}
});
remotejs.getJS({ js: 'interface.js', app: 'bang'}, Ext.bang.util.run);
};
Ext.require('Ext.direct.*', Ext.bang.util.startup);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment