| 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 | 7 |
| 8 // The GUID of the loaded credit card. | 8 // The GUID of the loaded credit card. |
| 9 var guid_; | 9 var guid_; |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Initializes the page. | 28 * Initializes the page. |
| 29 */ | 29 */ |
| 30 initializePage: function() { | 30 initializePage: function() { |
| 31 OptionsPage.prototype.initializePage.call(this); | 31 OptionsPage.prototype.initializePage.call(this); |
| 32 | 32 |
| 33 var self = this; | 33 var self = this; |
| 34 $('autofill-edit-credit-card-cancel-button').onclick = function(event) { | 34 $('autofill-edit-credit-card-cancel-button').onclick = function(event) { |
| 35 self.dismissOverlay_(); | 35 self.dismissOverlay_(); |
| 36 } | 36 }; |
| 37 $('autofill-edit-credit-card-apply-button').onclick = function(event) { | 37 $('autofill-edit-credit-card-apply-button').onclick = function(event) { |
| 38 self.saveCreditCard_(); | 38 self.saveCreditCard_(); |
| 39 self.dismissOverlay_(); | 39 self.dismissOverlay_(); |
| 40 } | 40 }; |
| 41 | 41 |
| 42 self.guid_ = ''; | 42 self.guid_ = ''; |
| 43 self.hasEditedNumber_ = false; | 43 self.hasEditedNumber_ = false; |
| 44 self.clearInputFields_(); | 44 self.clearInputFields_(); |
| 45 self.connectInputEvents_(); | 45 self.connectInputEvents_(); |
| 46 self.setDefaultSelectOptions_(); | 46 self.setDefaultSelectOptions_(); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Clears any uncommitted input, and dismisses the overlay. | 50 * Clears any uncommitted input, and dismisses the overlay. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 AutofillEditCreditCardOverlay.setTitle = function(title) { | 197 AutofillEditCreditCardOverlay.setTitle = function(title) { |
| 198 $('autofill-credit-card-title').textContent = title; | 198 $('autofill-credit-card-title').textContent = title; |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 // Export | 201 // Export |
| 202 return { | 202 return { |
| 203 AutofillEditCreditCardOverlay: AutofillEditCreditCardOverlay | 203 AutofillEditCreditCardOverlay: AutofillEditCreditCardOverlay |
| 204 }; | 204 }; |
| 205 }); | 205 }); |
| OLD | NEW |