Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: chrome/browser/resources/options/chromeos_language_options.js

Issue 3054046: One line fix for a bug that broke the input method list (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 const OptionsPage = options.OptionsPage; 7 const OptionsPage = options.OptionsPage;
8 const AddLanguageOverlay = options.language.AddLanguageOverlay; 8 const AddLanguageOverlay = options.language.AddLanguageOverlay;
9 const LanguageList = options.language.LanguageList; 9 const LanguageList = options.language.LanguageList;
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 */ 106 */
107 handleLanguageOptionsListChange_: function(e) { 107 handleLanguageOptionsListChange_: function(e) {
108 var languageOptionsList = $('language-options-list'); 108 var languageOptionsList = $('language-options-list');
109 var index = languageOptionsList.selectionModel.selectedIndex; 109 var index = languageOptionsList.selectionModel.selectedIndex;
110 if (index == -1) 110 if (index == -1)
111 return; 111 return;
112 112
113 var languageCode = languageOptionsList.getLanguageCodes()[index]; 113 var languageCode = languageOptionsList.getLanguageCodes()[index];
114 this.updateSelectedLanguageName_(languageCode); 114 this.updateSelectedLanguageName_(languageCode);
115 this.updateUiLanguageButton_(languageCode); 115 this.updateUiLanguageButton_(languageCode);
116 this.updateInputMethodList_(); 116 this.updateInputMethodList_(languageCode);
117 this.updateLanguageListInAddLanguageOverlay_(); 117 this.updateLanguageListInAddLanguageOverlay_();
118 }, 118 },
119 119
120 /** 120 /**
121 * Updates the currently selected language name. 121 * Updates the currently selected language name.
122 * @param {string} languageCode Language code (ex. "fr"). 122 * @param {string} languageCode Language code (ex. "fr").
123 * @private 123 * @private
124 */ 124 */
125 updateSelectedLanguageName_: function(languageCode) { 125 updateSelectedLanguageName_: function(languageCode) {
126 var languageDisplayName = LanguageList.getDisplayNameFromLanguageCode( 126 var languageDisplayName = LanguageList.getDisplayNameFromLanguageCode(
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // from UX. 351 // from UX.
352 alert(localStrings.getString('restart_required')); 352 alert(localStrings.getString('restart_required'));
353 }; 353 };
354 354
355 // Export 355 // Export
356 return { 356 return {
357 LanguageOptions: LanguageOptions 357 LanguageOptions: LanguageOptions
358 }; 358 };
359 359
360 }); 360 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698