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

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

Issue 8502042: Sync Promo: Fix up focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | no next file » | 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) 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 // TODO(sail): Refactor options_page and remove this include. 5 // TODO(sail): Refactor options_page and remove this include.
6 <include src="options/options_page.js"/> 6 <include src="options/options_page.js"/>
7 <include src="sync_setup_overlay.js"/> 7 <include src="sync_setup_overlay.js"/>
8 8
9 cr.define('sync_promo', function() { 9 cr.define('sync_promo', function() {
10 /** 10 /**
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 $('confirm-everything-cancel').addEventListener('click', cancelFunc); 137 $('confirm-everything-cancel').addEventListener('click', cancelFunc);
138 $('choose-datatypes-cancel').addEventListener('click', cancelFunc); 138 $('choose-datatypes-cancel').addEventListener('click', cancelFunc);
139 139
140 this.infographic_ = $('promo-infographic'); 140 this.infographic_ = $('promo-infographic');
141 this.learnMore_ = $('promo-information'); 141 this.learnMore_ = $('promo-information');
142 142
143 this.infographic_.addEventListener('webkitTransitionEnd', 143 this.infographic_.addEventListener('webkitTransitionEnd',
144 this.toggleHidden_.bind(this)); 144 this.toggleHidden_.bind(this));
145 this.learnMore_.addEventListener('webkitTransitionEnd', 145 this.learnMore_.addEventListener('webkitTransitionEnd',
146 this.toggleHidden_.bind(this)); 146 this.toggleHidden_.bind(this));
147
148 // Start the page focused on the email/username field.
149 $('gaia-email').focus();
sail 2011/11/09 01:54:39 I don't think this is the correct fix. sync_setup
150
151 // Fix tab order for only the sync promo by breaking the byte order and
152 // putting the learn more button on top via [tabindex].
153 $('promo-learn-more-show').tabIndex = 1;
154 $('promo-learn-more-hide').tabIndex = 1;
147 }, 155 },
148 156
149 /** 157 /**
150 * Remove the [hidden] attribute from the node that was not previously 158 * Remove the [hidden] attribute from the node that was not previously
151 * transitioning. 159 * transitioning.
152 * @param {Event} e A -webkit-transition end event. 160 * @param {Event} e A -webkit-transition end event.
153 * @private 161 * @private
154 */ 162 */
155 toggleHidden_: function(e) { 163 toggleHidden_: function(e) {
156 // Only show the other element if the target of this event was hidden 164 // Only show the other element if the target of this event was hidden
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 239
232 // Export 240 // Export
233 return { 241 return {
234 SyncPromo : SyncPromo 242 SyncPromo : SyncPromo
235 }; 243 };
236 }); 244 });
237 245
238 var OptionsPage = options.OptionsPage; 246 var OptionsPage = options.OptionsPage;
239 var SyncSetupOverlay = sync_promo.SyncPromo; 247 var SyncSetupOverlay = sync_promo.SyncPromo;
240 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); 248 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698