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

Side by Side Diff: chrome/browser/resources/settings/languages_page/languages_page.js

Issue 2683583008: MD Settings: Convert spell-check from checkbox to toggle. (Closed)
Patch Set: Merge branch 'master' into spell-check Created 3 years, 10 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
« no previous file with comments | « chrome/browser/resources/settings/languages_page/languages_page.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/languages_page/languages_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698