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

Side by Side Diff: chrome/browser/resources/chromeos/login/login.js

Issue 12221143: Set default control on Terms of Service screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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) 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 /** 5 /**
6 * @fileoverview Login UI based on a stripped down OOBE controller. 6 * @fileoverview Login UI based on a stripped down OOBE controller.
7 * TODO(xiyuan): Refactoring this to get a better structure. 7 * TODO(xiyuan): Refactoring this to get a better structure.
8 */ 8 */
9 9
10 var localStrings = new LocalStrings(); 10 var localStrings = new LocalStrings();
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 Oobe.setTermsOfServiceLoadError = function() { 251 Oobe.setTermsOfServiceLoadError = function() {
252 $('terms-of-service').classList.remove('tos-loading'); 252 $('terms-of-service').classList.remove('tos-loading');
253 $('terms-of-service').classList.add('error'); 253 $('terms-of-service').classList.add('error');
254 }; 254 };
255 255
256 /** 256 /**
257 * Displays the given |termsOfService| on the Terms of Service screen. 257 * Displays the given |termsOfService| on the Terms of Service screen.
258 * @param {string} termsOfService The terms of service, as plain text. 258 * @param {string} termsOfService The terms of service, as plain text.
259 */ 259 */
260 Oobe.setTermsOfService = function(termsOfService) { 260 Oobe.setTermsOfService = function(termsOfService) {
261 $('terms-of-service').classList.remove('tos-loading'); 261 oobe.TermsOfServiceScreen.setTermsOfService(termsOfService);
262 $('tos-content-main').textContent = termsOfService;
263 $('tos-accept-button').disabled = false;
264 }; 262 };
265 263
266 // Export 264 // Export
267 return { 265 return {
268 Oobe: Oobe 266 Oobe: Oobe
269 }; 267 };
270 }); 268 });
271 269
272 var Oobe = cr.ui.Oobe; 270 var Oobe = cr.ui.Oobe;
273 271
274 // Allow selection events on components with editable text (password field) 272 // Allow selection events on components with editable text (password field)
275 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) 273 // bug (http://code.google.com/p/chromium/issues/detail?id=125863)
276 disableTextSelectAndDrag(function(e) { 274 disableTextSelectAndDrag(function(e) {
277 var src = e.target; 275 var src = e.target;
278 return src instanceof HTMLTextAreaElement || 276 return src instanceof HTMLTextAreaElement ||
279 src instanceof HTMLInputElement && 277 src instanceof HTMLInputElement &&
280 /text|password|search/.test(src.type); 278 /text|password|search/.test(src.type);
281 }); 279 });
282 280
283 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); 281 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698