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

Side by Side Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 22751002: Dynamically update sign-in/Sync status in the profile creation overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skip for tests Created 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/manage_profile_handler.h » ('j') | 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 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 /** 9 /**
10 * ManageProfileOverlay class 10 * ManageProfileOverlay class
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 * @param {boolean} hasError Whether the user's sign-in credentials are 610 * @param {boolean} hasError Whether the user's sign-in credentials are
611 * still valid. 611 * still valid.
612 * @private 612 * @private
613 */ 613 */
614 updateSignedInStatus_: function(email, hasError) { 614 updateSignedInStatus_: function(email, hasError) {
615 this.signedInEmail_ = email; 615 this.signedInEmail_ = email;
616 this.hasError_ = hasError; 616 this.hasError_ = hasError;
617 var isSignedIn = email !== ''; 617 var isSignedIn = email !== '';
618 $('create-profile-managed-signed-in').hidden = !isSignedIn; 618 $('create-profile-managed-signed-in').hidden = !isSignedIn;
619 $('create-profile-managed-not-signed-in').hidden = isSignedIn; 619 $('create-profile-managed-not-signed-in').hidden = isSignedIn;
620 $('select-existing-managed-profile-checkbox').hidden = !isSignedIn; 620 var hideSelectExistingManagedUsers =
621 $('choose-existing-managed-profile').hidden = !isSignedIn; 621 !isSignedIn ||
622 !loadTimeData.getBoolean('allowCreateExistingManagedUsers');
623 $('select-existing-managed-profile-checkbox').hidden =
624 hideSelectExistingManagedUsers;
625 $('choose-existing-managed-profile').hidden =
626 hideSelectExistingManagedUsers;
622 627
623 if (isSignedIn) { 628 if (isSignedIn) {
624 var accountDetailsOutOfDate = 629 var accountDetailsOutOfDate =
625 $('create-profile-managed-account-details-out-of-date-label'); 630 $('create-profile-managed-account-details-out-of-date-label');
626 accountDetailsOutOfDate.textContent = loadTimeData.getStringF( 631 accountDetailsOutOfDate.textContent = loadTimeData.getStringF(
627 'manageProfilesManagedAccountDetailsOutOfDate', email); 632 'manageProfilesManagedAccountDetailsOutOfDate', email);
628 accountDetailsOutOfDate.hidden = !hasError; 633 accountDetailsOutOfDate.hidden = !hasError;
629 634
630 $('create-profile-managed-signed-in-label').textContent = 635 $('create-profile-managed-signed-in-label').textContent =
631 loadTimeData.getStringF( 636 loadTimeData.getStringF(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 return instance[name + '_'].apply(instance, arguments); 719 return instance[name + '_'].apply(instance, arguments);
715 }; 720 };
716 }); 721 });
717 722
718 // Export 723 // Export
719 return { 724 return {
720 ManageProfileOverlay: ManageProfileOverlay, 725 ManageProfileOverlay: ManageProfileOverlay,
721 CreateProfileOverlay: CreateProfileOverlay, 726 CreateProfileOverlay: CreateProfileOverlay,
722 }; 727 };
723 }); 728 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/manage_profile_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698