| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 | 8 |
| 9 // The GUID of the loaded address. | 9 // The GUID of the loaded address. |
| 10 var guid; | 10 var guid; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 * Creates, decorates and initializes the multi-value lists for full name, | 52 * Creates, decorates and initializes the multi-value lists for full name, |
| 53 * phone, fax, and email. | 53 * phone, fax, and email. |
| 54 * @private | 54 * @private |
| 55 */ | 55 */ |
| 56 createMultiValueLists_: function() { | 56 createMultiValueLists_: function() { |
| 57 var list = $('full-name-list'); | 57 var list = $('full-name-list'); |
| 58 options.autofillOptions.AutofillValuesList.decorate(list); | 58 options.autofillOptions.AutofillValuesList.decorate(list); |
| 59 list.autoExpands = true; | 59 list.autoExpands = true; |
| 60 | 60 |
| 61 list = $('phone-list'); | 61 list = $('phone-list'); |
| 62 options.autofillOptions.AutofillPhoneValuesList.decorate(list); | 62 options.autofillOptions.AutofillValuesList.decorate(list); |
| 63 list.autoExpands = true; | 63 list.autoExpands = true; |
| 64 | 64 |
| 65 list = $('fax-list'); | 65 list = $('fax-list'); |
| 66 options.autofillOptions.AutofillFaxValuesList.decorate(list); | 66 options.autofillOptions.AutofillValuesList.decorate(list); |
| 67 list.autoExpands = true; | 67 list.autoExpands = true; |
| 68 | 68 |
| 69 list = $('email-list'); | 69 list = $('email-list'); |
| 70 options.autofillOptions.AutofillValuesList.decorate(list); | 70 options.autofillOptions.AutofillValuesList.decorate(list); |
| 71 list.autoExpands = true; | 71 list.autoExpands = true; |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Updates the data model for the list named |listName| with the values from | 75 * Updates the data model for the list named |listName| with the values from |
| 76 * |entries|. | 76 * |entries|. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 AutofillEditAddressOverlay.loadAddress = function(address) { | 294 AutofillEditAddressOverlay.loadAddress = function(address) { |
| 295 AutofillEditAddressOverlay.getInstance().loadAddress_(address); | 295 AutofillEditAddressOverlay.getInstance().loadAddress_(address); |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 AutofillEditAddressOverlay.setTitle = function(title) { | 298 AutofillEditAddressOverlay.setTitle = function(title) { |
| 299 $('autofill-address-title').textContent = title; | 299 $('autofill-address-title').textContent = title; |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 AutofillEditAddressOverlay.setValidatedPhoneNumbers = function(numbers) { | |
| 303 AutofillEditAddressOverlay.getInstance().setMultiValueList_('phone-list', | |
| 304 numbers); | |
| 305 }; | |
| 306 | |
| 307 AutofillEditAddressOverlay.setValidatedFaxNumbers = function(numbers) { | |
| 308 AutofillEditAddressOverlay.getInstance().setMultiValueList_('fax-list', | |
| 309 numbers); | |
| 310 }; | |
| 311 | |
| 312 // Export | 302 // Export |
| 313 return { | 303 return { |
| 314 AutofillEditAddressOverlay: AutofillEditAddressOverlay | 304 AutofillEditAddressOverlay: AutofillEditAddressOverlay |
| 315 }; | 305 }; |
| 316 }); | 306 }); |
| OLD | NEW |