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

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

Issue 7067036: Options: Remove the hidden class, since we override the hidden attribute to set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
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 108949a877eb4dda0b6f336c39fafc27c7b15604..17c055557bb5591d609e3b2b57c804ab76429861 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -114,21 +114,13 @@ cr.define('options', function() {
function() { chrome.send('stopSyncing'); });
},
- setElementVisible_: function(element, visible) {
- element.hidden = !visible;
- if (visible)
- element.classList.remove('hidden');
- else
- element.classList.add('hidden');
- },
-
setSyncEnabled_: function(enabled) {
this.syncEnabled = enabled;
},
setSyncSetupCompleted_: function(completed) {
this.syncSetupCompleted = completed;
- this.setElementVisible_($('customize-sync'), completed);
+ $('customize-sync').hidden = !completed;
$('privacy-dashboard-link').hidden = !completed;
},
@@ -157,11 +149,11 @@ cr.define('options', function() {
// link-button does is not zero-area when the contents of the button are
// empty, so explicitly hide the element.
- this.setElementVisible_($('sync-action-link'), status.length != 0);
+ $('sync-action-link').hidden = !status.length;
},
setProfilesSectionVisible_: function(visible) {
- this.setElementVisible_($('profiles-create'), visible);
+ $('profiles-create').hidden = !visible;
},
setNewProfileButtonEnabled_: function(enabled) {
@@ -173,7 +165,7 @@ cr.define('options', function() {
},
setStartStopButtonVisible_: function(visible) {
- this.setElementVisible_($('start-stop-sync'), visible);
+ $('start-stop-sync').hidden = !visible;
},
setStartStopButtonEnabled_: function(enabled) {
@@ -195,7 +187,7 @@ cr.define('options', function() {
},
hideSyncSection_: function() {
- this.setElementVisible_($('sync-section'), false);
+ $('sync-section').hidden = true;
},
/**

Powered by Google App Engine
This is Rietveld 408576698