Created
January 5, 2012 02:55
-
-
Save mikekunze/1563492 to your computer and use it in GitHub Desktop.
extjs login controller
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.define('bang.controller.login', { | |
extend: 'Ext.app.Controller', | |
views: ['loginPanel'], | |
init: function() { | |
remotejs.logMessage('[Client] - Initialized login controller'); | |
this.control({ | |
'loginPanel button[action=login]': { | |
click: function(button) { | |
var win = button.up('window'), | |
form = win.down('form'); | |
form.submit({ | |
success: function(button) { | |
win.close(); | |
remotejs.logMessage('[Client] - ' + form.getValues().username + ' has logged in, loading interface'); | |
} | |
}); | |
} | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment