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

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

Issue 152143009: Clarify settings UI in multi-profiles mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/language_options.js
diff --git a/chrome/browser/resources/options/language_options.js b/chrome/browser/resources/options/language_options.js
index 3ebf7d2665bf940e57089ced80f1c3b0ec0fc568..337c4f3b4871eadaf36d31b90b31cb0cca1d2d78 100644
--- a/chrome/browser/resources/options/language_options.js
+++ b/chrome/browser/resources/options/language_options.js
@@ -557,6 +557,11 @@ cr.define('options', function() {
// hidden by a language change.
uiLanguageButton.hidden = false;
+ // Hide the controlled setting indicator.
+ var uiLanguageIndicator = document.querySelector(
+ '.language-options-contents .controlled-setting-indicator');
+ uiLanguageIndicator.removeAttribute('controlled-by');
+
if (languageCode == this.prospectiveUiLanguageCode_) {
uiLanguageMessage.textContent =
loadTimeData.getString('isDisplayedInThisLanguage');
@@ -571,11 +576,17 @@ cr.define('options', function() {
} else {
uiLanguageButton.textContent =
loadTimeData.getString('displayInThisLanguage');
+
+ if (loadTimeData.getBoolean('secondaryUser')) {
+ uiLanguageButton.disabled = true;
+ uiLanguageIndicator.setAttribute('controlled-by', 'shared');
+ } else {
+ uiLanguageButton.onclick = function(e) {
+ chrome.send('uiLanguageChange', [languageCode]);
Dan Beam 2014/02/12 21:56:31 indent off
michaelpg 2014/02/13 02:15:23 Done.
+ };
+ }
showMutuallyExclusiveNodes(
[uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0);
- uiLanguageButton.onclick = function(e) {
- chrome.send('uiLanguageChange', [languageCode]);
- };
}
} else {
uiLanguageMessage.textContent =

Powered by Google App Engine
This is Rietveld 408576698