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

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

Issue 14296002: Use classList#toggle instead of classList[whatever ? 'add' : 'remove']. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 7 years, 8 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
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 Password changed screen implementation. 6 * @fileoverview Password changed screen implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 /** 165 /**
166 * Show password changed screen. 166 * Show password changed screen.
167 * @param {boolean} showError Whether to show the incorrect password error. 167 * @param {boolean} showError Whether to show the incorrect password error.
168 */ 168 */
169 PasswordChangedScreen.show = function(showError) { 169 PasswordChangedScreen.show = function(showError) {
170 // We'll get here after the successful online authentication. 170 // We'll get here after the successful online authentication.
171 // It assumes session is about to start so hides login screen controls. 171 // It assumes session is about to start so hides login screen controls.
172 Oobe.getInstance().headerHidden = false; 172 Oobe.getInstance().headerHidden = false;
173 var screen = $('password-changed'); 173 var screen = $('password-changed');
174 screen.classList[showError ? 'add' : 'remove']('password-error'); 174 screen.classList.toggle('password-error', showError);
175 screen.classList.add('migrate'); 175 screen.classList.add('migrate');
176 screen.classList.remove('resync'); 176 screen.classList.remove('resync');
177 $('old-password').value = ''; 177 $('old-password').value = '';
178 $('password-changed').disabled = false; 178 $('password-changed').disabled = false;
179 179
180 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); 180 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED});
181 $('password-changed-ok-button').disabled = true; 181 $('password-changed-ok-button').disabled = true;
182 }; 182 };
183 183
184 return { 184 return {
185 PasswordChangedScreen: PasswordChangedScreen 185 PasswordChangedScreen: PasswordChangedScreen
186 }; 186 };
187 }); 187 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698