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-width: 320px; |
| 46 } |
| 47 |
| 48 cr-shared-menu.complex .dropdown-item { |
| 49 min-height: 36px; |
| 50 } |
| 51 |
| 52 cr-shared-menu:not(.complex) hr { |
| 53 display: none; |
| 54 } |
| 55 |
| 56 cr-shared-menu.complex hr { |
| 57 /* Override user-agent border and margin. */ |
| 58 border: none; |
| 59 /* TODO(michaelpg): Update to whatever variable is used for the darker, |
| 60 * full-width separators: crbug.com/649547. */ |
| 61 border-top: var(--settings-separator-line); |
| 62 margin: 6px 0 0 0; |
| 63 } |
| 64 |
45 paper-checkbox.dropdown-item { | 65 paper-checkbox.dropdown-item { |
46 --checkbox-margin-start: 0; | 66 --checkbox-margin-start: 0; |
47 /* Allow for the ripple height. */ | |
48 min-height: var(--paper-checkbox-ink-size); | |
49 } | 67 } |
50 </style> | 68 </style> |
51 <settings-languages languages="{{languages}}" prefs="{{prefs}}" | 69 <settings-languages languages="{{languages}}" prefs="{{prefs}}" |
52 language-helper="{{languageHelper}}"> | 70 language-helper="{{languageHelper}}"> |
53 </settings-languages> | 71 </settings-languages> |
54 <settings-animated-pages id="pages" section="languages"> | 72 <settings-animated-pages id="pages" section="languages"> |
55 <neon-animatable route-path="default"> | 73 <neon-animatable route-path="default"> |
56 <div class="settings-box first two-line"> | 74 <div class="settings-box first two-line"> |
57 <div class="start"> | 75 <div class="start"> |
58 <div>$i18n{languagesListTitle}</div> | 76 <div>$i18n{languagesListTitle}</div> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 </cr-expand-button> | 140 </cr-expand-button> |
123 </div> | 141 </div> |
124 <iron-collapse id="inputMethodsCollapse" | 142 <iron-collapse id="inputMethodsCollapse" |
125 opened="[[inputMethodsOpened_]]"> | 143 opened="[[inputMethodsOpened_]]"> |
126 <div class="list-frame vertical-list"> | 144 <div class="list-frame vertical-list"> |
127 <template is="dom-repeat" | 145 <template is="dom-repeat" |
128 items="[[languages.inputMethods.enabled]]"> | 146 items="[[languages.inputMethods.enabled]]"> |
129 <div class$="list-item [[getInputMethodItemClass_( | 147 <div class$="list-item [[getInputMethodItemClass_( |
130 item.id, languages.inputMethods.currentId)]]" | 148 item.id, languages.inputMethods.currentId)]]" |
131 on-tap="onInputMethodTap_" actionable> | 149 on-tap="onInputMethodTap_" actionable> |
132 <div>[[item.displayName]]</div> | 150 <div class="start"> |
133 <div class="middle"> | 151 <div>[[item.displayName]]</div> |
134 <iron-icon icon="settings:done" | 152 <div class="explain-selected" |
135 hidden="[[!isCurrentInputMethod_( | 153 hidden="[[!isCurrentInputMethod_( |
136 item.id, languages.inputMethods.currentId)]]"> | 154 item.id, languages.inputMethods.currentId)]]"> |
137 </iron-icon> | 155 $i18n{inputMethodEnabled} |
| 156 </div> |
138 </div> | 157 </div> |
139 <paper-icon-button icon="cr:settings" | 158 <paper-icon-button icon="cr:settings" |
140 on-tap="onInputMethodOptionsTap_" | 159 on-tap="onInputMethodOptionsTap_" |
141 hidden="[[!item.hasOptionsPage]]"> | 160 hidden="[[!item.hasOptionsPage]]"> |
142 </paper-icon-button> | 161 </paper-icon-button> |
143 </div> | 162 </div> |
144 </template> | 163 </template> |
145 <div class="list-item list-button" | 164 <div class="list-item list-button" |
146 on-tap="onManageInputMethodsTap_"> | 165 on-tap="onManageInputMethodsTap_"> |
147 $i18n{manageInputMethods} | 166 $i18n{manageInputMethods} |
(...skipping 10 matching lines...) Expand all Loading... |
158 </div> | 177 </div> |
159 </div> | 178 </div> |
160 <cr-expand-button expanded="{{spellCheckOpened_}}" | 179 <cr-expand-button expanded="{{spellCheckOpened_}}" |
161 alt="$i18n{spellCheckExpandA11yLabel}"> | 180 alt="$i18n{spellCheckExpandA11yLabel}"> |
162 </cr-expand-button> | 181 </cr-expand-button> |
163 </div> | 182 </div> |
164 <iron-collapse id="spellCheckCollapse" opened="[[spellCheckOpened_]]"> | 183 <iron-collapse id="spellCheckCollapse" opened="[[spellCheckOpened_]]"> |
165 <div class="list-frame vertical-list"> | 184 <div class="list-frame vertical-list"> |
166 <template is="dom-repeat" items="[[languages.enabled]]"> | 185 <template is="dom-repeat" items="[[languages.enabled]]"> |
167 <div class="list-item"> | 186 <div class="list-item"> |
168 <label class="start" | 187 <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]]" | 188 checked="[[item.spellCheckEnabled]]" |
176 on-change="onSpellCheckChange_" | 189 on-change="onSpellCheckChange_" |
177 disabled$="[[!item.language.supportsSpellcheck]]" | 190 disabled$="[[!item.language.supportsSpellcheck]]"> |
178 aria-labelledby= | 191 [[item.language.displayName]] |
179 "supportsSpellCheckLabel-[[item.language.code]]"> | 192 </paper-checkbox> |
180 </paper-toggle-button> | |
181 </label> | 193 </label> |
182 </template> | 194 </template> |
183 <div class="list-item list-button" on-tap="onEditDictionaryTap_"> | 195 <div class="list-item list-button" on-tap="onEditDictionaryTap_"> |
184 $i18n{manageSpellCheck} | 196 $i18n{manageSpellCheck} |
185 </div> | 197 </div> |
186 </div> | 198 </div> |
187 </iron-collapse> | 199 </iron-collapse> |
188 </if> | 200 </if> |
189 <template is="cr-lazy-render" id="menu"> | 201 <template is="cr-lazy-render" id="menu"> |
190 <cr-shared-menu> | 202 <cr-shared-menu |
| 203 class$="[[getMenuClass_(prefs.translate.enabled.value)]]"> |
191 <if expr="chromeos or is_win"> | 204 <if expr="chromeos or is_win"> |
192 <paper-checkbox id="uiLanguageItem" class="dropdown-item" | 205 <paper-checkbox id="uiLanguageItem" class="dropdown-item" |
193 checked="[[isProspectiveUILanguage_( | 206 checked="[[isProspectiveUILanguage_( |
194 detailLanguage_.language.code, | 207 detailLanguage_.language.code, |
195 prefs.intl.app_locale.value)]]" | 208 prefs.intl.app_locale.value)]]" |
196 on-change="onUILanguageChange_" | 209 on-change="onUILanguageChange_" |
197 disabled="[[disableUILanguageCheckbox_( | 210 disabled="[[disableUILanguageCheckbox_( |
198 detailLanguage_, prefs.intl.app_locale.value)]]"> | 211 detailLanguage_, prefs.intl.app_locale.value)]]"> |
199 $i18n{displayInThisLanguage} | 212 $i18n{displayInThisLanguage} |
200 </paper-checkbox> | 213 </paper-checkbox> |
201 </if> | 214 </if> |
202 <paper-checkbox class="dropdown-item" | 215 <paper-checkbox class="dropdown-item" |
203 checked="[[detailLanguage_.translateEnabled]]" | 216 checked="[[detailLanguage_.translateEnabled]]" |
204 on-change="onTranslateCheckboxChange_" | 217 on-change="onTranslateCheckboxChange_" |
205 hidden="[[!prefs.translate.enabled.value]]" | 218 hidden="[[!prefs.translate.enabled.value]]" |
206 disabled="[[disableTranslateCheckbox_( | 219 disabled="[[disableTranslateCheckbox_( |
207 detailLanguage_.language, languages.translateTarget)]]"> | 220 detailLanguage_.language, languages.translateTarget)]]"> |
208 $i18n{offerToTranslateInThisLanguage} | 221 $i18n{offerToTranslateInThisLanguage} |
209 </paper-checkbox> | 222 </paper-checkbox> |
| 223 <hr> |
| 224 <button class="dropdown-item" role="menuitem" |
| 225 on-tap="onMoveToTopTap_" |
| 226 hidden="[[isFirstLanguage_( |
| 227 detailLanguage_, languages.enabled.*)]]"> |
| 228 $i18n{moveToTop} |
| 229 </button> |
210 <button class="dropdown-item" role="menuitem" | 230 <button class="dropdown-item" role="menuitem" |
211 on-tap="onMoveUpTap_" | 231 on-tap="onMoveUpTap_" |
212 hidden="[[isFirstLanguage_( | 232 hidden="[[isFirstOrSecondLanguage_( |
213 detailLanguage_, languages.enabled.*)]]"> | 233 detailLanguage_, languages.enabled.*)]]"> |
214 $i18n{moveUp} | 234 $i18n{moveUp} |
215 </button> | 235 </button> |
216 <button class="dropdown-item" role="menuitem" | 236 <button class="dropdown-item" role="menuitem" |
217 on-tap="onMoveDownTap_" | 237 on-tap="onMoveDownTap_" |
218 hidden="[[isLastLanguage_( | 238 hidden="[[isLastLanguage_( |
219 detailLanguage_, languages.enabled.*)]]"> | 239 detailLanguage_, languages.enabled.*)]]"> |
220 $i18n{moveDown} | 240 $i18n{moveDown} |
221 </button> | 241 </button> |
222 <button class="dropdown-item" role="menuitem" | 242 <button class="dropdown-item" role="menuitem" |
(...skipping 26 matching lines...) Expand all Loading... |
249 </if> | 269 </if> |
250 </settings-animated-pages> | 270 </settings-animated-pages> |
251 <template is="dom-if" if="[[showAddLanguagesDialog_]]" restamp> | 271 <template is="dom-if" if="[[showAddLanguagesDialog_]]" restamp> |
252 <settings-add-languages-dialog languages="{{languages}}" | 272 <settings-add-languages-dialog languages="{{languages}}" |
253 language-helper="[[languageHelper]]"> | 273 language-helper="[[languageHelper]]"> |
254 </settings-add-languages-dialog> | 274 </settings-add-languages-dialog> |
255 </template> | 275 </template> |
256 </template> | 276 </template> |
257 <script src="languages_page.js"></script> | 277 <script src="languages_page.js"></script> |
258 </dom-module> | 278 </dom-module> |
OLD | NEW |