Commit 8b2bcd76 authored by estade's avatar estade Committed by Commit bot

reland ce80b519 with fix for failed test.

Fix some more for= usage.

Also fix some controlled settings indicators.

BUG=409938
R=dbeam@chromium.org

Review URL: https://codereview.chromium.org/572853007

Cr-Commit-Position: refs/heads/master@{#295201}
parent c011630e
...@@ -4,13 +4,6 @@ ...@@ -4,13 +4,6 @@
/* Controlled setting indicator and bubble. */ /* Controlled setting indicator and bubble. */
.controlled-setting-with-label {
-webkit-box-align: center;
display: -webkit-box;
padding-bottom: 7px;
padding-top: 7px;
}
.controlled-setting-with-label input + span { .controlled-setting-with-label input + span {
-webkit-box-align: center; -webkit-box-align: center;
-webkit-box-flex: 1; -webkit-box-flex: 1;
...@@ -18,15 +11,10 @@ ...@@ -18,15 +11,10 @@
display: -webkit-box; display: -webkit-box;
} }
.controlled-setting-with-label input:disabled + span label { .controlled-setting-with-label input:disabled + span {
color: #999; color: #999;
} }
.controlled-setting-with-label label {
display: inline;
padding: 0;
}
.controlled-setting-indicator:not([controlled-by]) { .controlled-setting-indicator:not([controlled-by]) {
display: none; display: none;
} }
......
...@@ -2,42 +2,38 @@ ...@@ -2,42 +2,38 @@
<div class="close-button"></div> <div class="close-button"></div>
<h1 i18n-content="homePageOverlay"></h1> <h1 i18n-content="homePageOverlay"></h1>
<div class="content-area"> <div class="content-area">
<div class="radio"> <div class="radio controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="homepage-use-ntp" type="radio" name="homepage" <input id="homepage-use-ntp" type="radio" name="homepage"
pref="homepage_is_newtabpage" value="true" pref="homepage_is_newtabpage" value="true"
metric="Options_Homepage_IsNewTabPage" dialog-pref> metric="Options_Homepage_IsNewTabPage" dialog-pref>
<span> <span>
<label for="homepage-use-ntp" i18n-content="homePageUseNewTab"> <span i18n-content="homePageUseNewTab"></span>
</label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="homepage_is_newtabpage" value="true" dialog-pref> pref="homepage_is_newtabpage" value="true" dialog-pref></span>
</span>
</span> </span>
</span> </label>
</div> </div>
<div class="radio"> <div class="radio controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="homepage-use-url" type="radio" name="homepage" <input id="homepage-use-url" type="radio" name="homepage"
pref="homepage_is_newtabpage" value="false" pref="homepage_is_newtabpage" value="false"
metric="Options_Homepage_IsNewTabPage" dialog-pref> metric="Options_Homepage_IsNewTabPage" dialog-pref>
<span> <span>
<label id="homepage-use-url-label" i18n-content="homePageUseURL" <span id="homepage-use-url-label" i18n-content="homePageUseURL">
for="homepage-use-url">
</label>
<span class="controlled-setting-indicator"
pref="homepage_is_newtabpage" value="false" dialog-pref>
</span>
<input id="homepage-url-field" type="url" data-type="url"
class="weakrtl favicon-cell stretch" pref="homepage"
aria-labelledby="homepage-use-url-label"
metric="Options_Homepage_URL" dialog-pref>
</input>
<span id="homepage-url-field-indicator"
class="controlled-setting-indicator" pref="homepage"
dialog-pref>
</span> </span>
<span class="controlled-setting-indicator"
pref="homepage_is_newtabpage" value="false" dialog-pref></span>
</span> </span>
</label>
<input id="homepage-url-field" type="url" data-type="url"
class="weakrtl favicon-cell stretch" pref="homepage"
aria-labelledby="homepage-use-url-label"
metric="Options_Homepage_URL" dialog-pref>
</input>
<span id="homepage-url-field-indicator"
class="controlled-setting-indicator" pref="homepage"
dialog-pref>
</span> </span>
</div> </div>
</div> </div>
......
...@@ -23,16 +23,12 @@ ...@@ -23,16 +23,12 @@
</div> </div>
</div> </div>
<div id="audio-logging-bar" class="gray-bottom-bar checkbox"> <div id="audio-logging-bar" class="gray-bottom-bar checkbox">
<span class="controlled-setting-with-label"> <label>
<input id="hotword-audio-logging-enable" <input
pref="hotword.audio_logging_enabled" pref="hotword.audio_logging_enabled"
metric="Options_Hotword_AudioLogging_Checkbox" metric="Options_Hotword_AudioLogging_Checkbox"
type="checkbox" dialog-pref checked> type="checkbox" dialog-pref checked>
<span> <span i18n-content="hotwordAudioLoggingEnable"></span>
<label for="hotword-audio-logging-enable" </label>
i18n-content="hotwordAudioLoggingEnable">
</label>
</span>
</span>
</div> </div>
</div> </div>
...@@ -15,40 +15,48 @@ ...@@ -15,40 +15,48 @@
id="import-history-with-label"> id="import-history-with-label">
<label> <label>
<input id="import-history" type="checkbox" pref="import_history"> <input id="import-history" type="checkbox" pref="import_history">
<span i18n-content="importHistory"></span> <span>
<span i18n-content="importHistory"></span>
<span class="controlled-setting-indicator" pref="import_history">
</span>
</span>
</label> </label>
<span class="controlled-setting-indicator" pref="import_history">
</span>
</div> </div>
<div class="checkbox controlled-setting-with-label" <div class="checkbox controlled-setting-with-label"
id="import-favorites-with-label"> id="import-favorites-with-label">
<label> <label>
<input id="import-favorites" type="checkbox" <input id="import-favorites" type="checkbox"
pref="import_bookmarks"> pref="import_bookmarks">
<span i18n-content="importFavorites"></span> <span>
<span i18n-content="importFavorites"></span>
<span class="controlled-setting-indicator"
pref="import_bookmarks"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="import_bookmarks"></span>
</div> </div>
<div class="checkbox controlled-setting-with-label" <div class="checkbox controlled-setting-with-label"
id="import-passwords-with-label"> id="import-passwords-with-label">
<label> <label>
<input id="import-passwords" type="checkbox" <input id="import-passwords" type="checkbox"
pref="import_saved_passwords"> pref="import_saved_passwords">
<span i18n-content="importPasswords"></span> <span>
<span i18n-content="importPasswords"></span>
<span class="controlled-setting-indicator"
pref="import_saved_passwords"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="import_saved_passwords"></span>
</div> </div>
<div class="checkbox controlled-setting-with-label" <div class="checkbox controlled-setting-with-label"
id="import-search-with-label"> id="import-search-with-label">
<label> <label>
<input id="import-search" type="checkbox" <input id="import-search" type="checkbox"
pref="import_search_engine"> pref="import_search_engine">
<span i18n-content="importSearch"></span> <span>
<span i18n-content="importSearch"></span>
<span class="controlled-setting-indicator"
pref="import_search_engine"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="import_search_engine"></span>
</div> </div>
<div class="checkbox controlled-setting-with-label" <div class="checkbox controlled-setting-with-label"
id="import-autofill-form-data-with-label"> id="import-autofill-form-data-with-label">
...@@ -76,10 +84,12 @@ ...@@ -76,10 +84,12 @@
<input id="import-data-show-bookmarks-bar" <input id="import-data-show-bookmarks-bar"
pref="bookmark_bar.show_on_all_tabs" pref="bookmark_bar.show_on_all_tabs"
metric="Options_ShowBookmarksBar" type="checkbox"> metric="Options_ShowBookmarksBar" type="checkbox">
<span i18n-content="toolbarShowBookmarksBar"></span> <span>
<span i18n-content="toolbarShowBookmarksBar"></span>
<span class="controlled-setting-indicator"
pref="bookmark_bar.show_on_all_tabs"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="bookmark_bar.show_on_all_tabs"></span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<div class="close-button"></div> <div class="close-button"></div>
<h1 i18n-content="addLanguageTitle"></h1> <h1 i18n-content="addLanguageTitle"></h1>
<div class="content-area"> <div class="content-area">
<label for="add-language-overlay-language-list" <label id="add-language-overlay-language-list-label"
i18n-content="addLanguageSelectLabel"></label> i18n-content="addLanguageSelectLabel"></label>
<select id="add-language-overlay-language-list"></select> <select id="add-language-overlay-language-list"
aria-labelledby="add-language-overlay-language-list-label"></select>
</div> </div>
<div class="action-area button-strip"> <div class="action-area button-strip">
<button id="add-language-overlay-cancel-button" i18n-content="cancel"> <button id="add-language-overlay-cancel-button" i18n-content="cancel">
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
<grid id="manage-profile-icon-grid"></grid> <grid id="manage-profile-icon-grid"></grid>
<div id="manage-profile-name-input-container"> <div id="manage-profile-name-input-container">
<label> <label>
<span id="manage-profile-name-label" for="manage-profile-name" <span i18n-content="manageProfilesNameLabel"></span>
i18n-content="manageProfilesNameLabel">
</span>
<input id="manage-profile-name" type="text" pattern=".*\S.*" required> <input id="manage-profile-name" type="text" pattern=".*\S.*" required>
</label> </label>
</div> </div>
...@@ -83,7 +81,7 @@ ...@@ -83,7 +81,7 @@
<grid id="create-profile-icon-grid"></grid> <grid id="create-profile-icon-grid"></grid>
<div id="create-profile-name-input-container"> <div id="create-profile-name-input-container">
<label> <label>
<span id="create-profile-name-label" for="create-profile-name" <span id="create-profile-name-label"
i18n-content="manageProfilesNameLabel"> i18n-content="manageProfilesNameLabel">
</span> </span>
<input id="create-profile-name" type="text" pattern=".*\S.*" required> <input id="create-profile-name" type="text" pattern=".*\S.*" required>
...@@ -94,9 +92,7 @@ ...@@ -94,9 +92,7 @@
<div id="create-shortcut-container" class="checkbox" hidden> <div id="create-shortcut-container" class="checkbox" hidden>
<label> <label>
<input id="create-shortcut" type="checkbox"> <input id="create-shortcut" type="checkbox">
<span for="create-shortcut" <span i18n-content="createProfileShortcutCheckbox"></span>
i18n-content="createProfileShortcutCheckbox">
</span>
</label> </label>
</div> </div>
<div id="create-profile-supervised-container" class="checkbox"> <div id="create-profile-supervised-container" class="checkbox">
......
...@@ -48,15 +48,13 @@ ...@@ -48,15 +48,13 @@
} }
#expand-feedback { #expand-feedback {
background: center bottom no-repeat; background: url('chrome://theme/IDR_QUESTION_MARK') no-repeat center;
background-image: url('chrome://theme/IDR_QUESTION_MARK');
display: inline-block; display: inline-block;
height: 14px; height: 14px;
opacity: 0.33; opacity: 0.33;
vertical-align: text-top;
width: 14px; width: 14px;
} }
#expand-feedback:hover { #expand-feedback:hover {
opacity: 1; opacity: 1;
} }
\ No newline at end of file
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
</div> </div>
</div> </div>
</div> </div>
<div id="feedback-bar" class="gray-bottom-bar checkbox"> <div id="feedback-bar"
<span class="controlled-setting-with-label"> class="gray-bottom-bar checkbox controlled-setting-with-label">
<label>
<input id="send-settings" type="checkbox" checked> <input id="send-settings" type="checkbox" checked>
<span> <span>
<label for="send-settings" i18n-content="resetProfileSettingsFeedback"> <span i18n-content="resetProfileSettingsFeedback"></span>
</label> <span id="expand-feedback"></span>
<div id='expand-feedback'></div>
</span> </span>
</span> </label>
<div id="feedback-template" hidden> <div id="feedback-template" hidden>
<div> <div>
<table> <table>
......
...@@ -28,17 +28,18 @@ cr.define('options', function() { ...@@ -28,17 +28,18 @@ cr.define('options', function() {
initializePage: function() { initializePage: function() {
Page.prototype.initializePage.call(this); Page.prototype.initializePage.call(this);
$('reset-profile-settings-dismiss').onclick = function(event) { $('reset-profile-settings-dismiss').onclick = function(e) {
ResetProfileSettingsOverlay.dismiss(); ResetProfileSettingsOverlay.dismiss();
}; };
$('reset-profile-settings-commit').onclick = function(event) { $('reset-profile-settings-commit').onclick = function(e) {
ResetProfileSettingsOverlay.setResettingState(true); ResetProfileSettingsOverlay.setResettingState(true);
chrome.send('performResetProfileSettings', chrome.send('performResetProfileSettings',
[$('send-settings').checked]); [$('send-settings').checked]);
}; };
$('expand-feedback').onclick = function(event) { $('expand-feedback').onclick = function(e) {
var feedbackTemplate = $('feedback-template'); var feedbackTemplate = $('feedback-template');
feedbackTemplate.hidden = !feedbackTemplate.hidden; feedbackTemplate.hidden = !feedbackTemplate.hidden;
e.preventDefault();
}; };
}, },
......
...@@ -7,30 +7,36 @@ ...@@ -7,30 +7,36 @@
<input type="radio" name="startup" value="5" <input type="radio" name="startup" value="5"
pref="session.restore_on_startup" pref="session.restore_on_startup"
metric="Options_Startup_NewTab"> metric="Options_Startup_NewTab">
<span i18n-content="startupShowNewTab"></span> <span>
<span i18n-content="startupShowNewTab"></span>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="5"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="5"></span>
</div> </div>
<div class="radio controlled-setting-with-label"> <div class="radio controlled-setting-with-label">
<label> <label>
<input id="startup-restore-session" type="radio" name="startup" <input id="startup-restore-session" type="radio" name="startup"
value="1" pref="session.restore_on_startup" value="1" pref="session.restore_on_startup"
metric="Options_Startup_LastSession"> metric="Options_Startup_LastSession">
<span i18n-content="startupRestoreLastSession"></span> <span>
<span i18n-content="startupRestoreLastSession"></span>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="1"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="1"></span>
</div> </div>
<div class="radio controlled-setting-with-label"> <div class="radio controlled-setting-with-label">
<label> <label>
<input id="startup-show-pages" type="radio" name="startup" <input id="startup-show-pages" type="radio" name="startup"
pref="session.restore_on_startup" pref="session.restore_on_startup"
value="4" metric="Options_Startup_Custom"> value="4" metric="Options_Startup_Custom">
<span i18n-content="startupShowPages"></span> <span>
<span i18n-content="startupShowPages"></span>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="4"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
pref="session.restore_on_startup" value="4"></span>
<button id="startup-set-pages" class="link-button" <button id="startup-set-pages" class="link-button"
i18n-content="startupSetPages"> i18n-content="startupSetPages">
</button> </button>
......
...@@ -37,11 +37,13 @@ ...@@ -37,11 +37,13 @@
<input type="checkbox" <input type="checkbox"
metric="Options_ScreenLock" metric="Options_ScreenLock"
pref="settings.enable_screen_lock"> pref="settings.enable_screen_lock">
<span i18n-content="enableScreenlock"></span> <span>
<span i18n-content="enableScreenlock"></span>
<span class="controlled-setting-indicator"
i18n-values="textshared:screenLockShared"
pref="settings.enable_screen_lock"></span>
</span>
</label> </label>
<span class="controlled-setting-indicator"
i18n-values="textshared:screenLockShared"
pref="settings.enable_screen_lock"></span>
</div> </div>
</div> </div>
</if> <!-- chromeos --> </if> <!-- chromeos -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment