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

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

Issue 10166004: Added a message that suggest to configure a proxy for a network. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed license header. Created 8 years, 8 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
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 cr.define('login', function() { 9 cr.define('login', function() {
10 // Screens that should have offline message overlay. 10 // Screens that should have offline message overlay.
(...skipping 16 matching lines...) Expand all
27 }; 27 };
28 28
29 // Frame loading errors. 29 // Frame loading errors.
30 var NET_ERROR = { 30 var NET_ERROR = {
31 ABORTED_BY_USER: 3 31 ABORTED_BY_USER: 3
32 }; 32 };
33 33
34 // Link which starts guest session for captive portal fixing. 34 // Link which starts guest session for captive portal fixing.
35 /** @const */ var FIX_CAPTIVE_PORTAL_ID = 'captive-portal-fix-link'; 35 /** @const */ var FIX_CAPTIVE_PORTAL_ID = 'captive-portal-fix-link';
36 36
37 /** @const */ var FIX_PROXY_SETTINGS_ID = 'proxy-settings-fix-link';
38
37 // Id of the element which holds current network name. 39 // Id of the element which holds current network name.
38 /** @const */ var CURRENT_NETWORK_NAME_ID = 'captive-portal-network-name'; 40 /** @const */ var CURRENT_NETWORK_NAME_ID = 'captive-portal-network-name';
39 41
40 // Link which triggers frame reload. 42 // Link which triggers frame reload.
41 /** @const */ var RELOAD_PAGE_ID = 'proxy-error-retry-link'; 43 /** @const */ var RELOAD_PAGE_ID = 'proxy-error-retry-link';
42 44
43 /** 45 /**
44 * Creates a new offline message screen div. 46 * Creates a new offline message screen div.
45 * @constructor 47 * @constructor
46 * @extends {HTMLDivElement} 48 * @extends {HTMLDivElement}
(...skipping 29 matching lines...) Expand all
76 updateLocalizedContent_: function() { 78 updateLocalizedContent_: function() {
77 $('captive-portal-message-text').innerHTML = localStrings.getStringF( 79 $('captive-portal-message-text').innerHTML = localStrings.getStringF(
78 'captivePortalMessage', 80 'captivePortalMessage',
79 '<b id="' + CURRENT_NETWORK_NAME_ID + '"></b>', 81 '<b id="' + CURRENT_NETWORK_NAME_ID + '"></b>',
80 '<a id="' + FIX_CAPTIVE_PORTAL_ID + '" class="signin-link" href="#">', 82 '<a id="' + FIX_CAPTIVE_PORTAL_ID + '" class="signin-link" href="#">',
81 '</a>'); 83 '</a>');
82 $(FIX_CAPTIVE_PORTAL_ID).onclick = function() { 84 $(FIX_CAPTIVE_PORTAL_ID).onclick = function() {
83 chrome.send('showCaptivePortal'); 85 chrome.send('showCaptivePortal');
84 }; 86 };
85 87
88 $('captive-portal-proxy-message-text').innerHTML =
89 localStrings.getStringF(
90 'captivePortalProxyMessage',
91 '<a id="' + FIX_PROXY_SETTINGS_ID + '" class="signin-link" href="#">',
92 '</a>');
93 $(FIX_PROXY_SETTINGS_ID).onclick = function() {
94 chrome.send('openProxySettings');
95 };
96
86 $('proxy-message-text').innerHTML = localStrings.getStringF( 97 $('proxy-message-text').innerHTML = localStrings.getStringF(
87 'proxyMessageText', 98 'proxyMessageText',
88 '<a id="' + RELOAD_PAGE_ID + '" class="signin-link" href="#">', 99 '<a id="' + RELOAD_PAGE_ID + '" class="signin-link" href="#">',
89 '</a>'); 100 '</a>');
90 $(RELOAD_PAGE_ID).onclick = function() { 101 $(RELOAD_PAGE_ID).onclick = function() {
91 var currentScreen = Oobe.getInstance().currentScreen; 102 var currentScreen = Oobe.getInstance().currentScreen;
92 // Schedules a immediate retry. 103 // Schedules a immediate retry.
93 currentScreen.doReload(); 104 currentScreen.doReload();
94 }; 105 };
95 106
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 * via template. 342 * via template.
332 */ 343 */
333 ErrorMessageScreen.updateLocalizedContent = function() { 344 ErrorMessageScreen.updateLocalizedContent = function() {
334 $('error-message').updateLocalizedContent_(); 345 $('error-message').updateLocalizedContent_();
335 }; 346 };
336 347
337 return { 348 return {
338 ErrorMessageScreen: ErrorMessageScreen 349 ErrorMessageScreen: ErrorMessageScreen
339 }; 350 };
340 }); 351 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698