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

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

Issue 403343002: Rename "managed (mode|user)" to "supervised user" (part 8) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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) 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 <include src="../../gaia_auth_host/gaia_auth_host.js"> 9 <include src="../../gaia_auth_host/gaia_auth_host.js">
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 if (data.passwordChanged) { 292 if (data.passwordChanged) {
293 reasonLabel.textContent = 293 reasonLabel.textContent =
294 loadTimeData.getString('signinScreenPasswordChanged'); 294 loadTimeData.getString('signinScreenPasswordChanged');
295 reasonLabel.hidden = false; 295 reasonLabel.hidden = false;
296 } else { 296 } else {
297 reasonLabel.hidden = true; 297 reasonLabel.hidden = true;
298 } 298 }
299 299
300 $('createAccount').hidden = !data.createAccount; 300 $('createAccount').hidden = !data.createAccount;
301 $('guestSignin').hidden = !data.guestSignin; 301 $('guestSignin').hidden = !data.guestSignin;
302 $('createManagedUserPane').hidden = !data.managedUsersEnabled; 302 $('createSupervisedUserPane').hidden = !data.supervisedUsersEnabled;
303 303
304 $('createManagedUserLinkPlaceholder').hidden = 304 $('createSupervisedUserLinkPlaceholder').hidden =
305 !data.managedUsersCanCreate; 305 !data.supervisedUsersCanCreate;
306 $('createManagedUserNoManagerText').hidden = data.managedUsersCanCreate; 306 $('createSupervisedUserNoManagerText').hidden =
307 $('createManagedUserNoManagerText').textContent = 307 data.supervisedUsersCanCreate;
308 data.managedUsersRestrictionReason; 308 $('createSupervisedUserNoManagerText').textContent =
309 data.supervisedUsersRestrictionReason;
309 310
310 this.isShowUsers_ = data.isShowUsers; 311 this.isShowUsers_ = data.isShowUsers;
311 this.updateCancelButtonState(); 312 this.updateCancelButtonState();
312 313
313 // Sign-in right panel is hidden if all of its items are hidden. 314 // Sign-in right panel is hidden if all of its items are hidden.
314 var noRightPanel = $('gaia-signin-reason').hidden && 315 var noRightPanel = $('gaia-signin-reason').hidden &&
315 $('createAccount').hidden && 316 $('createAccount').hidden &&
316 $('guestSignin').hidden && 317 $('guestSignin').hidden &&
317 $('createManagedUserPane').hidden; 318 $('createSupervisedUserPane').hidden;
318 this.classList.toggle('no-right-panel', noRightPanel); 319 this.classList.toggle('no-right-panel', noRightPanel);
319 if (Oobe.getInstance().currentScreen === this) 320 if (Oobe.getInstance().currentScreen === this)
320 Oobe.getInstance().updateScreenSize(this); 321 Oobe.getInstance().updateScreenSize(this);
321 }, 322 },
322 323
323 /** 324 /**
324 * Sends the authenticated user's e-mail address to the auth extension. 325 * Sends the authenticated user's e-mail address to the auth extension.
325 * @param {number} attemptToken The opaque token provided to 326 * @param {number} attemptToken The opaque token provided to
326 * onRetrieveAuthenticatedUserEmail_. 327 * onRetrieveAuthenticatedUserEmail_.
327 * @param {string} email The authenticated user's e-mail address. 328 * @param {string} email The authenticated user's e-mail address.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 */ 551 */
551 updateLocalizedContent: function() { 552 updateLocalizedContent: function() {
552 $('createAccount').innerHTML = loadTimeData.getStringF( 553 $('createAccount').innerHTML = loadTimeData.getStringF(
553 'createAccount', 554 'createAccount',
554 '<a id="createAccountLink" class="signin-link" href="#">', 555 '<a id="createAccountLink" class="signin-link" href="#">',
555 '</a>'); 556 '</a>');
556 $('guestSignin').innerHTML = loadTimeData.getStringF( 557 $('guestSignin').innerHTML = loadTimeData.getStringF(
557 'guestSignin', 558 'guestSignin',
558 '<a id="guestSigninLink" class="signin-link" href="#">', 559 '<a id="guestSigninLink" class="signin-link" href="#">',
559 '</a>'); 560 '</a>');
560 $('createManagedUserLinkPlaceholder').innerHTML = loadTimeData.getStringF( 561 $('createSupervisedUserLinkPlaceholder').innerHTML =
561 'createLocallyManagedUser', 562 loadTimeData.getStringF(
562 '<a id="createManagedUserLink" class="signin-link" href="#">', 563 'createSupervisedUser',
563 '</a>'); 564 '<a id="createSupervisedUserLink" class="signin-link" href="#">',
565 '</a>');
564 $('createAccountLink').addEventListener('click', function(e) { 566 $('createAccountLink').addEventListener('click', function(e) {
565 chrome.send('createAccount'); 567 chrome.send('createAccount');
566 e.preventDefault(); 568 e.preventDefault();
567 }); 569 });
568 $('guestSigninLink').addEventListener('click', function(e) { 570 $('guestSigninLink').addEventListener('click', function(e) {
569 chrome.send('launchIncognito'); 571 chrome.send('launchIncognito');
570 e.preventDefault(); 572 e.preventDefault();
571 }); 573 });
572 $('createManagedUserLink').addEventListener('click', function(e) { 574 $('createSupervisedUserLink').addEventListener('click', function(e) {
573 chrome.send('showLocallyManagedUserCreationScreen'); 575 chrome.send('showSupervisedUserCreationScreen');
574 e.preventDefault(); 576 e.preventDefault();
575 }); 577 });
576 }, 578 },
577 579
578 /** 580 /**
579 * Shows sign-in error bubble. 581 * Shows sign-in error bubble.
580 * @param {number} loginAttempts Number of login attemps tried. 582 * @param {number} loginAttempts Number of login attemps tried.
581 * @param {HTMLElement} content Content to show in bubble. 583 * @param {HTMLElement} content Content to show in bubble.
582 */ 584 */
583 showErrorBubble: function(loginAttempts, error) { 585 showErrorBubble: function(loginAttempts, error) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 * For more info see C++ class 'WebUILoginView' which calls this method. 630 * For more info see C++ class 'WebUILoginView' which calls this method.
629 * @param {number} error Error code. 631 * @param {number} error Error code.
630 * @param {string} url The URL that failed to load. 632 * @param {string} url The URL that failed to load.
631 */ 633 */
632 onFrameError: function(error, url) { 634 onFrameError: function(error, url) {
633 this.error_ = error; 635 this.error_ = error;
634 chrome.send('frameLoadingCompleted', [this.error_]); 636 chrome.send('frameLoadingCompleted', [this.error_]);
635 }, 637 },
636 }; 638 };
637 }); 639 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698