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

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

Issue 3089007: Fix a bug that the language list is not drawn properly. (Closed)
Patch Set: reorder 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 label.languageCode = inputMethod.languageCode; 93 label.languageCode = inputMethod.languageCode;
94 94
95 inputMethodList.appendChild(label); 95 inputMethodList.appendChild(label);
96 } 96 }
97 // Listen to pref change once the input method list is initialized. 97 // Listen to pref change once the input method list is initialized.
98 Preferences.getInstance().addEventListener(this.preloadEnginesPref, 98 Preferences.getInstance().addEventListener(this.preloadEnginesPref,
99 cr.bind(this.handlePreloadEnginesPrefChange_, this)); 99 cr.bind(this.handlePreloadEnginesPrefChange_, this));
100 }, 100 },
101 101
102 /** 102 /**
103 * Handles OptionsPage's visible property change event.
104 * @param {Event} e Property change event.
105 * @private
106 */
107 handleVisibleChange_: function(e) {
108 if (!this.languageListInitalized_ && this.visible) {
109 this.languageListInitalized_ = true;
110 $('language-options-list').redraw();
111 }
112 },
113
114 /**
103 * Handles languageOptionsList's change event. 115 * Handles languageOptionsList's change event.
104 * @param {Event} e Change event. 116 * @param {Event} e Change event.
105 * @private 117 * @private
106 */ 118 */
107 handleLanguageOptionsListChange_: function(e) { 119 handleLanguageOptionsListChange_: function(e) {
108 var languageOptionsList = $('language-options-list'); 120 var languageOptionsList = $('language-options-list');
109 var index = languageOptionsList.selectionModel.selectedIndex; 121 var index = languageOptionsList.selectionModel.selectedIndex;
110 if (index == -1) 122 if (index == -1)
111 return; 123 return;
112 124
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // from UX. 363 // from UX.
352 alert(localStrings.getString('restart_required')); 364 alert(localStrings.getString('restart_required'));
353 }; 365 };
354 366
355 // Export 367 // Export
356 return { 368 return {
357 LanguageOptions: LanguageOptions 369 LanguageOptions: LanguageOptions
358 }; 370 };
359 371
360 }); 372 });
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