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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 * @param {!Event} e | 87 * @param {!Event} e |
88 * @private | 88 * @private |
89 */ | 89 */ |
90 onAddLanguagesTap_: function(e) { | 90 onAddLanguagesTap_: function(e) { |
91 e.preventDefault(); | 91 e.preventDefault(); |
92 this.showAddLanguagesDialog_ = true; | 92 this.showAddLanguagesDialog_ = true; |
93 this.async(function() { | 93 this.async(function() { |
94 var dialog = this.$$('settings-add-languages-dialog'); | 94 var dialog = this.$$('settings-add-languages-dialog'); |
95 dialog.addEventListener('close', function() { | 95 dialog.addEventListener('close', function() { |
96 this.showAddLanguagesDialog_ = false; | 96 this.showAddLanguagesDialog_ = false; |
97 this.$.addLanguages.focus(); | 97 cr.ui.focusWithoutInk(assert(this.$.addLanguages)); |
98 }.bind(this)); | 98 }.bind(this)); |
99 }); | 99 }); |
100 }, | 100 }, |
101 | 101 |
102 /** | 102 /** |
103 * Used to determine which "Move" buttons to show for ordering enabled | 103 * Used to determine which "Move" buttons to show for ordering enabled |
104 * languages. | 104 * languages. |
105 * @param {number} n | 105 * @param {number} n |
106 * @param {!LanguageState} language | 106 * @param {!LanguageState} language |
107 * @return {boolean} True if |language| is at the |n|th index in the list of | 107 * @return {boolean} True if |language| is at the |n|th index in the list of |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 if (e.target.tagName == expandButtonTag) | 559 if (e.target.tagName == expandButtonTag) |
560 return; | 560 return; |
561 | 561 |
562 /** @type {!CrExpandButtonElement} */ | 562 /** @type {!CrExpandButtonElement} */ |
563 var expandButton = e.currentTarget.querySelector(expandButtonTag); | 563 var expandButton = e.currentTarget.querySelector(expandButtonTag); |
564 assert(expandButton); | 564 assert(expandButton); |
565 expandButton.expanded = !expandButton.expanded; | 565 expandButton.expanded = !expandButton.expanded; |
566 }, | 566 }, |
567 }); | 567 }); |
568 })(); | 568 })(); |
OLD | NEW |