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 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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 * all input fields of a window and if any of these is marked as managed | 850 * all input fields of a window and if any of these is marked as managed |
851 * it triggers the managed banner to be visible. The banner can be enforced | 851 * it triggers the managed banner to be visible. The banner can be enforced |
852 * being on through the managed flag of this class but it can not be forced | 852 * being on through the managed flag of this class but it can not be forced |
853 * being off if managed items exist. | 853 * being off if managed items exist. |
854 */ | 854 */ |
855 updateManagedBannerVisibility: function() { | 855 updateManagedBannerVisibility: function() { |
856 var bannerDiv = $('managed-prefs-banner'); | 856 var bannerDiv = $('managed-prefs-banner'); |
857 | 857 |
858 var controlledByPolicy = false; | 858 var controlledByPolicy = false; |
859 var controlledByExtension = false; | 859 var controlledByExtension = false; |
860 var inputElements = this.pageDiv.querySelectorAll('input[controlledBy]'); | 860 var inputElements = this.pageDiv.querySelectorAll('input[controlled-by]'); |
861 for (var i = 0, len = inputElements.length; i < len; i++) { | 861 for (var i = 0, len = inputElements.length; i < len; i++) { |
862 if (inputElements[i].controlledBy == 'policy') | 862 if (inputElements[i].controlledBy == 'policy') |
863 controlledByPolicy = true; | 863 controlledByPolicy = true; |
864 else if (inputElements[i].controlledBy == 'extension') | 864 else if (inputElements[i].controlledBy == 'extension') |
865 controlledByExtension = true; | 865 controlledByExtension = true; |
866 } | 866 } |
867 if (!controlledByPolicy && !controlledByExtension) { | 867 if (!controlledByPolicy && !controlledByExtension) { |
868 bannerDiv.hidden = true; | 868 bannerDiv.hidden = true; |
869 $('subpage-backdrop').style.top = '0'; | 869 $('subpage-backdrop').style.top = '0'; |
870 } else { | 870 } else { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 canShowPage: function() { | 1057 canShowPage: function() { |
1058 return true; | 1058 return true; |
1059 }, | 1059 }, |
1060 }; | 1060 }; |
1061 | 1061 |
1062 // Export | 1062 // Export |
1063 return { | 1063 return { |
1064 OptionsPage: OptionsPage | 1064 OptionsPage: OptionsPage |
1065 }; | 1065 }; |
1066 }); | 1066 }); |
OLD | NEW |