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

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

Issue 5144001: DOMUI: Hide the sync section if sync is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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/personal_options.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/personal_options.js
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
index 3631d405546ef2ddca49aae1c5e04cc477874c99..58a5481578ebcec8d71435c0a5a055ed5081a115 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -96,7 +96,10 @@ cr.define('options', function() {
},
setElementVisible_: function(element, visible) {
- element.style.display = visible ? 'inline' : 'none';
+ if (visible)
+ element.classList.remove('hidden');
+ else
+ element.classList.add('hidden');
},
setElementClassSyncError_: function(element, visible) {
@@ -175,6 +178,10 @@ cr.define('options', function() {
$('themes_set_classic').disabled = !enabled;
}
},
+
+ hideSyncSection_: function() {
+ this.setElementVisible_($('sync-section'), false);
+ },
};
// Forward public APIs to private implementations.
@@ -195,6 +202,7 @@ cr.define('options', function() {
'setCustomizeButtonLabel',
'setGtkThemeButtonEnabled',
'setClassicThemeButtonEnabled',
+ 'hideSyncSection',
].forEach(function(name) {
PersonalOptions[name] = function(value) {
PersonalOptions.getInstance()[name + '_'](value);
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698