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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.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
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 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 // Gaia loading time after which error message must be displayed and 10 // Gaia loading time after which error message must be displayed and
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 $('createLocallyManagedUser').hidden = !data.createLocallyManagedUser; 271 $('createLocallyManagedUser').hidden = !data.createLocallyManagedUser;
272 // Allow cancellation of screen only when user pods can be displayed. 272 // Allow cancellation of screen only when user pods can be displayed.
273 this.cancelAllowed_ = data.isShowUsers && $('pod-row').pods.length; 273 this.cancelAllowed_ = data.isShowUsers && $('pod-row').pods.length;
274 $('login-header-bar').allowCancel = this.cancelAllowed_; 274 $('login-header-bar').allowCancel = this.cancelAllowed_;
275 275
276 // Sign-in right panel is hidden if all of its items are hidden. 276 // Sign-in right panel is hidden if all of its items are hidden.
277 var noRightPanel = $('gaia-signin-reason').hidden && 277 var noRightPanel = $('gaia-signin-reason').hidden &&
278 $('createAccount').hidden && 278 $('createAccount').hidden &&
279 $('guestSignin').hidden && 279 $('guestSignin').hidden &&
280 $('createLocallyManagedUser').hidden; 280 $('createLocallyManagedUser').hidden;
281 this.classList[noRightPanel ? 'add' : 'remove']('no-right-panel'); 281 this.classList.toggle('no-right-panel', noRightPanel);
282 if (Oobe.getInstance().currentScreen === this) 282 if (Oobe.getInstance().currentScreen === this)
283 Oobe.getInstance().updateScreenSize(this); 283 Oobe.getInstance().updateScreenSize(this);
284 }, 284 },
285 285
286 /** 286 /**
287 * Checks if message comes from the loaded authentication extension. 287 * Checks if message comes from the loaded authentication extension.
288 * @param {object} e Payload of the received HTML5 message. 288 * @param {object} e Payload of the received HTML5 message.
289 * @type {boolean} 289 * @type {boolean}
290 */ 290 */
291 isAuthExtMessage_: function(e) { 291 isAuthExtMessage_: function(e) {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // Check current network state if currentScreen is a Gaia signin. 489 // Check current network state if currentScreen is a Gaia signin.
490 var currentScreen = Oobe.getInstance().currentScreen; 490 var currentScreen = Oobe.getInstance().currentScreen;
491 if (currentScreen.id == SCREEN_GAIA_SIGNIN) 491 if (currentScreen.id == SCREEN_GAIA_SIGNIN)
492 chrome.send('showGaiaFrameError', [error]); 492 chrome.send('showGaiaFrameError', [error]);
493 }; 493 };
494 494
495 return { 495 return {
496 GaiaSigninScreen: GaiaSigninScreen 496 GaiaSigninScreen: GaiaSigninScreen
497 }; 497 };
498 }); 498 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698