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

Side by Side Diff: chrome/browser/resources/settings/people_page/sync_page.html

Issue 2617533003: MD Settings: change most checkboxes to toggles (leave dialogs alone) (Closed)
Patch Set: fix tests Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> 1 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> 3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html">
9 <link rel="import" href="/people_page/sync_browser_proxy.html"> 9 <link rel="import" href="/people_page/sync_browser_proxy.html">
10 <link rel="import" href="/route.html"> 10 <link rel="import" href="/route.html">
11 <link rel="import" href="/settings_shared_css.html"> 11 <link rel="import" href="/settings_shared_css.html">
12 12
13 <dom-module id="settings-sync-page"> 13 <dom-module id="settings-sync-page">
14 <template> 14 <template>
15 <style include="settings-shared"> 15 <style include="settings-shared">
(...skipping 21 matching lines...) Expand all
37 } 37 }
38 38
39 #existingPassphraseInput { 39 #existingPassphraseInput {
40 /* The submit button for the existing passphrase is on the same line. */ 40 /* The submit button for the existing passphrase is on the same line. */
41 -webkit-margin-end: 16px; 41 -webkit-margin-end: 16px;
42 display: inline-block; 42 display: inline-block;
43 --paper-input-container: { 43 --paper-input-container: {
44 padding: 0; 44 padding: 0;
45 }; 45 };
46 } 46 }
47
48 /**
49 * This is currently necessary because a link inside a disabled
50 * paper-checkbox inherits `pointer-events: none;` and will not work.
51 * See: https://github.com/PolymerElements/paper-checkbox/issues/166
52 */
53 #paymentLearnMore {
54 pointer-events: initial;
55 }
56 </style> 47 </style>
57 <div id="[[pages.SPINNER]]" class="settings-box first" 48 <div id="[[pages.SPINNER]]" class="settings-box first"
58 hidden$="[[!isStatus_(pages.SPINNER, pageStatus_)]]"> 49 hidden$="[[!isStatus_(pages.SPINNER, pageStatus_)]]">
59 $i18n{syncLoading} 50 $i18n{syncLoading}
60 </div> 51 </div>
61 <div id="[[pages.TIMEOUT]]" class="settings-box first" 52 <div id="[[pages.TIMEOUT]]" class="settings-box first"
62 hidden$="[[!isStatus_(pages.TIMEOUT, pageStatus_)]]"> 53 hidden$="[[!isStatus_(pages.TIMEOUT, pageStatus_)]]">
63 $i18n{syncTimeout} 54 $i18n{syncTimeout}
64 </div> 55 </div>
65 <div id="[[pages.CONFIGURE]]" 56 <div id="[[pages.CONFIGURE]]"
66 hidden$="[[!isStatus_(pages.CONFIGURE, pageStatus_)]]"> 57 hidden$="[[!isStatus_(pages.CONFIGURE, pageStatus_)]]">
67 <div class="settings-box first"> 58 <div class="settings-box first">
68 <paper-checkbox id="syncAllDataTypesCheckbox" 59 <div class="start">$i18n{syncEverythingCheckboxLabel}</div>
60 <paper-toggle-button id="syncAllDataTypesControl"
69 checked="{{syncPrefs.syncAllDataTypes}}" 61 checked="{{syncPrefs.syncAllDataTypes}}"
70 on-change="onSyncAllDataTypesChanged_"> 62 on-change="onSyncAllDataTypesChanged_">
71 $i18n{syncEverythingCheckboxLabel} 63 </paper-toggle-button>
72 </paper-checkbox>
73 </div> 64 </div>
74 65
75 <div class="list-frame"> 66 <div class="list-frame">
76 <paper-checkbox checked="{{syncPrefs.appsSynced}}" 67 <div class="layout horizontal list-item">
77 on-change="onSingleSyncDataTypeChanged_" class="list-item" 68 <div class="flex">$i18n{appCheckboxLabel}</div>
78 hidden="[[!syncPrefs.appsRegistered]]" 69 <paper-toggle-button checked="{{syncPrefs.appsSynced}}"
79 disabled="[[shouldSyncCheckboxBeDisabled_( 70 on-change="onSingleSyncDataTypeChanged_"
80 syncPrefs.syncAllDataTypes, syncPrefs.appsEnforced)]]"> 71 hidden="[[!syncPrefs.appsRegistered]]"
81 $i18n{appCheckboxLabel} 72 disabled="[[shouldSyncCheckboxBeDisabled_(
82 </paper-checkbox> 73 syncPrefs.syncAllDataTypes, syncPrefs.appsEnforced)]]">
74 </paper-toggle-button>
75 </div>
83 76
84 <!-- Autofill has a special on-change handler to deal with 77 <div class="layout horizontal list-item">
85 Payments integriation. --> 78 <div class="flex">$i18n{autofillCheckboxLabel}</div>
86 <paper-checkbox checked="{{syncPrefs.autofillSynced}}" 79 <!-- Autofill has a special on-change handler to deal with
87 on-change="onAutofillDataTypeChanged_" class="list-item" 80 Payments integriation. -->
88 hidden="[[!syncPrefs.autofillRegistered]]" 81 <paper-toggle-button checked="{{syncPrefs.autofillSynced}}"
89 disabled="[[shouldSyncCheckboxBeDisabled_( 82 on-change="onAutofillDataTypeChanged_"
90 syncPrefs.syncAllDataTypes, syncPrefs.autofillEnforced)]]"> 83 hidden="[[!syncPrefs.autofillRegistered]]"
91 $i18n{autofillCheckboxLabel} 84 disabled="[[shouldSyncCheckboxBeDisabled_(
92 </paper-checkbox> 85 syncPrefs.syncAllDataTypes, syncPrefs.autofillEnforced)]]">
86 </paper-toggle-button>
87 </div>
93 88
94 <paper-checkbox checked="{{syncPrefs.bookmarksSynced}}" 89 <div class="layout horizontal list-item">
95 on-change="onSingleSyncDataTypeChanged_" class="list-item" 90 <div class="flex">$i18n{bookmarksCheckboxLabel}</div>
96 hidden="[[!syncPrefs.bookmarksRegistered]]" 91 <paper-toggle-button checked="{{syncPrefs.bookmarksSynced}}"
97 disabled="[[shouldSyncCheckboxBeDisabled_( 92 on-change="onSingleSyncDataTypeChanged_"
98 syncPrefs.syncAllDataTypes, syncPrefs.bookmarksEnforced)]]"> 93 hidden="[[!syncPrefs.bookmarksRegistered]]"
99 $i18n{bookmarksCheckboxLabel} 94 disabled="[[shouldSyncCheckboxBeDisabled_(
100 </paper-checkbox> 95 syncPrefs.syncAllDataTypes, syncPrefs.bookmarksEnforced)]]">
101 <paper-checkbox checked="{{syncPrefs.extensionsSynced}}" 96 </paper-toggle-button>
102 on-change="onSingleSyncDataTypeChanged_" class="list-item" 97 </div>
103 hidden="[[!syncPrefs.extensionsRegistered]]"
104 disabled="[[shouldSyncCheckboxBeDisabled_(
105 syncPrefs.syncAllDataTypes, syncPrefs.extensionsEnforced)]]">
106 $i18n{extensionsCheckboxLabel}
107 </paper-checkbox>
108 <paper-checkbox checked="{{syncPrefs.typedUrlsSynced}}"
109 on-change="onSingleSyncDataTypeChanged_" class="list-item"
110 hidden="[[!syncPrefs.typedUrlsRegistered]]"
111 disabled="[[shouldSyncCheckboxBeDisabled_(
112 syncPrefs.syncAllDataTypes, syncPrefs.typedUrlsEnforced)]]">
113 $i18n{historyCheckboxLabel}
114 </paper-checkbox>
115 <paper-checkbox checked="{{syncPrefs.passwordsSynced}}"
116 on-change="onSingleSyncDataTypeChanged_" class="list-item"
117 hidden="[[!syncPrefs.passwordsRegistered]]"
118 disabled="[[shouldSyncCheckboxBeDisabled_(
119 syncPrefs.syncAllDataTypes, syncPrefs.passwordsEnforced)]]">
120 $i18n{passwordsCheckboxLabel}
121 </paper-checkbox>
122 <paper-checkbox checked="{{syncPrefs.preferencesSynced}}"
123 on-change="onSingleSyncDataTypeChanged_" class="list-item"
124 hidden="[[!syncPrefs.preferencesRegistered]]"
125 disabled="[[shouldSyncCheckboxBeDisabled_(
126 syncPrefs.syncAllDataTypes, syncPrefs.preferencesEnforced)]]">
127 $i18n{settingsCheckboxLabel}
128 </paper-checkbox>
129 <paper-checkbox checked="{{syncPrefs.themesSynced}}"
130 on-change="onSingleSyncDataTypeChanged_" class="list-item"
131 hidden="[[!syncPrefs.themesRegistered]]"
132 disabled="[[shouldSyncCheckboxBeDisabled_(
133 syncPrefs.syncAllDataTypes, syncPrefs.themesEnforced)]]">
134 $i18n{themesAndWallpapersCheckboxLabel}
135 </paper-checkbox>
136 <paper-checkbox checked="{{syncPrefs.tabsSynced}}"
137 on-change="onSingleSyncDataTypeChanged_" class="list-item"
138 hidden="[[!syncPrefs.tabsRegistered]]"
139 disabled="[[shouldSyncCheckboxBeDisabled_(
140 syncPrefs.syncAllDataTypes, syncPrefs.tabsEnforced)]]">
141 $i18n{openTabsCheckboxLabel}
142 </paper-checkbox>
143 98
144 <!-- The Payments integration checkbox is a special case in many ways. 99 <div class="layout horizontal list-item">
145 It's visible only if autofill is registered. It's disabled and 100 <div class="flex">$i18n{extensionsCheckboxLabel}</div>
146 unchecked if autofill is unchecked.--> 101 <paper-toggle-button checked="{{syncPrefs.extensionsSynced}}"
147 <paper-checkbox checked="{{syncPrefs.paymentsIntegrationEnabled}}" 102 on-change="onSingleSyncDataTypeChanged_"
148 on-change="onSingleSyncDataTypeChanged_" class="list-item" 103 hidden="[[!syncPrefs.extensionsRegistered]]"
149 hidden="[[!syncPrefs.autofillRegistered]]" 104 disabled="[[shouldSyncCheckboxBeDisabled_(
150 disabled="[[shouldPaymentsCheckboxBeDisabled_( 105 syncPrefs.syncAllDataTypes, syncPrefs.extensionsEnforced)]]">
151 syncPrefs.syncAllDataTypes, syncPrefs.autofillSynced)]]"> 106 </paper-toggle-button>
152 $i18n{enablePaymentsIntegrationCheckboxLabel} 107 </div>
153 <a href="$i18nRaw{autofillHelpURL}" target="_blank" 108
154 id="paymentLearnMore" on-tap="onLearnMoreTap_"> 109 <div class="layout horizontal list-item">
155 $i18n{learnMore} 110 <div class="flex">$i18n{historyCheckboxLabel}</div>
156 </a> 111 <paper-toggle-button checked="{{syncPrefs.typedUrlsSynced}}"
157 </paper-checkbox> 112 on-change="onSingleSyncDataTypeChanged_"
113 hidden="[[!syncPrefs.typedUrlsRegistered]]"
114 disabled="[[shouldSyncCheckboxBeDisabled_(
115 syncPrefs.syncAllDataTypes, syncPrefs.typedUrlsEnforced)]]">
116 </paper-toggle-button>
117 </div>
118
119 <div class="layout horizontal list-item">
120 <div class="flex">$i18n{passwordsCheckboxLabel}</div>
121 <paper-toggle-button checked="{{syncPrefs.passwordsSynced}}"
122 on-change="onSingleSyncDataTypeChanged_"
123 hidden="[[!syncPrefs.passwordsRegistered]]"
124 disabled="[[shouldSyncCheckboxBeDisabled_(
125 syncPrefs.syncAllDataTypes, syncPrefs.passwordsEnforced)]]">
126 </paper-toggle-button>
127 </div>
128
129 <div class="layout horizontal list-item">
130 <div class="flex">$i18n{settingsCheckboxLabel}</div>
131 <paper-toggle-button checked="{{syncPrefs.preferencesSynced}}"
132 on-change="onSingleSyncDataTypeChanged_"
133 hidden="[[!syncPrefs.preferencesRegistered]]"
134 disabled="[[shouldSyncCheckboxBeDisabled_(
135 syncPrefs.syncAllDataTypes, syncPrefs.preferencesEnforced)]]">
136 </paper-toggle-button>
137 </div>
138
139 <div class="layout horizontal list-item">
140 <div class="flex">$i18n{themesAndWallpapersCheckboxLabel}</div>
141 <paper-toggle-button checked="{{syncPrefs.themesSynced}}"
142 on-change="onSingleSyncDataTypeChanged_"
143 hidden="[[!syncPrefs.themesRegistered]]"
144 disabled="[[shouldSyncCheckboxBeDisabled_(
145 syncPrefs.syncAllDataTypes, syncPrefs.themesEnforced)]]">
146 </paper-toggle-button>
147 </div>
148
149 <div class="layout horizontal list-item">
150 <div class="flex">$i18n{openTabsCheckboxLabel}</div>
151 <paper-toggle-button checked="{{syncPrefs.tabsSynced}}"
152 on-change="onSingleSyncDataTypeChanged_"
153 hidden="[[!syncPrefs.tabsRegistered]]"
154 disabled="[[shouldSyncCheckboxBeDisabled_(
155 syncPrefs.syncAllDataTypes, syncPrefs.tabsEnforced)]]">
156 </paper-toggle-button>
157 </div>
158
159 <div class="layout horizontal list-item">
160 <!-- The Payments integration checkbox is a special case in many ways.
161 It's visible only if autofill is registered. It's disabled and
162 unchecked if autofill is unchecked.-->
163 <div class="flex">
164 $i18n{enablePaymentsIntegrationCheckboxLabel}
165 <a href="$i18nRaw{autofillHelpURL}" target="_blank">
166 $i18n{learnMore}
167 </a>
168 </div>
169 <paper-toggle-button
170 checked="{{syncPrefs.paymentsIntegrationEnabled}}"
171 on-change="onSingleSyncDataTypeChanged_"
172 hidden="[[!syncPrefs.autofillRegistered]]"
173 disabled="[[shouldPaymentsCheckboxBeDisabled_(
174 syncPrefs.syncAllDataTypes, syncPrefs.autofillSynced)]]">
175 </paper-toggle-button>
176 </div>
158 </div> 177 </div>
159 178
160 <div class="settings-box two-line" actionable 179 <div class="settings-box two-line" actionable
161 on-tap="onManageSyncedDataTap_"> 180 on-tap="onManageSyncedDataTap_">
162 <div class="start"> 181 <div class="start">
163 $i18n{manageSyncedDataTitle} 182 $i18n{manageSyncedDataTitle}
164 <div class="secondary">$i18n{manageSyncedDataDescription}</div> 183 <div class="secondary">$i18n{manageSyncedDataDescription}</div>
165 </div> 184 </div>
166 <button class="icon-external" is="paper-icon-button-light"></button> 185 <button class="icon-external" is="paper-icon-button-light"></button>
167 </div> 186 </div>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 </div> 268 </div>
250 <div id="passphraseRecoverHint" class="list-item"> 269 <div id="passphraseRecoverHint" class="list-item">
251 <span>$i18nRaw{passphraseRecover}</span> 270 <span>$i18nRaw{passphraseRecover}</span>
252 </div> 271 </div>
253 </div> 272 </div>
254 </template> 273 </template>
255 </div> 274 </div>
256 </template> 275 </template>
257 <script src="sync_page.js"></script> 276 <script src="sync_page.js"></script>
258 </dom-module> 277 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698