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

Side by Side Diff: chrome/browser/resources/sync_setup_overlay.js

Issue 8283014: Sync: Update look of sign in box (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: promo page Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 7
8 // Variable to track if a captcha challenge was issued. If this gets set to 8 // Variable to track if a captcha challenge was issued. If this gets set to
9 // true, it stays that way until we are told about successful login from 9 // true, it stays that way until we are told about successful login from
10 // the browser. This means subsequent errors (like invalid password) are 10 // the browser. This means subsequent errors (like invalid password) are
(...skipping 23 matching lines...) Expand all
34 34
35 SyncSetupOverlay.prototype = { 35 SyncSetupOverlay.prototype = {
36 __proto__: OptionsPage.prototype, 36 __proto__: OptionsPage.prototype,
37 37
38 /** 38 /**
39 * Initializes the page. 39 * Initializes the page.
40 */ 40 */
41 initializePage: function() { 41 initializePage: function() {
42 OptionsPage.prototype.initializePage.call(this); 42 OptionsPage.prototype.initializePage.call(this);
43 43
44 var acct_text = $('gaia-account-text');
45 var translated_text = acct_text.textContent;
46 var posGoogle = translated_text.indexOf('Google');
47 if (posGoogle != -1) {
48 var googleIsAtEndOfSentence = posGoogle != 0;
49
50 if (googleIsAtEndOfSentence) {
51 var logo_td = $('gaia-logo');
52 logo_td.parentNode.appendChild(logo_td);
53 }
54 acct_text.textContent = translated_text.replace('Google','');
55 }
56
57 var self = this; 44 var self = this;
58 $('gaia-login-form').onsubmit = function() { 45 $('gaia-login-form').onsubmit = function() {
59 self.sendCredentialsAndClose_(); 46 self.sendCredentialsAndClose_();
60 return false; 47 return false;
61 }; 48 };
62 $('google-option').onchange = $('explicit-option').onchange = function() { 49 $('google-option').onchange = $('explicit-option').onchange = function() {
63 self.onPassphraseRadioChanged_(); 50 self.onPassphraseRadioChanged_();
64 }; 51 };
65 $('choose-datatypes-cancel').onclick = 52 $('choose-datatypes-cancel').onclick =
66 $('sync-setup-cancel').onclick = 53 $('sync-setup-cancel').onclick =
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (email && (email.value == null || email.value == "")) { 557 if (email && (email.value == null || email.value == "")) {
571 email.focus(); 558 email.focus();
572 } else if (passwd) { 559 } else if (passwd) {
573 passwd.focus(); 560 passwd.focus();
574 } 561 }
575 }, 562 },
576 563
577 showAccessCodeRequired_: function() { 564 showAccessCodeRequired_: function() {
578 $('password-row').hidden = true; 565 $('password-row').hidden = true;
579 $('email-row').hidden = true; 566 $('email-row').hidden = true;
580 $('create-account-cell').style.visibility = "hidden";
581 567
582 $('access-code-label-row').hidden = false;
583 $('access-code-input-row').hidden = false; 568 $('access-code-input-row').hidden = false;
584 $('access-code-help-row').hidden = false;
585 $('access-code').disabled = false; 569 $('access-code').disabled = false;
586 }, 570 },
587 571
588 showCaptcha_: function(args) { 572 showCaptcha_: function(args) {
589 this.captchaChallengeActive_ = true; 573 this.captchaChallengeActive_ = true;
590 574
591 // The captcha takes up lots of space, so make room. 575 // The captcha takes up lots of space, so make room.
592 $('top-blurb-error').hidden = true; 576 $('top-blurb-error').hidden = true;
593 $('create-account-div').hidden = true; 577 $('create-account-div').hidden = true;
594 $('create-account-cell').hidden = true;
595 578
596 // It's showtime for the captcha now. 579 // It's showtime for the captcha now.
597 $('captcha-div').hidden = false; 580 $('captcha-div').hidden = false;
598 $('gaia-email').disabled = true; 581 $('gaia-email').disabled = true;
599 $('gaia-passwd').disabled = false; 582 $('gaia-passwd').disabled = false;
600 $('captcha-value').disabled = false; 583 $('captcha-value').disabled = false;
601 $('captcha-wrapper').style.backgroundImage = url(args.captchaUrl); 584 $('captcha-wrapper').style.backgroundImage = url(args.captchaUrl);
602 }, 585 },
603 586
604 /** 587 /**
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 843
861 SyncSetupOverlay.showStopSyncingUI = function() { 844 SyncSetupOverlay.showStopSyncingUI = function() {
862 SyncSetupOverlay.getInstance().showStopSyncingUI_(); 845 SyncSetupOverlay.getInstance().showStopSyncingUI_();
863 }; 846 };
864 847
865 // Export 848 // Export
866 return { 849 return {
867 SyncSetupOverlay: SyncSetupOverlay 850 SyncSetupOverlay: SyncSetupOverlay
868 }; 851 };
869 }); 852 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698