OLD | NEW |
---|---|
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 Out of the box experience flow (OOBE). | 6 * @fileoverview Out of the box experience flow (OOBE). |
7 * This is the main code for the OOBE WebUI implementation. | 7 * This is the main code for the OOBE WebUI implementation. |
8 */ | 8 */ |
9 | 9 |
10 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 $('security-ok-button').focus(); | 86 $('security-ok-button').focus(); |
87 }); | 87 }); |
88 $('security-tpm-link').addEventListener('click', function(event) { | 88 $('security-tpm-link').addEventListener('click', function(event) { |
89 chrome.send('eulaOnTpmPopupOpened'); | 89 chrome.send('eulaOnTpmPopupOpened'); |
90 $('popup-overlay').hidden = false; | 90 $('popup-overlay').hidden = false; |
91 $('security-ok-button').focus(); | 91 $('security-ok-button').focus(); |
92 }); | 92 }); |
93 | 93 |
94 Oobe.initializeA11yMenu(); | 94 Oobe.initializeA11yMenu(); |
95 | 95 |
96 $('security-ok-button').addEventListener('click', function(event) { | |
97 $('popup-overlay').hidden = true; | |
Nikita (slow)
2012/11/29 16:08:11
Why did you remove this part? Dialog could not be
mtomasz
2012/11/29 19:04:28
Done.
| |
98 }); | |
99 // Do not allow focus leaving the overlay. | 96 // Do not allow focus leaving the overlay. |
100 $('popup-overlay').addEventListener('focusout', function(event) { | 97 $('popup-overlay').addEventListener('focusout', function(event) { |
101 // WebKit does not allow immediate focus return. | 98 // WebKit does not allow immediate focus return. |
102 setTimeout(function() { $('security-ok-button').focus(); }, 0); | 99 setTimeout(function() { $('security-ok-button').focus(); }, 0); |
103 event.preventDefault(); | 100 event.preventDefault(); |
104 }); | 101 }); |
105 | 102 |
106 chrome.send('screenStateInitialize'); | 103 chrome.send('screenStateInitialize'); |
107 }; | 104 }; |
108 | 105 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 // Allow selection events on components with editable text (password field) | 450 // Allow selection events on components with editable text (password field) |
454 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 451 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
455 disableTextSelectAndDrag(function(e) { | 452 disableTextSelectAndDrag(function(e) { |
456 var src = e.target; | 453 var src = e.target; |
457 return src instanceof HTMLTextAreaElement || | 454 return src instanceof HTMLTextAreaElement || |
458 src instanceof HTMLInputElement && | 455 src instanceof HTMLInputElement && |
459 /text|password|search/.test(src.type); | 456 /text|password|search/.test(src.type); |
460 }); | 457 }); |
461 | 458 |
462 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 459 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
OLD | NEW |