OLD | NEW |
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 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 | 7 |
8 // True if the synced account uses a custom passphrase. | 8 // True if the synced account uses a custom passphrase. |
9 var usePassphrase_ = false; | 9 var usePassphrase_ = false; |
10 | 10 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 showTimeoutPage_: function() { | 486 showTimeoutPage_: function() { |
487 this.resetPage_('sync-setup-timeout'); | 487 this.resetPage_('sync-setup-timeout'); |
488 $('sync-setup-timeout').hidden = false; | 488 $('sync-setup-timeout').hidden = false; |
489 }, | 489 }, |
490 | 490 |
491 showSyncEverythingPage_: function() { | 491 showSyncEverythingPage_: function() { |
492 // Determine whether to bring the OK button into focus. | 492 // Determine whether to bring the OK button into focus. |
493 var wasConfirmPageHidden = !this.confirmPageVisible_; | 493 var wasConfirmPageHidden = !this.confirmPageVisible_; |
494 this.confirmPageVisible_ = true; | 494 this.confirmPageVisible_ = true; |
| 495 this.customizePageVisible_ = false; |
495 | 496 |
496 $('confirm-sync-preferences').hidden = false; | 497 $('confirm-sync-preferences').hidden = false; |
497 $('customize-sync-preferences').hidden = true; | 498 $('customize-sync-preferences').hidden = true; |
498 | 499 |
499 // Reset the selection to 'Sync everything'. | 500 // Reset the selection to 'Sync everything'. |
500 $('sync-select-datatypes').selectedIndex = 0; | 501 $('sync-select-datatypes').selectedIndex = 0; |
501 | 502 |
502 // The default state is to sync everything. | 503 // The default state is to sync everything. |
503 this.setDataTypeCheckboxes_(DataTypeSelection.SYNC_EVERYTHING); | 504 this.setDataTypeCheckboxes_(DataTypeSelection.SYNC_EVERYTHING); |
504 | 505 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 /** | 582 /** |
582 * Displays the advanced sync setting dialog, and pre-selects either the | 583 * Displays the advanced sync setting dialog, and pre-selects either the |
583 * "Sync everything" or the "Choose what to sync" drop-down menu item. | 584 * "Sync everything" or the "Choose what to sync" drop-down menu item. |
584 * @param {cr.DataTypeSelection} index Index of item to pre-select. | 585 * @param {cr.DataTypeSelection} index Index of item to pre-select. |
585 * @private | 586 * @private |
586 */ | 587 */ |
587 showCustomizePage_: function(args, index) { | 588 showCustomizePage_: function(args, index) { |
588 // Determine whether to bring the OK button field into focus. | 589 // Determine whether to bring the OK button field into focus. |
589 var wasCustomizePageHidden = !this.customizePageVisible_; | 590 var wasCustomizePageHidden = !this.customizePageVisible_; |
590 this.customizePageVisible_ = true; | 591 this.customizePageVisible_ = true; |
| 592 this.confirmPageVisible_ = false; |
591 | 593 |
592 $('confirm-sync-preferences').hidden = true; | 594 $('confirm-sync-preferences').hidden = true; |
593 $('customize-sync-preferences').hidden = false; | 595 $('customize-sync-preferences').hidden = false; |
594 | 596 |
595 $('sync-custom-passphrase-container').hidden = false; | 597 $('sync-custom-passphrase-container').hidden = false; |
596 $('sync-new-encryption-section-container').hidden = false; | 598 $('sync-new-encryption-section-container').hidden = false; |
597 $('customize-sync-encryption-new').hidden = false; | 599 $('customize-sync-encryption-new').hidden = false; |
598 | 600 |
599 $('sync-existing-passphrase-container').hidden = true; | 601 $('sync-existing-passphrase-container').hidden = true; |
600 | 602 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 794 |
793 SyncSetupOverlay.showStopSyncingUI = function() { | 795 SyncSetupOverlay.showStopSyncingUI = function() { |
794 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 796 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
795 }; | 797 }; |
796 | 798 |
797 // Export | 799 // Export |
798 return { | 800 return { |
799 SyncSetupOverlay: SyncSetupOverlay | 801 SyncSetupOverlay: SyncSetupOverlay |
800 }; | 802 }; |
801 }); | 803 }); |
OLD | NEW |