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

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

Issue 209143002: Added shortcut for NW config screen in kiosk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 9 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 | 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 Offline message screen implementation. 6 * @fileoverview Offline message screen implementation.
7 */ 7 */
8 8
9 login.createScreen('ErrorMessageScreen', 'error-message', function() { 9 login.createScreen('ErrorMessageScreen', 'error-message', function() {
10 // Link which starts guest session for captive portal fixing. 10 // Link which starts guest session for captive portal fixing.
(...skipping 22 matching lines...) Expand all
33 33
34 // The help topic linked from the auto enrollment error message. 34 // The help topic linked from the auto enrollment error message.
35 /** @const */ var HELP_TOPIC_AUTO_ENROLLMENT = 4632009; 35 /** @const */ var HELP_TOPIC_AUTO_ENROLLMENT = 4632009;
36 36
37 // Possible error states of the screen. 37 // Possible error states of the screen.
38 /** @const */ var ERROR_STATE = { 38 /** @const */ var ERROR_STATE = {
39 UNKNOWN: 'error-state-unknown', 39 UNKNOWN: 'error-state-unknown',
40 PORTAL: 'error-state-portal', 40 PORTAL: 'error-state-portal',
41 OFFLINE: 'error-state-offline', 41 OFFLINE: 'error-state-offline',
42 PROXY: 'error-state-proxy', 42 PROXY: 'error-state-proxy',
43 AUTH_EXT_TIMEOUT: 'error-state-auth-ext-timeout' 43 AUTH_EXT_TIMEOUT: 'error-state-auth-ext-timeout',
44 KIOSK_ONLINE: 'error-state-kiosk-online'
44 }; 45 };
45 46
46 // Possible error states of the screen. Must be in the same order as 47 // Possible error states of the screen. Must be in the same order as
47 // ErrorScreen::ErrorState enum values. 48 // ErrorScreen::ErrorState enum values.
48 /** @const */ var ERROR_STATES = [ 49 /** @const */ var ERROR_STATES = [
49 ERROR_STATE.UNKNOWN, 50 ERROR_STATE.UNKNOWN,
50 ERROR_STATE.PORTAL, 51 ERROR_STATE.PORTAL,
51 ERROR_STATE.OFFLINE, 52 ERROR_STATE.OFFLINE,
52 ERROR_STATE.PROXY, 53 ERROR_STATE.PROXY,
53 ERROR_STATE.AUTH_EXT_TIMEOUT 54 ERROR_STATE.AUTH_EXT_TIMEOUT,
55 ERROR_STATE.KIOSK_ONLINE
54 ]; 56 ];
55 57
56 return { 58 return {
57 EXTERNAL_API: [ 59 EXTERNAL_API: [
58 'updateLocalizedContent', 60 'updateLocalizedContent',
59 'onBeforeShow', 61 'onBeforeShow',
60 'onBeforeHide', 62 'onBeforeHide',
61 'allowGuestSignin', 63 'allowGuestSignin',
62 'allowOfflineLogin', 64 'allowOfflineLogin',
63 'setUIState', 65 'setUIState',
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 /** 191 /**
190 * Buttons in oobe wizard's button strip. 192 * Buttons in oobe wizard's button strip.
191 * @type {array} Array of Buttons. 193 * @type {array} Array of Buttons.
192 */ 194 */
193 get buttons() { 195 get buttons() {
194 var buttons = []; 196 var buttons = [];
195 197
196 var rebootButton = this.ownerDocument.createElement('button'); 198 var rebootButton = this.ownerDocument.createElement('button');
197 rebootButton.textContent = loadTimeData.getString('rebootButton'); 199 rebootButton.textContent = loadTimeData.getString('rebootButton');
198 rebootButton.classList.add('show-with-ui-state-kiosk-mode'); 200 rebootButton.classList.add('show-with-ui-state-kiosk-mode');
201 rebootButton.classList.add('show-with-error-state-kiosk-online');
xiyuan 2014/03/25 05:21:19 Do we need this line? When error screen shows up d
zel 2014/03/25 22:26:32 Done.
199 rebootButton.addEventListener('click', function(e) { 202 rebootButton.addEventListener('click', function(e) {
200 chrome.send('rebootButtonClicked'); 203 chrome.send('rebootButtonClicked');
201 e.stopPropagation(); 204 e.stopPropagation();
202 }); 205 });
203 buttons.push(rebootButton); 206 buttons.push(rebootButton);
204 207
205 var diagnoseButton = this.ownerDocument.createElement('button'); 208 var diagnoseButton = this.ownerDocument.createElement('button');
206 diagnoseButton.textContent = loadTimeData.getString('diagnoseButton'); 209 diagnoseButton.textContent = loadTimeData.getString('diagnoseButton');
207 diagnoseButton.classList.add('show-with-ui-state-kiosk-mode'); 210 diagnoseButton.classList.add('show-with-ui-state-kiosk-mode');
211 diagnoseButton.classList.add('show-with-error-state-kiosk-online');
208 diagnoseButton.addEventListener('click', function(e) { 212 diagnoseButton.addEventListener('click', function(e) {
209 chrome.send('diagnoseButtonClicked'); 213 chrome.send('diagnoseButtonClicked');
210 e.stopPropagation(); 214 e.stopPropagation();
211 }); 215 });
212 buttons.push(diagnoseButton); 216 buttons.push(diagnoseButton);
213 217
214 var certsButton = this.ownerDocument.createElement('button'); 218 var certsButton = this.ownerDocument.createElement('button');
215 certsButton.textContent = loadTimeData.getString('configureCertsButton'); 219 certsButton.textContent = loadTimeData.getString('configureCertsButton');
216 certsButton.classList.add('show-with-ui-state-kiosk-mode'); 220 certsButton.classList.add('show-with-ui-state-kiosk-mode');
221 certsButton.classList.add('show-with-error-state-kiosk-online');
217 certsButton.addEventListener('click', function(e) { 222 certsButton.addEventListener('click', function(e) {
218 chrome.send('configureCertsClicked'); 223 chrome.send('configureCertsClicked');
219 e.stopPropagation(); 224 e.stopPropagation();
220 }); 225 });
221 buttons.push(certsButton); 226 buttons.push(certsButton);
222 227
228 var continueButton = this.ownerDocument.createElement('button');
229 continueButton.id = 'continue-network-config-btn';
230 continueButton.textContent = loadTimeData.getString('continueButton');
231 continueButton.classList.add('show-with-error-state-kiosk-online');
232 continueButton.addEventListener('click', function(e) {
233 chrome.send('continueAppLaunch');
234 e.stopPropagation();
235 });
236 buttons.push(continueButton);
237
223 var spacer = this.ownerDocument.createElement('div'); 238 var spacer = this.ownerDocument.createElement('div');
224 spacer.classList.add('button-spacer'); 239 spacer.classList.add('button-spacer');
225 spacer.classList.add('show-with-ui-state-kiosk-mode'); 240 spacer.classList.add('show-with-ui-state-kiosk-mode');
226 buttons.push(spacer); 241 buttons.push(spacer);
227 242
228 var powerwashButton = this.ownerDocument.createElement('button'); 243 var powerwashButton = this.ownerDocument.createElement('button');
229 powerwashButton.id = 'error-message-restart-and-powerwash-button'; 244 powerwashButton.id = 'error-message-restart-and-powerwash-button';
230 powerwashButton.textContent = 245 powerwashButton.textContent =
231 loadTimeData.getString('localStateErrorPowerwashButton'); 246 loadTimeData.getString('localStateErrorPowerwashButton');
232 powerwashButton.classList.add('show-with-ui-state-local-state-error'); 247 powerwashButton.classList.add('show-with-ui-state-local-state-error');
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 /** 338 /**
324 * Updates visibility of the label indicating we're reconnecting. 339 * Updates visibility of the label indicating we're reconnecting.
325 * @param {boolean} show Whether the label should be shown. 340 * @param {boolean} show Whether the label should be shown.
326 */ 341 */
327 showConnectingIndicator: function(show) { 342 showConnectingIndicator: function(show) {
328 this.classList.toggle('show-connecting-indicator', show); 343 this.classList.toggle('show-connecting-indicator', show);
329 this.onContentChange_(); 344 this.onContentChange_();
330 } 345 }
331 }; 346 };
332 }); 347 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698