| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 502 |
| 503 /** | 503 /** |
| 504 * Handles login success notification. | 504 * Handles login success notification. |
| 505 */ | 505 */ |
| 506 Oobe.onLoginSuccess = function(username) { | 506 Oobe.onLoginSuccess = function(username) { |
| 507 if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) { | 507 if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) { |
| 508 $('pod-row').startAuthenticatedAnimation(); | 508 $('pod-row').startAuthenticatedAnimation(); |
| 509 } | 509 } |
| 510 }; | 510 }; |
| 511 | 511 |
| 512 /** |
| 513 * Sets text content for a div with |labelId|. |
| 514 * @param {string} labelId Id of the label div. |
| 515 * @param {string} labelText Text for the label. |
| 516 */ |
| 517 Oobe.setLabelText = function(labelId, labelText) { |
| 518 $(labelId).textContent = labelText; |
| 519 }; |
| 520 |
| 512 // Export | 521 // Export |
| 513 return { | 522 return { |
| 514 Oobe: Oobe | 523 Oobe: Oobe |
| 515 }; | 524 }; |
| 516 }); | 525 }); |
| 517 | 526 |
| 518 var Oobe = cr.ui.Oobe; | 527 var Oobe = cr.ui.Oobe; |
| 519 | 528 |
| 520 // Disable text selection. | 529 // Disable text selection. |
| 521 document.onselectstart = function(e) { | 530 document.onselectstart = function(e) { |
| 522 e.preventDefault(); | 531 e.preventDefault(); |
| 523 } | 532 } |
| 524 | 533 |
| 525 // Disable dragging. | 534 // Disable dragging. |
| 526 document.ondragstart = function(e) { | 535 document.ondragstart = function(e) { |
| 527 e.preventDefault(); | 536 e.preventDefault(); |
| 528 } | 537 } |
| 529 | 538 |
| 530 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 539 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
| OLD | NEW |