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 // TODO(kochi): Generalize the notification as a component and put it | 5 // TODO(kochi): Generalize the notification as a component and put it |
6 // in js/cr/ui/notification.js . | 6 // in js/cr/ui/notification.js . |
7 | 7 |
8 cr.define('options', function() { | 8 cr.define('options', function() { |
9 /** @const */ var OptionsPage = options.OptionsPage; | 9 /** @const */ var OptionsPage = options.OptionsPage; |
10 /** @const */ var LanguageList = options.LanguageList; | 10 /** @const */ var LanguageList = options.LanguageList; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 if (cr.isChromeOS) { | 114 if (cr.isChromeOS) { |
115 $('language-options-ui-restart-button').onclick = | 115 $('language-options-ui-restart-button').onclick = |
116 chrome.send.bind(chrome, 'uiLanguageRestart'); | 116 chrome.send.bind(chrome, 'uiLanguageRestart'); |
117 } | 117 } |
118 | 118 |
119 $('language-confirm').onclick = | 119 $('language-confirm').onclick = |
120 OptionsPage.closeOverlay.bind(OptionsPage); | 120 OptionsPage.closeOverlay.bind(OptionsPage); |
121 | |
122 // Listen to user clicks on the "Change touch keyboard settings..." | |
123 // button (if it exists). | |
124 var virtualKeyboardButton = $('language-options-virtual-keyboard'); | |
125 if (virtualKeyboardButton) { | |
126 // TODO(yusukes): would be better to hide the button if no virtual | |
127 // keyboard is registered. | |
128 virtualKeyboardButton.onclick = function(e) { | |
129 OptionsPage.navigateToPage('virtualKeyboards'); | |
130 }; | |
131 } | |
132 }, | 121 }, |
133 | 122 |
134 // The preference is a boolean that enables/disables spell checking. | 123 // The preference is a boolean that enables/disables spell checking. |
135 enableSpellCheckPref: 'browser.enable_spellchecking', | 124 enableSpellCheckPref: 'browser.enable_spellchecking', |
136 // The preference is a CSV string that describes preload engines | 125 // The preference is a CSV string that describes preload engines |
137 // (i.e. active input methods). | 126 // (i.e. active input methods). |
138 preloadEnginesPref: 'settings.language.preload_engines', | 127 preloadEnginesPref: 'settings.language.preload_engines', |
139 // The list of preload engines, like ['mozc', 'pinyin']. | 128 // The list of preload engines, like ['mozc', 'pinyin']. |
140 preloadEngines_: [], | 129 preloadEngines_: [], |
141 // The preference is a string that describes the spell check | 130 // The preference is a string that describes the spell check |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 // only take effect after restart. | 842 // only take effect after restart. |
854 showMutuallyExclusiveNodes([$('language-options-ui-language-button'), | 843 showMutuallyExclusiveNodes([$('language-options-ui-language-button'), |
855 $('language-options-ui-notification-bar')], 1); | 844 $('language-options-ui-notification-bar')], 1); |
856 }; | 845 }; |
857 | 846 |
858 // Export | 847 // Export |
859 return { | 848 return { |
860 LanguageOptions: LanguageOptions | 849 LanguageOptions: LanguageOptions |
861 }; | 850 }; |
862 }); | 851 }); |
OLD | NEW |