Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login: function(){
- var contentView = Image.paneController.pane.contentView;
- var pass = contentView.passText.value;
- var user = contentView.userText.value;
- var params = {'user':{'login':user,'password':pass}};
- SC.Request.postUrl('/u/login').json().notify(this, this.didAttemptLogin).send(params);
- },
- didAttemptLogin: function(response){
- if (SC.ok(response)) {
- Image.paneController.pane.remove();
- this.set('loggedIn',YES);
- }
- },
Add Comment
Please, Sign In to add comment