OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 /** | |
6 * @fileoverview Shared data between oobe and the login screens. These files | |
7 * are *not* used in the lock screen. If a file should also be used in the lock | |
8 * screen, added it to login_shared.js. | |
9 */ | |
10 | |
11 <include src="network_dropdown.js"> | |
12 | |
13 <include src="oobe_screen_reset_confirmation_overlay.js"> | |
14 <include src="oobe_screen_reset.js"> | |
15 <include src="oobe_screen_autolaunch.js"> | |
16 <include src="oobe_screen_enable_kiosk.js"> | |
17 <include src="oobe_screen_terms_of_service.js"> | |
18 <include src="oobe_screen_user_image.js"> | |
19 | |
20 <include src="screen_app_launch_splash.js"> | |
21 <include src="screen_error_message.js"> | |
22 <include src="screen_gaia_signin.js"> | |
23 <include src="screen_password_changed.js"> | |
24 <include src="screen_supervised_user_creation.js"> | |
25 <include src="screen_tpm_error.js"> | |
26 <include src="screen_wrong_hwid.js"> | |
27 <include src="screen_confirm_password.js"> | |
28 <include src="screen_fatal_error.js"> | |
29 <include src="screen_device_disabled.js"> | |
30 <include src="screen_unrecoverable_cryptohome_error.js"> | |
31 | |
32 // Allow selection events on components with editable text (password field) | |
33 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | |
34 disableTextSelectAndDrag(function(e) { | |
dzhioev (left Google)
2016/03/25 22:17:36
I think this should be done in login_shared.js, as
jdufault
2016/03/28 17:30:38
Done.
| |
35 var src = e.target; | |
36 return src instanceof HTMLTextAreaElement || | |
37 src instanceof HTMLInputElement && | |
38 /text|password|search/.test(src.type); | |
39 }); | |
40 | |
41 // Register assets for async loading. | |
42 [{ | |
43 id: SCREEN_OOBE_ENROLLMENT, | |
44 html: [{ url: 'chrome://oobe/enrollment.html', targetID: 'inner-container' }], | |
45 css: ['chrome://oobe/enrollment.css'], | |
46 js: ['chrome://oobe/enrollment.js'] | |
47 }].forEach(cr.ui.login.ResourceLoader.registerAssets); | |
48 | |
49 (function() { | |
50 'use strict'; | |
51 | |
52 document.addEventListener('DOMContentLoaded', function() { | |
53 // Immediately load async assets. | |
54 // TODO(dconnelly): remove this at some point and only load as needed. | |
55 // See crbug.com/236426 | |
56 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { | |
57 // This screen is async-loaded so we manually trigger i18n processing. | |
58 i18nTemplate.process($('oauth-enrollment'), loadTimeData); | |
59 // Delayed binding since this isn't defined yet. | |
60 login.OAuthEnrollmentScreen.register(); | |
61 }); | |
62 }); | |
63 })(); | |
OLD | NEW |