| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 * @param {!Event} e | 84 * @param {!Event} e |
| 85 * @private | 85 * @private |
| 86 */ | 86 */ |
| 87 onAddLanguagesTap_: function(e) { | 87 onAddLanguagesTap_: function(e) { |
| 88 e.preventDefault(); | 88 e.preventDefault(); |
| 89 this.showAddLanguagesDialog_ = true; | 89 this.showAddLanguagesDialog_ = true; |
| 90 this.async(function() { | 90 this.async(function() { |
| 91 var dialog = this.$$('settings-add-languages-dialog'); | 91 var dialog = this.$$('settings-add-languages-dialog'); |
| 92 dialog.addEventListener('close', function() { | 92 dialog.addEventListener('close', function() { |
| 93 this.showAddLanguagesDialog_ = false; | 93 this.showAddLanguagesDialog_ = false; |
| 94 this.$.addLanguages.focus(); |
| 94 }.bind(this)); | 95 }.bind(this)); |
| 95 }); | 96 }); |
| 96 }, | 97 }, |
| 97 | 98 |
| 98 /** | 99 /** |
| 99 * Used to determine which "Move" buttons to show for ordering enabled | 100 * Used to determine which "Move" buttons to show for ordering enabled |
| 100 * languages. | 101 * languages. |
| 101 * @param {number} n | 102 * @param {number} n |
| 102 * @param {!LanguageState} language | 103 * @param {!LanguageState} language |
| 103 * @return {boolean} True if |language| is at the |n|th index in the list of | 104 * @return {boolean} True if |language| is at the |n|th index in the list of |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 if (e.target.tagName == expandButtonTag) | 538 if (e.target.tagName == expandButtonTag) |
| 538 return; | 539 return; |
| 539 | 540 |
| 540 /** @type {!CrExpandButtonElement} */ | 541 /** @type {!CrExpandButtonElement} */ |
| 541 var expandButton = e.currentTarget.querySelector(expandButtonTag); | 542 var expandButton = e.currentTarget.querySelector(expandButtonTag); |
| 542 assert(expandButton); | 543 assert(expandButton); |
| 543 expandButton.expanded = !expandButton.expanded; | 544 expandButton.expanded = !expandButton.expanded; |
| 544 }, | 545 }, |
| 545 }); | 546 }); |
| 546 })(); | 547 })(); |
| OLD | NEW |