| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 /** @private */ | 59 /** @private */ |
| 60 showAddLanguagesDialog_: Boolean, | 60 showAddLanguagesDialog_: Boolean, |
| 61 }, | 61 }, |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * Handler for enabling or disabling spell check. | 64 * Handler for enabling or disabling spell check. |
| 65 * @param {!{target: Element, model: !{item: !LanguageState}}} e | 65 * @param {!{target: Element, model: !{item: !LanguageState}}} e |
| 66 */ | 66 */ |
| 67 onSpellCheckChange_: function(e) { | 67 onSpellCheckChange_: function(e) { |
| 68 this.languageHelper.toggleSpellCheck(e.model.item.language.code, | 68 var item = e.model.item; |
| 69 e.target.checked); | 69 if (!item.language.supportsSpellcheck) |
| 70 return; |
| 71 |
| 72 this.languageHelper.toggleSpellCheck(item.language.code, |
| 73 !item.spellCheckEnabled); |
| 70 }, | 74 }, |
| 71 | 75 |
| 72 /** @private */ | 76 /** @private */ |
| 73 onBackTap_: function() { | 77 onBackTap_: function() { |
| 74 this.$.pages.back(); | 78 this.$.pages.back(); |
| 75 }, | 79 }, |
| 76 | 80 |
| 77 /** | 81 /** |
| 78 * Stamps and opens the Add Languages dialog, registering a listener to | 82 * Stamps and opens the Add Languages dialog, registering a listener to |
| 79 * disable the dialog's dom-if again on close. | 83 * disable the dialog's dom-if again on close. |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 if (e.target.tagName == expandButtonTag) | 548 if (e.target.tagName == expandButtonTag) |
| 545 return; | 549 return; |
| 546 | 550 |
| 547 /** @type {!CrExpandButtonElement} */ | 551 /** @type {!CrExpandButtonElement} */ |
| 548 var expandButton = e.currentTarget.querySelector(expandButtonTag); | 552 var expandButton = e.currentTarget.querySelector(expandButtonTag); |
| 549 assert(expandButton); | 553 assert(expandButton); |
| 550 expandButton.expanded = !expandButton.expanded; | 554 expandButton.expanded = !expandButton.expanded; |
| 551 }, | 555 }, |
| 552 }); | 556 }); |
| 553 })(); | 557 })(); |
| OLD | NEW |