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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_network.js

Issue 11421111: Fixed button focusing in OOBE screens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed old code. Created 8 years 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 | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * @fileoverview Oobe network screen implementation. 6 * @fileoverview Oobe network screen implementation.
7 */ 7 */
8 8
9 cr.define('oobe', function() { 9 cr.define('oobe', function() {
10 /** 10 /**
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 var continueButton = this.ownerDocument.createElement('button'); 71 var continueButton = this.ownerDocument.createElement('button');
72 continueButton.id = 'continue-button'; 72 continueButton.id = 'continue-button';
73 continueButton.textContent = localStrings.getString('continueButton'); 73 continueButton.textContent = localStrings.getString('continueButton');
74 continueButton.addEventListener('click', function(e) { 74 continueButton.addEventListener('click', function(e) {
75 chrome.send('networkOnExit'); 75 chrome.send('networkOnExit');
76 e.stopPropagation(); 76 e.stopPropagation();
77 }); 77 });
78 buttons.push(continueButton); 78 buttons.push(continueButton);
79 79
80 return buttons; 80 return buttons;
81 },
82
83 /**
84 * Returns a control which should receive an initial focus.
85 */
86 get defaultControl() {
87 return $('language-select');
81 } 88 }
82 }; 89 };
83 90
84 /** 91 /**
85 * Shows the network error message. 92 * Shows the network error message.
86 * @param {string} message Message to be shown. 93 * @param {string} message Message to be shown.
87 */ 94 */
88 NetworkScreen.showError = function(message) { 95 NetworkScreen.showError = function(message) {
89 var error = document.createElement('div'); 96 var error = document.createElement('div');
90 var messageDiv = document.createElement('div'); 97 var messageDiv = document.createElement('div');
91 messageDiv.className = 'error-message'; 98 messageDiv.className = 'error-message';
92 messageDiv.textContent = message; 99 messageDiv.textContent = message;
93 error.appendChild(messageDiv); 100 error.appendChild(messageDiv);
94 101
95 $('bubble').showContentForElement($('networks-list'), 102 $('bubble').showContentForElement($('networks-list'),
96 cr.ui.Bubble.Attachment.BOTTOM, 103 cr.ui.Bubble.Attachment.BOTTOM,
97 error); 104 error);
98 }; 105 };
99 106
100 return { 107 return {
101 NetworkScreen: NetworkScreen 108 NetworkScreen: NetworkScreen
102 }; 109 };
103 }); 110 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698