daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest May 22nd, 2018 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ClientHub.loggedOutView = Em.View.extend({
  2.   templateName: "login",
  3.   LoginFormView: Em.View.extend({
  4.     errorMsg: null,
  5.     error: null,
  6.  
  7.     username: null,
  8.     password: null,
  9.     submitLogin:function(){
  10.       ClientHub.LoginManager.send('login', {username: this.get('username'),
  11.                                             password: this.get('password')
  12.                                            })
  13.     }
  14.   }),
  15. });
  16.  
  17.  
  18.  
  19. //inside the state manager
  20. loginErrState : Em.State.create({
  21.       enter: function(manager, transition){
  22.         view = this.get('parentState').get('view').get('')
  23.         view.set('error', "There was a problem logging you in. Please try again.")
  24.         view.set('')
  25.       },
  26.       exit: function(manager, transition){
  27.         view = this.get('parentState').get('view').get('LoginFormView')
  28.         view.get.set('error', null)
  29.       },
  30.     }),
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top