| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Encapsulated handling of the keyboard overlay. | 8 * Encapsulated handling of the keyboard overlay. |
| 9 * @constructor | 9 * @constructor |
| 10 */ | 10 */ |
| 11 function KeyboardOverlay() { | 11 function KeyboardOverlay() { |
| 12 options.SettingsDialog.call(this, 'keyboard-overlay', | 12 options.SettingsDialog.call(this, 'keyboard-overlay', |
| 13 loadTimeData.getString('keyboardOverlayTitle'), | 13 loadTimeData.getString('keyboardOverlayTitle'), |
| 14 'keyboard-overlay', | 14 'keyboard-overlay', |
| 15 $('keyboard-confirm'), $('keyboard-cancel')); | 15 $('keyboard-confirm'), $('keyboard-cancel')); |
| 16 } | 16 } |
| 17 | 17 |
| 18 cr.addSingletonGetter(KeyboardOverlay); | 18 cr.addSingletonGetter(KeyboardOverlay); |
| 19 | 19 |
| 20 KeyboardOverlay.prototype = { | 20 KeyboardOverlay.prototype = { |
| 21 __proto__: options.SettingsDialog.prototype, | 21 __proto__: options.SettingsDialog.prototype, |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Initializes the page. This method is called in initialize. |
| 25 */ |
| 26 initializePage: function() { |
| 27 options.SettingsDialog.prototype.initializePage.call(this); |
| 28 |
| 29 $('languages-and-input-settings').onclick = function(e) { |
| 30 OptionsPage.navigateToPage('languages'); |
| 31 }; |
| 32 }, |
| 33 |
| 34 /** |
| 24 * Show/hide the caps lock remapping section. | 35 * Show/hide the caps lock remapping section. |
| 25 * @private | 36 * @private |
| 26 */ | 37 */ |
| 27 showCapsLockOptions_: function(show) { | 38 showCapsLockOptions_: function(show) { |
| 28 $('caps-lock-remapping-section').hidden = !show; | 39 $('caps-lock-remapping-section').hidden = !show; |
| 29 }, | 40 }, |
| 30 | 41 |
| 31 /** | 42 /** |
| 32 * Show/hide the function key remapping section. | 43 * Show/hide the function key remapping section. |
| 33 * @private | 44 * @private |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 var instance = KeyboardOverlay.getInstance(); | 57 var instance = KeyboardOverlay.getInstance(); |
| 47 return instance[name + '_'].apply(instance, arguments); | 58 return instance[name + '_'].apply(instance, arguments); |
| 48 }; | 59 }; |
| 49 }); | 60 }); |
| 50 | 61 |
| 51 // Export | 62 // Export |
| 52 return { | 63 return { |
| 53 KeyboardOverlay: KeyboardOverlay | 64 KeyboardOverlay: KeyboardOverlay |
| 54 }; | 65 }; |
| 55 }); | 66 }); |
| OLD | NEW |