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

Side by Side Diff: chrome/browser/resources/signin/signin_email_confirmation/signin_email_confirmation.js

Issue 2625663003: Layout nits for the signin email confirmation dialog. (Closed)
Patch Set: Nits and use I18nBehavior.i18n Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 /* Copyright 2016 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('signin.emailConfirmation', function() { 5 cr.define('signin.emailConfirmation', function() {
6 'use strict'; 6 'use strict';
7 7
8 function initialize() { 8 function initialize() {
9 var args = JSON.parse(chrome.getVariableValue('dialogArguments')); 9 var args = JSON.parse(chrome.getVariableValue('dialogArguments'));
10 var lastEmail = args.lastEmail; 10 var lastEmail = args.lastEmail;
11 var newEmail = args.newEmail; 11 var newEmail = args.newEmail;
12 $('dialogTitle').textContent = loadTimeData.getStringF( 12 $('dialogTitle').textContent = loadTimeData.getStringF(
13 'signinEmailConfirmationTitle', lastEmail); 13 'signinEmailConfirmationTitle', lastEmail);
14 $('createNewUserRadioButton').innerHTML = loadTimeData.getStringF( 14 $('createNewUserRadioButtonTitle').innerHTML = I18nBehavior.i18n(
15 'signinEmailConfirmationCreateProfileButtonTitle', newEmail); 15 'signinEmailConfirmationCreateProfileButtonTitle', newEmail);
16 $('startSyncRadioButton').innerHTML = loadTimeData.getStringF( 16 $('startSyncRadioButtonTitle').innerHTML = I18nBehavior.i18n(
17 'signinEmailConfirmationStartSyncButtonTitle', newEmail); 17 'signinEmailConfirmationStartSyncButtonTitle', newEmail);
18 18
19 document.addEventListener('keydown', onKeyDown); 19 document.addEventListener('keydown', onKeyDown);
20 $('confirmButton').addEventListener('click', onConfirm); 20 $('confirmButton').addEventListener('click', onConfirm);
21 $('closeButton').addEventListener('click', onCancel); 21 $('closeButton').addEventListener('click', onCancel);
22 } 22 }
23 23
24 function onKeyDown(e) { 24 function onKeyDown(e) {
25 // If the currently focused element isn't something that performs an action 25 // If the currently focused element isn't something that performs an action
26 // on "enter" being pressed and the user hits "enter", perform the default 26 // on "enter" being pressed and the user hits "enter", perform the default
(...skipping 22 matching lines...) Expand all
49 chrome.send('dialogClose', [JSON.stringify({'action': 'cancel'})]); 49 chrome.send('dialogClose', [JSON.stringify({'action': 'cancel'})]);
50 } 50 }
51 51
52 return { 52 return {
53 initialize: initialize, 53 initialize: initialize,
54 }; 54 };
55 }); 55 });
56 56
57 document.addEventListener('DOMContentLoaded', 57 document.addEventListener('DOMContentLoaded',
58 signin.emailConfirmation.initialize); 58 signin.emailConfirmation.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698