OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/assert.html"> | 1 <link rel="import" href="chrome://resources/html/assert.html"> |
2 <link rel="import" href="chrome://resources/html/cr.html"> | 2 <link rel="import" href="chrome://resources/html/cr.html"> |
3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> | |
10 <link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expa nd_button.html"> | 9 <link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expa nd_button.html"> |
11 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r ender.html"> | 10 <link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_r ender.html"> |
12 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared _menu.html"> | 11 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared _menu.html"> |
13 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 12 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
14 <link rel="import" href="/icons.html"> | 13 <link rel="import" href="/icons.html"> |
15 <link rel="import" href="/languages_page/add_languages_dialog.html"> | 14 <link rel="import" href="/languages_page/add_languages_dialog.html"> |
16 <link rel="import" href="/languages_page/languages.html"> | 15 <link rel="import" href="/languages_page/languages.html"> |
17 <link rel="import" href="/lifetime_browser_proxy.html"> | 16 <link rel="import" href="/lifetime_browser_proxy.html"> |
18 <link rel="import" href="/route.html"> | 17 <link rel="import" href="/route.html"> |
19 <link rel="import" href="/settings_page/settings_animated_pages.html"> | 18 <link rel="import" href="/settings_page/settings_animated_pages.html"> |
(...skipping 15 matching lines...) Expand all Loading... | |
35 #languagesCollapse .list-item.selected { | 34 #languagesCollapse .list-item.selected { |
36 min-height: var(--settings-row-two-line-min-height); | 35 min-height: var(--settings-row-two-line-min-height); |
37 } | 36 } |
38 | 37 |
39 .explain-selected { | 38 .explain-selected { |
40 color: var(--google-green-700); | 39 color: var(--google-green-700); |
41 font-weight: initial; | 40 font-weight: initial; |
42 margin-top: 4px; | 41 margin-top: 4px; |
43 } | 42 } |
44 | 43 |
44 cr-shared-menu { | |
45 --cr-shared-menu: { | |
46 width: 320px; | |
47 }; | |
48 } | |
49 | |
50 cr-shared-menu.complex .dropdown-item { | |
51 min-height: 36px; | |
52 } | |
53 | |
54 cr-shared-menu:not(.complex) hr { | |
55 display: none; | |
56 } | |
57 | |
58 cr-shared-menu.complex hr { | |
59 /* Override user-agent border and margin. */ | |
60 border: none; | |
61 /* TODO(michaelpg): Update to whatever variable is used for the darker, | |
62 * full-width separators: crbug.com/649547. */ | |
63 border-top: var(--settings-separator-line); | |
64 margin: 6px 0 0 0; | |
65 } | |
66 | |
45 paper-checkbox.dropdown-item { | 67 paper-checkbox.dropdown-item { |
46 --checkbox-margin-start: 0; | 68 --checkbox-margin-start: 0; |
47 /* Allow for the ripple height. */ | |
48 min-height: var(--paper-checkbox-ink-size); | |
49 } | 69 } |
50 </style> | 70 </style> |
51 <settings-languages languages="{{languages}}" prefs="{{prefs}}" | 71 <settings-languages languages="{{languages}}" prefs="{{prefs}}" |
52 language-helper="{{languageHelper}}"> | 72 language-helper="{{languageHelper}}"> |
53 </settings-languages> | 73 </settings-languages> |
54 <settings-animated-pages id="pages" section="languages"> | 74 <settings-animated-pages id="pages" section="languages"> |
55 <neon-animatable route-path="default"> | 75 <neon-animatable route-path="default"> |
56 <div class="settings-box first two-line"> | 76 <div class="settings-box first two-line"> |
57 <div class="start"> | 77 <div class="start"> |
58 <div>$i18n{languagesListTitle}</div> | 78 <div>$i18n{languagesListTitle}</div> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 </cr-expand-button> | 142 </cr-expand-button> |
123 </div> | 143 </div> |
124 <iron-collapse id="inputMethodsCollapse" | 144 <iron-collapse id="inputMethodsCollapse" |
125 opened="[[inputMethodsOpened_]]"> | 145 opened="[[inputMethodsOpened_]]"> |
126 <div class="list-frame vertical-list"> | 146 <div class="list-frame vertical-list"> |
127 <template is="dom-repeat" | 147 <template is="dom-repeat" |
128 items="[[languages.inputMethods.enabled]]"> | 148 items="[[languages.inputMethods.enabled]]"> |
129 <div class$="list-item [[getInputMethodItemClass_( | 149 <div class$="list-item [[getInputMethodItemClass_( |
130 item.id, languages.inputMethods.currentId)]]" | 150 item.id, languages.inputMethods.currentId)]]" |
131 on-tap="onInputMethodTap_" actionable> | 151 on-tap="onInputMethodTap_" actionable> |
132 <div>[[item.displayName]]</div> | 152 <div class="start"> |
133 <div class="middle"> | 153 <div>[[item.displayName]]</div> |
134 <iron-icon icon="settings:done" | 154 <div class="explain-selected" |
135 hidden="[[!isCurrentInputMethod_( | 155 hidden="[[!isCurrentInputMethod_( |
136 item.id, languages.inputMethods.currentId)]]"> | 156 item.id, languages.inputMethods.currentId)]]"> |
137 </iron-icon> | 157 $i18n{inputMethodEnabled} |
158 </div> | |
138 </div> | 159 </div> |
139 <paper-icon-button icon="cr:settings" | 160 <paper-icon-button icon="cr:settings" |
140 on-tap="onInputMethodOptionsTap_" | 161 on-tap="onInputMethodOptionsTap_" |
141 hidden="[[!item.hasOptionsPage]]"> | 162 hidden="[[!item.hasOptionsPage]]"> |
142 </paper-icon-button> | 163 </paper-icon-button> |
143 </div> | 164 </div> |
144 </template> | 165 </template> |
145 <div class="list-item list-button" | 166 <div class="list-item list-button" |
146 on-tap="onManageInputMethodsTap_"> | 167 on-tap="onManageInputMethodsTap_"> |
147 $i18n{manageInputMethods} | 168 $i18n{manageInputMethods} |
(...skipping 10 matching lines...) Expand all Loading... | |
158 </div> | 179 </div> |
159 </div> | 180 </div> |
160 <cr-expand-button expanded="{{spellCheckOpened_}}" | 181 <cr-expand-button expanded="{{spellCheckOpened_}}" |
161 alt="$i18n{spellCheckExpandA11yLabel}"> | 182 alt="$i18n{spellCheckExpandA11yLabel}"> |
162 </cr-expand-button> | 183 </cr-expand-button> |
163 </div> | 184 </div> |
164 <iron-collapse id="spellCheckCollapse" opened="[[spellCheckOpened_]]"> | 185 <iron-collapse id="spellCheckCollapse" opened="[[spellCheckOpened_]]"> |
165 <div class="list-frame vertical-list"> | 186 <div class="list-frame vertical-list"> |
166 <template is="dom-repeat" items="[[languages.enabled]]"> | 187 <template is="dom-repeat" items="[[languages.enabled]]"> |
167 <div class="list-item"> | 188 <div class="list-item"> |
168 <label class="start" | 189 <paper-checkbox |
169 id="supportsSpellCheckLabel-[[item.language.code]]"> | |
170 <span disabled$="[[!item.language.supportsSpellcheck]]"> | |
171 [[item.language.displayName]] | |
172 </span> | |
173 </label> | |
174 <paper-toggle-button | |
175 checked="[[item.spellCheckEnabled]]" | 190 checked="[[item.spellCheckEnabled]]" |
176 on-change="onSpellCheckChange_" | 191 on-change="onSpellCheckChange_" |
177 disabled$="[[!item.language.supportsSpellcheck]]" | 192 disabled$="[[!item.language.supportsSpellcheck]]"> |
178 aria-labelledby= | 193 [[item.language.displayName]] |
179 "supportsSpellCheckLabel-[[item.language.code]]"> | 194 </paper-checkbox> |
180 </paper-toggle-button> | |
181 </label> | 195 </label> |
182 </template> | 196 </template> |
183 <div class="list-item list-button" on-tap="onEditDictionaryTap_"> | 197 <div class="list-item list-button" on-tap="onEditDictionaryTap_"> |
184 $i18n{manageSpellCheck} | 198 $i18n{manageSpellCheck} |
185 </div> | 199 </div> |
186 </div> | 200 </div> |
187 </iron-collapse> | 201 </iron-collapse> |
188 </if> | 202 </if> |
189 <template is="cr-lazy-render" id="menu"> | 203 <template is="cr-lazy-render" id="menu"> |
190 <cr-shared-menu> | 204 <cr-shared-menu |
205 class$="[[getMenuClass_(prefs.translate.enabled.value)]]"> | |
191 <if expr="chromeos or is_win"> | 206 <if expr="chromeos or is_win"> |
192 <paper-checkbox id="uiLanguageItem" class="dropdown-item" | 207 <paper-checkbox id="uiLanguageItem" class="dropdown-item" |
193 checked="[[isProspectiveUILanguage_( | 208 checked="[[isProspectiveUILanguage_( |
194 detailLanguage_.language.code, | 209 detailLanguage_.language.code, |
195 prefs.intl.app_locale.value)]]" | 210 prefs.intl.app_locale.value)]]" |
196 on-change="onUILanguageChange_" | 211 on-change="onUILanguageChange_" |
197 disabled="[[disableUILanguageCheckbox_( | 212 disabled="[[disableUILanguageCheckbox_( |
198 detailLanguage_, prefs.intl.app_locale.value)]]"> | 213 detailLanguage_, prefs.intl.app_locale.value)]]"> |
199 $i18n{displayInThisLanguage} | 214 $i18n{displayInThisLanguage} |
200 </paper-checkbox> | 215 </paper-checkbox> |
201 </if> | 216 </if> |
202 <paper-checkbox class="dropdown-item" | 217 <paper-checkbox class="dropdown-item" |
203 checked="[[detailLanguage_.translateEnabled]]" | 218 checked="[[detailLanguage_.translateEnabled]]" |
204 on-change="onTranslateCheckboxChange_" | 219 on-change="onTranslateCheckboxChange_" |
205 hidden="[[!prefs.translate.enabled.value]]" | 220 hidden="[[!prefs.translate.enabled.value]]" |
206 disabled="[[disableTranslateCheckbox_( | 221 disabled="[[disableTranslateCheckbox_( |
207 detailLanguage_.language, languages.translateTarget)]]"> | 222 detailLanguage_.language, languages.translateTarget)]]"> |
208 $i18n{offerToTranslateInThisLanguage} | 223 $i18n{offerToTranslateInThisLanguage} |
209 </paper-checkbox> | 224 </paper-checkbox> |
225 <hr> | |
226 <button class="dropdown-item" role="menuitem" | |
227 on-tap="onMoveToTopTap_" | |
228 hidden="[[isFirstOrSecondLanguage_( | |
Dan Beam
2016/09/23 23:25:42
if we're going to show only one of "Move up" vs "M
michaelpg
2016/09/28 23:24:29
Done.
| |
229 detailLanguage_, languages.enabled.*)]]"> | |
230 $i18n{moveToTop} | |
231 </button> | |
210 <button class="dropdown-item" role="menuitem" | 232 <button class="dropdown-item" role="menuitem" |
211 on-tap="onMoveUpTap_" | 233 on-tap="onMoveUpTap_" |
212 hidden="[[isFirstLanguage_( | 234 hidden="[[isFirstLanguage_( |
213 detailLanguage_, languages.enabled.*)]]"> | 235 detailLanguage_, languages.enabled.*)]]"> |
214 $i18n{moveUp} | 236 $i18n{moveUp} |
215 </button> | 237 </button> |
216 <button class="dropdown-item" role="menuitem" | 238 <button class="dropdown-item" role="menuitem" |
217 on-tap="onMoveDownTap_" | 239 on-tap="onMoveDownTap_" |
218 hidden="[[isLastLanguage_( | 240 hidden="[[isLastLanguage_( |
219 detailLanguage_, languages.enabled.*)]]"> | 241 detailLanguage_, languages.enabled.*)]]"> |
(...skipping 29 matching lines...) Expand all Loading... | |
249 </if> | 271 </if> |
250 </settings-animated-pages> | 272 </settings-animated-pages> |
251 <template is="dom-if" if="[[showAddLanguagesDialog_]]" restamp> | 273 <template is="dom-if" if="[[showAddLanguagesDialog_]]" restamp> |
252 <settings-add-languages-dialog languages="{{languages}}" | 274 <settings-add-languages-dialog languages="{{languages}}" |
253 language-helper="[[languageHelper]]"> | 275 language-helper="[[languageHelper]]"> |
254 </settings-add-languages-dialog> | 276 </settings-add-languages-dialog> |
255 </template> | 277 </template> |
256 </template> | 278 </template> |
257 <script src="languages_page.js"></script> | 279 <script src="languages_page.js"></script> |
258 </dom-module> | 280 </dom-module> |
OLD | NEW |