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

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

Issue 7646015: [oobe] Show error notification on the network screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 continueButton.textContent = localStrings.getString('continueButton'); 346 continueButton.textContent = localStrings.getString('continueButton');
347 continueButton.addEventListener('click', function(e) { 347 continueButton.addEventListener('click', function(e) {
348 chrome.send('networkOnExit', []); 348 chrome.send('networkOnExit', []);
349 }); 349 });
350 buttons.push(continueButton); 350 buttons.push(continueButton);
351 351
352 return buttons; 352 return buttons;
353 } 353 }
354 }; 354 };
355 355
356 /**
357 * Updates networks list with the new data.
358 * @param {!Object} data Networks list.
359 */
356 NetworkScreen.updateNetworks = function(data) { 360 NetworkScreen.updateNetworks = function(data) {
357 $('connect').updateNetworks(data); 361 $('connect').updateNetworks(data);
358 }; 362 };
359 363
364 /**
365 * Updates network title, which is shown by the drop-down.
366 * @param {string} title Title to be displayed.
367 * @param {!Object} icon Icon to be displayed.
368 */
360 NetworkScreen.updateNetworkTitle = function(title, icon) { 369 NetworkScreen.updateNetworkTitle = function(title, icon) {
361 $('connect').updateNetworkTitle(title, icon); 370 $('connect').updateNetworkTitle(title, icon);
362 }; 371 };
363 372
373 /**
374 * Shows the network error message.
375 * @param {string} message Message to be shown.
376 */
377 NetworkScreen.showError = function(message) {
378 var error = document.createElement('div');
379 var messageDiv = document.createElement('div');
380 messageDiv.className = 'error-message';
381 messageDiv.textContent = message;
382 error.appendChild(messageDiv);
383
384 $('bubble').showContentForElement($('networks-list'), error);
385 };
386
387 /**
388 * Hides the error notification bubble (if any).
389 */
390 NetworkScreen.clearErrors = function() {
391 $('bubble').hide();
392 };
393
364 return { 394 return {
365 NetworkScreen: NetworkScreen 395 NetworkScreen: NetworkScreen
366 }; 396 };
367 }); 397 });
OLDNEW
« no previous file with comments | « no previous file | 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