summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 13:55:36 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 13:55:36 +0000
commit1f297a62f3eeccdf8e727f2da721e865eb402510 (patch)
tree0d8414cf1048e279734c5ba0e986993a9dea6ca3
parent0f8f5569e0b95952f88ff67badbd2f985719e7fd (diff)
downloadchromium_src-1f297a62f3eeccdf8e727f2da721e865eb402510.zip
chromium_src-1f297a62f3eeccdf8e727f2da721e865eb402510.tar.gz
chromium_src-1f297a62f3eeccdf8e727f2da721e865eb402510.tar.bz2
Merge 107901 - Options: Fix to enable Edit button only when the current profile is selected. Prevents a profile from editing the avatar and profile name of another profile in the Personal Options page. These changes got overwritten due to revision 107894. Bringing them back.
BUG=87658 TEST=NONE Review URL: http://codereview.chromium.org/8341139 TBR=qghc36@motorola.com Review URL: http://codereview.chromium.org/8386035 git-svn-id: svn://svn.chromium.org/chrome/branches/912/src@108283 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/options/personal_options.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
index e46d227..80a16a3 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -226,7 +226,8 @@ cr.define('options', function() {
var selectedProfile = profilesList.selectedItem;
var hasSelection = selectedProfile != null;
var hasSingleProfile = profilesList.dataModel.length == 1;
- $('profiles-manage').disabled = !hasSelection;
+ $('profiles-manage').disabled = !hasSelection ||
+ !selectedProfile.isCurrentProfile;
$('profiles-delete').disabled = !hasSelection || hasSingleProfile;
},