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

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

Issue 8339014: Options: Disable the delete button when no profile is selected in personal settings. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Submitting patchset to disable delete button when there are no items to select. Created 9 years, 2 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 | « no previous file | 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 23483d01a22fd0f27e2d2e8adac4a2c5a06e742a..9375685e96ba2fe5bbc1dd3bde831b321a739400 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -62,7 +62,8 @@ cr.define('options', function() {
var hasSelection = selectedProfile != null;
var hasSingleProfile = profilesList.dataModel.length == 1;
$('profiles-manage').disabled = !hasSelection;
- $('profiles-delete').disabled = !hasSingleProfile && !hasSelection;
+ $('profiles-delete').disabled = hasSingleProfile ?
+ !hasSingleProfile : !hasSelection;
Evan Stade 2011/10/18 16:18:57 hasSingleProfile ? false : !hasSelection;
Miranda Callahan 2011/10/18 16:40:34 This looks to me like it doesn't change the logic
binji 2011/10/18 17:57:07 I agree w/ Miranda: !hasSelection || hasSinglePro
NaveenBobbili (Motorola) 2011/10/19 06:51:17 Done.
};
$('profiles-create').onclick = function(event) {
chrome.send('createProfile');
@@ -225,6 +226,7 @@ cr.define('options', function() {
$('profiles-list').hidden = hasSingleProfile;
$('profiles-single-message').hidden = !hasSingleProfile;
$('profiles-manage').hidden = hasSingleProfile;
+ $('profiles-delete').disabled = !hasSingleProfile;
Miranda Callahan 2011/10/18 16:40:34 This seems like the opposite of what we should do.
$('profiles-delete').textContent = hasSingleProfile ?
templateData.profilesDeleteSingle :
templateData.profilesDelete;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698