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) { |
410 $('enterprise-info-message').textContent = messageText; | 411 $('enterprise-info-message').textContent = messageText; |
411 if (messageText) | 412 if (messageText) { |
412 $('enterprise-info-container').hidden = false; | 413 $('enterprise-info-container').hidden = false; |
414 if (showReportingHint) { | |
415 $('enterprise-reporting-hint-container').hidden = false; | |
416 var link = $('enterprise-reporting-hint-link'); | |
417 link.addEventListener('click', function(e) { | |
418 chrome.send('launchHelpApp', [2535613]); | |
Nikita (slow)
2012/03/26 14:06:09
2535613 > constant
| |
419 e.preventDefault(); | |
420 }); | |
421 } | |
422 } | |
413 }; | 423 }; |
414 | 424 |
415 // Export | 425 // Export |
416 return { | 426 return { |
417 DisplayManager: DisplayManager | 427 DisplayManager: DisplayManager |
418 }; | 428 }; |
419 }); | 429 }); |
OLD | NEW |