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

Unified Diff: chrome/browser/resources/chromeos/oobe.js

Issue 7329018: [cros] Fixes hanging on the OOBE's network screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -debug Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/oobe.js
diff --git a/chrome/browser/resources/chromeos/oobe.js b/chrome/browser/resources/chromeos/oobe.js
index 147bbabe571c1f20b40552ade229e051d7de7d50..53d313090f85fb07bb48aad90e9ab8770613aabf 100644
--- a/chrome/browser/resources/chromeos/oobe.js
+++ b/chrome/browser/resources/chromeos/oobe.js
@@ -78,7 +78,8 @@ cr.define('cr.ui', function() {
* Setups given "select" element using the list and adds callback.
* @param {!Element} select Select object to be updated.
* @param {!Object} list List of the options to be added.
- * @param {string} callback Callback name which should be send to Chrome.
+ * @param {string} callback Callback name which should be send to Chrome or
+ * an empty string if the event listener shouldn't be added.
*/
Oobe.setupSelect = function(select, list, callback) {
select.options.length = 0;
@@ -88,9 +89,11 @@ cr.define('cr.ui', function() {
new Option(item.title, item.value, item.selected, item.selected);
select.appendChild(option);
}
- select.addEventListener('change', function(event) {
- chrome.send(callback, [select.options[select.selectedIndex].value]);
- });
+ if (callback) {
+ select.addEventListener('change', function(event) {
+ chrome.send(callback, [select.options[select.selectedIndex].value]);
+ });
+ }
}
/**
@@ -233,13 +236,11 @@ cr.define('cr.ui', function() {
*/
Oobe.reloadContent = function(data) {
i18nTemplate.process(document, data);
- // Also update language and input methods lists.
- Oobe.setupSelect($('language-select'),
- data.languageList,
- 'networkOnLanguageChanged');
- Oobe.setupSelect($('keyboard-select'),
- data.inputMethodsList,
- 'networkOnInputMethodChanged');
+ // Update language and input method menu lists.
+ Oobe.setupSelect($('language-select'), data.languageList, '');
+ Oobe.setupSelect($('keyboard-select'), data.inputMethodsList, '');
+ // Update the network control position.
+ Oobe.refreshNetworkControl();
}
// Export
« no previous file with comments | « chrome/browser/resources/chromeos/oobe.css ('k') | chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698