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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 */ | 914 */ |
915 updateManagedBannerVisibility: function() { | 915 updateManagedBannerVisibility: function() { |
916 var bannerDiv = this.pageDiv.querySelector('.managed-prefs-banner'); | 916 var bannerDiv = this.pageDiv.querySelector('.managed-prefs-banner'); |
917 // Create a banner for the overlay if we don't have one. | 917 // Create a banner for the overlay if we don't have one. |
918 if (!bannerDiv) { | 918 if (!bannerDiv) { |
919 bannerDiv = $('managed-prefs-banner').cloneNode(true); | 919 bannerDiv = $('managed-prefs-banner').cloneNode(true); |
920 bannerDiv.id = null; | 920 bannerDiv.id = null; |
921 | 921 |
922 if (this.isOverlay) { | 922 if (this.isOverlay) { |
923 var content = this.pageDiv.querySelector('.content-area'); | 923 var content = this.pageDiv.querySelector('.content-area'); |
924 this.pageDiv.insertBefore(bannerDiv, content); | 924 content.parentElement.insertBefore(bannerDiv, content); |
925 } else { | 925 } else { |
926 bannerDiv.classList.add('main-page-banner'); | 926 bannerDiv.classList.add('main-page-banner'); |
927 var header = this.pageDiv.querySelector('header'); | 927 var header = this.pageDiv.querySelector('header'); |
928 header.appendChild(bannerDiv); | 928 header.appendChild(bannerDiv); |
929 } | 929 } |
930 } | 930 } |
931 | 931 |
932 var controlledByPolicy = false; | 932 var controlledByPolicy = false; |
933 var controlledByExtension = false; | 933 var controlledByExtension = false; |
934 var inputElements = this.pageDiv.querySelectorAll('input[controlled-by]'); | 934 var inputElements = this.pageDiv.querySelectorAll('input[controlled-by]'); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 canShowPage: function() { | 1116 canShowPage: function() { |
1117 return true; | 1117 return true; |
1118 }, | 1118 }, |
1119 }; | 1119 }; |
1120 | 1120 |
1121 // Export | 1121 // Export |
1122 return { | 1122 return { |
1123 OptionsPage: OptionsPage | 1123 OptionsPage: OptionsPage |
1124 }; | 1124 }; |
1125 }); | 1125 }); |
OLD | NEW |