| OLD | NEW |
| 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 Out of the box experience flow (OOBE). | 6 * @fileoverview Out of the box experience flow (OOBE). |
| 7 * This is the main code for the OOBE WebUI implementation. | 7 * This is the main code for the OOBE WebUI implementation. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 $('add-user-button').hidden = true; | 443 $('add-user-button').hidden = true; |
| 444 $('cancel-add-user-button').hidden = false; | 444 $('cancel-add-user-button').hidden = false; |
| 445 chrome.send('showAddUser', [opt_email]); | 445 chrome.send('showAddUser', [opt_email]); |
| 446 }; | 446 }; |
| 447 | 447 |
| 448 /** | 448 /** |
| 449 * Resets sign-in input fields. | 449 * Resets sign-in input fields. |
| 450 */ | 450 */ |
| 451 Oobe.resetSigninUI = function() { | 451 Oobe.resetSigninUI = function() { |
| 452 var currentScreenId = Oobe.getInstance().currentScreen.id; | 452 var currentScreenId = Oobe.getInstance().currentScreen.id; |
| 453 $('signin').reset(currentScreenId == SCREEN_SIGNIN); | 453 if (localStrings.getString('authType') == 'webui') |
| 454 $('signin').reset(currentScreenId == SCREEN_SIGNIN); |
| 454 $('pod-row').reset(currentScreenId == SCREEN_ACCOUNT_PICKER); | 455 $('pod-row').reset(currentScreenId == SCREEN_ACCOUNT_PICKER); |
| 455 }; | 456 }; |
| 456 | 457 |
| 457 /** | 458 /** |
| 458 * Shows sign-in error bubble. | 459 * Shows sign-in error bubble. |
| 459 * @param {string} message Error message to show. | 460 * @param {string} message Error message to show. |
| 460 * @param {string} link Text to use for help link. | 461 * @param {string} link Text to use for help link. |
| 461 * @param {number} helpId Help topic Id associated with help link. | 462 * @param {number} helpId Help topic Id associated with help link. |
| 462 */ | 463 */ |
| 463 Oobe.showSignInError = function(message, link, helpId) { | 464 Oobe.showSignInError = function(message, link, helpId) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 document.onselectstart = function(e) { | 522 document.onselectstart = function(e) { |
| 522 e.preventDefault(); | 523 e.preventDefault(); |
| 523 } | 524 } |
| 524 | 525 |
| 525 // Disable dragging. | 526 // Disable dragging. |
| 526 document.ondragstart = function(e) { | 527 document.ondragstart = function(e) { |
| 527 e.preventDefault(); | 528 e.preventDefault(); |
| 528 } | 529 } |
| 529 | 530 |
| 530 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 531 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
| OLD | NEW |