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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 ///////////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////////// |
7 // OptionsPage class: | 7 // OptionsPage class: |
8 | 8 |
9 /** | 9 /** |
10 * Base class for options page. | 10 * Base class for options page. |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 controlledByPolicy = true; | 701 controlledByPolicy = true; |
702 else if (inputElements[i].controlledBy == 'extension') | 702 else if (inputElements[i].controlledBy == 'extension') |
703 controlledByExtension = true; | 703 controlledByExtension = true; |
704 } | 704 } |
705 | 705 |
706 if (!controlledByPolicy && !controlledByExtension) { | 706 if (!controlledByPolicy && !controlledByExtension) { |
707 this.pageDiv.classList.remove('showing-banner'); | 707 this.pageDiv.classList.remove('showing-banner'); |
708 } else { | 708 } else { |
709 this.pageDiv.classList.add('showing-banner'); | 709 this.pageDiv.classList.add('showing-banner'); |
710 | 710 |
711 var text = bannerDiv.querySelector('.managed-prefs-text'); | 711 var text = bannerDiv.querySelector('#managed-prefs-text'); |
712 if (controlledByPolicy && !controlledByExtension) { | 712 if (controlledByPolicy && !controlledByExtension) { |
713 text.textContent = | 713 text.textContent = |
714 loadTimeData.getString('policyManagedPrefsBannerText'); | 714 loadTimeData.getString('policyManagedPrefsBannerText'); |
715 } else if (!controlledByPolicy && controlledByExtension) { | 715 } else if (!controlledByPolicy && controlledByExtension) { |
716 text.textContent = | 716 text.textContent = |
717 loadTimeData.getString('extensionManagedPrefsBannerText'); | 717 loadTimeData.getString('extensionManagedPrefsBannerText'); |
718 } else if (controlledByPolicy && controlledByExtension) { | 718 } else if (controlledByPolicy && controlledByExtension) { |
719 text.textContent = loadTimeData.getString( | 719 text.textContent = loadTimeData.getString( |
720 'policyAndExtensionManagedPrefsBannerText'); | 720 'policyAndExtensionManagedPrefsBannerText'); |
721 } | 721 } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 canShowPage: function() { | 897 canShowPage: function() { |
898 return true; | 898 return true; |
899 }, | 899 }, |
900 }; | 900 }; |
901 | 901 |
902 // Export | 902 // Export |
903 return { | 903 return { |
904 OptionsPage: OptionsPage | 904 OptionsPage: OptionsPage |
905 }; | 905 }; |
906 }); | 906 }); |
OLD | NEW |