Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_signin.js

Issue 7841005: [ChromeOS] Use oauth's segmented spinner for sign-in loading UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing spinner.css Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_signin.html ('k') | chrome/browser/resources/chromeos/login/spinner.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698