Chromium Code Reviews| 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-edit-dictionary-page' is a sub-page for editing | 6 * @fileoverview 'settings-edit-dictionary-page' is a sub-page for editing |
| 7 * the "dictionary" of custom words used for spell check. | 7 * the "dictionary" of custom words used for spell check. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-edit-dictionary-page', | 10 is: 'settings-edit-dictionary-page', |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 | 104 |
| 105 /** | 105 /** |
| 106 * Handles tapping on the Add Word button. | 106 * Handles tapping on the Add Word button. |
| 107 */ | 107 */ |
| 108 onAddWordTap_: function(e) { | 108 onAddWordTap_: function(e) { |
| 109 this.addWordFromInput_(); | 109 this.addWordFromInput_(); |
| 110 this.$.newWord.focus(); | 110 this.$.newWord.focus(); |
| 111 }, | 111 }, |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * Handles tapping on a paper-item's Remove Word icon button. | 114 * Handles tapping on a "Remove word" icon button. |
|
dschuyler
2017/06/10 01:41:49
May be redundant with function name. (but it's ok
dpapad
2017/06/12 17:17:33
Ack.
| |
| 115 * @param {!{model: !{item: string}}} e | 115 * @param {!{model: !{item: string}}} e |
| 116 */ | 116 */ |
| 117 onRemoveWordTap_: function(e) { | 117 onRemoveWordTap_: function(e) { |
| 118 this.languageSettingsPrivate.removeSpellcheckWord(e.model.item); | 118 this.languageSettingsPrivate.removeSpellcheckWord(e.model.item); |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * Adds the word in the paper-input to the dictionary. | 122 * Adds the word in the paper-input to the dictionary. |
| 123 */ | 123 */ |
| 124 addWordFromInput_: function() { | 124 addWordFromInput_: function() { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * Checks if any words exists in the dictionary. | 138 * Checks if any words exists in the dictionary. |
| 139 * @private | 139 * @private |
| 140 * @return {boolean} | 140 * @return {boolean} |
| 141 */ | 141 */ |
| 142 hasWords_: function() { | 142 hasWords_: function() { |
| 143 return this.words_.length > 0; | 143 return this.words_.length > 0; |
| 144 } | 144 } |
| 145 }); | 145 }); |
| OLD | NEW |