OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Oobe signin screen implementation. | 6 * @fileoverview Oobe signin screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 signinButton.id = 'signin-button'; | 56 signinButton.id = 'signin-button'; |
57 signinButton.textContent = localStrings.getString('signinButton'); | 57 signinButton.textContent = localStrings.getString('signinButton'); |
58 signinButton.addEventListener('click', | 58 signinButton.addEventListener('click', |
59 this.handleSigninClick_.bind(this)); | 59 this.handleSigninClick_.bind(this)); |
60 buttons.push(signinButton); | 60 buttons.push(signinButton); |
61 | 61 |
62 return buttons; | 62 return buttons; |
63 }, | 63 }, |
64 | 64 |
65 /** | 65 /** |
66 * Helper function to toggle throbber and input fields. | 66 * Helper function to toggle spinner and input fields. |
67 * @param {boolean} enable True to enable credential input UI. | 67 * @param {boolean} enable True to enable credential input UI. |
68 * @private | 68 * @private |
69 */ | 69 */ |
70 enableInputs_: function(enable) { | 70 enableInputs_: function(enable) { |
71 $('login-throbber').hidden = enable; | 71 $('login-spinner').hidden = enable; |
72 $('email').hidden = !enable; | 72 $('email').hidden = !enable; |
73 $('password').hidden = !enable; | 73 $('password').hidden = !enable; |
74 $('signin-button').hidden = !enable; | 74 $('signin-button').hidden = !enable; |
75 }, | 75 }, |
76 | 76 |
77 /** | 77 /** |
78 * Sets UI state. | 78 * Sets UI state. |
79 */ | 79 */ |
80 set state(newState) { | 80 set state(newState) { |
81 if (newState == SigninScreen.STATE_INPUT) { | 81 if (newState == SigninScreen.STATE_INPUT) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 var emailElement = $('email'); | 154 var emailElement = $('email'); |
155 if (emailElement.value && emailElement.value.indexOf('@') == -1) | 155 if (emailElement.value && emailElement.value.indexOf('@') == -1) |
156 emailElement.value += '@gmail.com'; | 156 emailElement.value += '@gmail.com'; |
157 } | 157 } |
158 }; | 158 }; |
159 | 159 |
160 return { | 160 return { |
161 SigninScreen: SigninScreen | 161 SigninScreen: SigninScreen |
162 }; | 162 }; |
163 }); | 163 }); |
OLD | NEW |