OLD | NEW |
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 Display manager for WebUI OOBE and login. | 6 * @fileoverview Display manager for WebUI OOBE and login. |
7 */ | 7 */ |
8 | 8 |
9 // TODO(xiyuan): Find a better to share those constants. | 9 // TODO(xiyuan): Find a better to share those constants. |
10 const SCREEN_GAIA_SIGNIN = 'gaia-signin'; | 10 const SCREEN_GAIA_SIGNIN = 'gaia-signin'; |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 * @param {string} labelId Id of the label div. | 398 * @param {string} labelId Id of the label div. |
399 * @param {string} labelText Text for the label. | 399 * @param {string} labelText Text for the label. |
400 */ | 400 */ |
401 DisplayManager.setLabelText = function(labelId, labelText) { | 401 DisplayManager.setLabelText = function(labelId, labelText) { |
402 $(labelId).textContent = labelText; | 402 $(labelId).textContent = labelText; |
403 }; | 403 }; |
404 | 404 |
405 /** | 405 /** |
406 * Sets the text content of the enterprise info message. | 406 * Sets the text content of the enterprise info message. |
407 * @param {string} messageText The message text. | 407 * @param {string} messageText The message text. |
| 408 * @param {boolean} showReportingHint Whether to show the reporting warning. |
408 */ | 409 */ |
409 DisplayManager.setEnterpriseInfo = function(messageText) { | 410 DisplayManager.setEnterpriseInfo = function(messageText, showReportingHint) { |
| 411 console.log('Enterprise update ' + messageText + ' ' + showReportingHint); |
410 $('enterprise-info-message').textContent = messageText; | 412 $('enterprise-info-message').textContent = messageText; |
411 if (messageText) | 413 if (messageText) { |
412 $('enterprise-info-container').hidden = false; | 414 $('enterprise-info-container').hidden = false; |
| 415 if (showReportingHint) { |
| 416 $('enterprise-reporting-hint-container').hidden = false; |
| 417 var link = $('enterprise-reporting-hint-link'); |
| 418 link.addEventListener('click', function(e) { |
| 419 chrome.send('launchHelpApp', [183078]); // FIXME: Need correct helpapp
id here. |
| 420 e.preventDefault(); |
| 421 }); |
| 422 } |
| 423 } |
413 }; | 424 }; |
414 | 425 |
415 // Export | 426 // Export |
416 return { | 427 return { |
417 DisplayManager: DisplayManager | 428 DisplayManager: DisplayManager |
418 }; | 429 }; |
419 }); | 430 }); |
OLD | NEW |