| 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 <include src="keyboard_overlay_data.js"/> | 5 <include src="keyboard_overlay_data.js"/> |
| 6 <include src="keyboard_overlay_accessibility_helper.js"/> | 6 <include src="keyboard_overlay_accessibility_helper.js"/> |
| 7 | 7 |
| 8 var BASE_KEYBOARD = { | 8 var BASE_KEYBOARD = { |
| 9 top: 0, | 9 top: 0, |
| 10 left: 0, | 10 left: 0, |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 keyText.textContent = keyTextValue; | 432 keyText.textContent = keyTextValue; |
| 433 | 433 |
| 434 var shortcutText = $(shortcutTextId(identifier, i)); | 434 var shortcutText = $(shortcutTextId(identifier, i)); |
| 435 if (shortcutId) { | 435 if (shortcutId) { |
| 436 shortcutText.style.visibility = 'visible'; | 436 shortcutText.style.visibility = 'visible'; |
| 437 shortcutText.textContent = loadTimeData.getString(shortcutId); | 437 shortcutText.textContent = loadTimeData.getString(shortcutId); |
| 438 } else { | 438 } else { |
| 439 shortcutText.style.visibility = 'hidden'; | 439 shortcutText.style.visibility = 'hidden'; |
| 440 } | 440 } |
| 441 | 441 |
| 442 if (keyData.format) { | 442 var format = keyboardGlyphData.keys[layout[i][0]].format; |
| 443 var format = keyData.format; | 443 if (format) { |
| 444 if (format == 'left' || format == 'right') { | 444 if (format == 'left' || format == 'right') { |
| 445 shortcutText.style.textAlign = format; | 445 shortcutText.style.textAlign = format; |
| 446 keyText.style.textAlign = format; | 446 keyText.style.textAlign = format; |
| 447 } | 447 } |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 | 451 |
| 452 /** | 452 /** |
| 453 * A callback function for onkeydown and onkeyup events. | 453 * A callback function for onkeydown and onkeyup events. |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 * Handles click events of the learn more link. | 687 * Handles click events of the learn more link. |
| 688 * @param {Event} e Mouse click event. | 688 * @param {Event} e Mouse click event. |
| 689 */ | 689 */ |
| 690 function learnMoreClicked(e) { | 690 function learnMoreClicked(e) { |
| 691 chrome.send('openLearnMorePage'); | 691 chrome.send('openLearnMorePage'); |
| 692 chrome.send('DialogClose'); | 692 chrome.send('DialogClose'); |
| 693 e.preventDefault(); | 693 e.preventDefault(); |
| 694 } | 694 } |
| 695 | 695 |
| 696 document.addEventListener('DOMContentLoaded', init); | 696 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |