Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6858)

Unified Diff: chrome/browser/resources/options/options_page.js

Issue 3108018: Display a banner above each panel that contains managed options.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/options_page.css ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/options_page.js
===================================================================
--- chrome/browser/resources/options/options_page.js (revision 56591)
+++ chrome/browser/resources/options/options_page.js (working copy)
@@ -21,6 +21,7 @@
this.pageDivName = pageDivName;
this.pageDiv = $(this.pageDivName);
this.tab = null;
+ this.managed = false;
}
OptionsPage.registeredPages_ = {};
@@ -167,6 +168,16 @@
initializePage: function() {},
/**
+ * Sets managed banner visibility state.
+ */
+ setManagedBannerVisibility: function(visible) {
+ this.managed = visible;
+ if (this.visible) {
+ $('managed-prefs-banner').style.display = visible ? 'block' : 'none';
+ }
+ },
+
+ /**
* Gets page visibility state.
*/
get visible() {
@@ -188,6 +199,9 @@
var overlay = $('overlay');
overlay.classList.remove('hidden');
} else {
+ var banner = $('managed-prefs-banner');
+ banner.style.display = this.managed ? 'block' : 'none';
+
// Recent webkit change no longer allows url change from "chrome://".
window.history.pushState({pageName: this.name},
this.title);
@@ -208,7 +222,7 @@
if (this.tab.parentNode && this.tab.parentNode.id == 'subpagesnav')
this.tab.classList.add('hidden');
}
- }
+ }
cr.dispatchPropertyChange(this, 'visible', visible, !visible);
}
@@ -220,4 +234,3 @@
};
});
-
« no previous file with comments | « chrome/browser/resources/options/options_page.css ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698