| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview 'settings-languages-page' is the settings page | 6 * @fileoverview 'settings-languages-page' is the settings page |
| 7 * for language and input method settings. | 7 * for language and input method settings. |
| 8 */ | 8 */ |
| 9 cr.exportPath('settings'); | 9 cr.exportPath('settings'); |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * The language to display the details for. | 53 * The language to display the details for. |
| 54 * @type {!LanguageState|undefined} | 54 * @type {!LanguageState|undefined} |
| 55 * @private | 55 * @private |
| 56 */ | 56 */ |
| 57 detailLanguage_: Object, | 57 detailLanguage_: Object, |
| 58 | 58 |
| 59 /** @private */ | 59 /** @private */ |
| 60 showAddLanguagesDialog_: Boolean, | 60 showAddLanguagesDialog_: Boolean, |
| 61 |
| 62 /** @private {!Map<string, string>} */ |
| 63 focusConfig_: { |
| 64 type: Object, |
| 65 value: function() { |
| 66 var map = new Map(); |
| 67 // <if expr="not is_macosx"> |
| 68 map.set( |
| 69 settings.Route.EDIT_DICTIONARY.path, |
| 70 '#spellCheckCollapse .subpage-arrow'); |
| 71 // </if> |
| 72 // <if expr="chromeos"> |
| 73 map.set( |
| 74 settings.Route.INPUT_METHODS.path, |
| 75 '#inputMethodsCollapse .subpage-arrow'); |
| 76 // </if> |
| 77 return map; |
| 78 }, |
| 79 }, |
| 61 }, | 80 }, |
| 62 | 81 |
| 63 /** | 82 /** |
| 64 * Handler for enabling or disabling spell check. | 83 * Handler for enabling or disabling spell check. |
| 65 * @param {!{target: Element, model: !{item: !LanguageState}}} e | 84 * @param {!{target: Element, model: !{item: !LanguageState}}} e |
| 66 */ | 85 */ |
| 67 onSpellCheckChange_: function(e) { | 86 onSpellCheckChange_: function(e) { |
| 68 var item = e.model.item; | 87 var item = e.model.item; |
| 69 if (!item.language.supportsSpellcheck) | 88 if (!item.language.supportsSpellcheck) |
| 70 return; | 89 return; |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 if (e.target.tagName == expandButtonTag) | 557 if (e.target.tagName == expandButtonTag) |
| 539 return; | 558 return; |
| 540 | 559 |
| 541 /** @type {!CrExpandButtonElement} */ | 560 /** @type {!CrExpandButtonElement} */ |
| 542 var expandButton = e.currentTarget.querySelector(expandButtonTag); | 561 var expandButton = e.currentTarget.querySelector(expandButtonTag); |
| 543 assert(expandButton); | 562 assert(expandButton); |
| 544 expandButton.expanded = !expandButton.expanded; | 563 expandButton.expanded = !expandButton.expanded; |
| 545 }, | 564 }, |
| 546 }); | 565 }); |
| 547 })(); | 566 })(); |
| OLD | NEW |