Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options.autofillOptions', function() { | 5 cr.define('options.autofillOptions', function() { |
| 6 /** @const */ var DeletableItem = options.DeletableItem; | 6 /** @const */ var DeletableItem = options.DeletableItem; |
| 7 /** @const */ var DeletableItemList = options.DeletableItemList; | 7 /** @const */ var DeletableItemList = options.DeletableItemList; |
| 8 /** @const */ var InlineEditableItem = options.InlineEditableItem; | 8 /** @const */ var InlineEditableItem = options.InlineEditableItem; |
| 9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; | 9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; |
| 10 | 10 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 448 InlineEditableItemList.prototype.handleListFocusChange_.call(this, e); | 448 InlineEditableItemList.prototype.handleListFocusChange_.call(this, e); |
| 449 | 449 |
| 450 if (!e.newValue) { | 450 if (!e.newValue) { |
| 451 // When the list loses focus, unselect all the elements. | 451 // When the list loses focus, unselect all the elements. |
| 452 this.selectionModel.unselectAll(); | 452 this.selectionModel.unselectAll(); |
| 453 } else { | 453 } else { |
| 454 // When the list gains focus, select the first item if nothing else is | 454 // When the list gains focus, select the first item if nothing else is |
| 455 // selected. | 455 // selected. |
| 456 var firstItem = this.getListItemByIndex(0); | 456 var firstItem = this.getListItemByIndex(0); |
| 457 if (!selectedItem && firstItem && e.newValue) | 457 if (!selectedItem && firstItem && e.newValue) |
| 458 firstItem.handleFocus_(); | 458 firstItem.handleFocus(); |
|
bondd
2014/11/11 23:43:24
Renamed this in DeletableItem and missed updating
| |
| 459 } | 459 } |
| 460 }, | 460 }, |
| 461 | 461 |
| 462 /** | 462 /** |
| 463 * Called when a new list item should be validated; subclasses are | 463 * Called when a new list item should be validated; subclasses are |
| 464 * responsible for implementing if validation is required. | 464 * responsible for implementing if validation is required. |
| 465 * @param {number} index The index of the item that was inserted or changed. | 465 * @param {number} index The index of the item that was inserted or changed. |
| 466 * @param {number} remove The number items to remove. | 466 * @param {number} remove The number items to remove. |
| 467 * @param {string} value The value of the item to insert. | 467 * @param {string} value The value of the item to insert. |
| 468 */ | 468 */ |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 CreditCardListItem: CreditCardListItem, | 561 CreditCardListItem: CreditCardListItem, |
| 562 ValuesListItem: ValuesListItem, | 562 ValuesListItem: ValuesListItem, |
| 563 NameListItem: NameListItem, | 563 NameListItem: NameListItem, |
| 564 AutofillAddressList: AutofillAddressList, | 564 AutofillAddressList: AutofillAddressList, |
| 565 AutofillCreditCardList: AutofillCreditCardList, | 565 AutofillCreditCardList: AutofillCreditCardList, |
| 566 AutofillValuesList: AutofillValuesList, | 566 AutofillValuesList: AutofillValuesList, |
| 567 AutofillNameValuesList: AutofillNameValuesList, | 567 AutofillNameValuesList: AutofillNameValuesList, |
| 568 AutofillPhoneValuesList: AutofillPhoneValuesList, | 568 AutofillPhoneValuesList: AutofillPhoneValuesList, |
| 569 }; | 569 }; |
| 570 }); | 570 }); |
| OLD | NEW |