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 ///////////////////////////////////////////////////////////////////////////// | 9 ///////////////////////////////////////////////////////////////////////////// |
10 // AutoFillOptions class: | 10 // AutoFillOptions class: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 /** | 81 /** |
82 * Shows the 'Add address' overlay, specifically by loading the | 82 * Shows the 'Add address' overlay, specifically by loading the |
83 * 'Edit address' overlay, emptying the input fields and modifying the | 83 * 'Edit address' overlay, emptying the input fields and modifying the |
84 * overlay title. | 84 * overlay title. |
85 * @private | 85 * @private |
86 */ | 86 */ |
87 showAddAddressOverlay_: function() { | 87 showAddAddressOverlay_: function() { |
88 var title = localStrings.getString('addAddressTitle'); | 88 var title = localStrings.getString('addAddressTitle'); |
89 AutoFillEditAddressOverlay.setTitle(title); | 89 AutoFillEditAddressOverlay.setTitle(title); |
90 AutoFillEditAddressOverlay.clearInputFields(); | 90 AutoFillEditAddressOverlay.clearInputFields(); |
91 OptionsPage.navigateToPage('autoFillEditAddressOverlay'); | 91 OptionsPage.navigateToPage('auto-fill-edit-address-overlay'); |
92 }, | 92 }, |
93 | 93 |
94 /** | 94 /** |
95 * Shows the 'Add credit card' overlay, specifically by loading the | 95 * Shows the 'Add credit card' overlay, specifically by loading the |
96 * 'Edit credit card' overlay, emptying the input fields and modifying the | 96 * 'Edit credit card' overlay, emptying the input fields and modifying the |
97 * overlay title. | 97 * overlay title. |
98 * @private | 98 * @private |
99 */ | 99 */ |
100 showAddCreditCardOverlay_: function() { | 100 showAddCreditCardOverlay_: function() { |
101 var title = localStrings.getString('addCreditCardTitle'); | 101 var title = localStrings.getString('addCreditCardTitle'); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 /** | 165 /** |
166 * Shows the 'Edit address' overlay, using the data in |address| to fill the | 166 * Shows the 'Edit address' overlay, using the data in |address| to fill the |
167 * input fields. |address| is a list with one item, an associative array | 167 * input fields. |address| is a list with one item, an associative array |
168 * that contains the address data. | 168 * that contains the address data. |
169 * @private | 169 * @private |
170 */ | 170 */ |
171 showEditAddressOverlay_: function(address) { | 171 showEditAddressOverlay_: function(address) { |
172 var title = localStrings.getString('editAddressTitle'); | 172 var title = localStrings.getString('editAddressTitle'); |
173 AutoFillEditAddressOverlay.setTitle(title); | 173 AutoFillEditAddressOverlay.setTitle(title); |
174 AutoFillEditAddressOverlay.loadAddress(address); | 174 AutoFillEditAddressOverlay.loadAddress(address); |
175 OptionsPage.navigateToPage('autoFillEditAddressOverlay'); | 175 OptionsPage.navigateToPage('auto-fill-edit-address-overlay'); |
176 }, | 176 }, |
177 | 177 |
178 /** | 178 /** |
179 * Shows the 'Edit credit card' overlay, using the data in |credit_card| to | 179 * Shows the 'Edit credit card' overlay, using the data in |credit_card| to |
180 * fill the input fields. |address| is a list with one item, an associative | 180 * fill the input fields. |address| is a list with one item, an associative |
181 * array that contains the credit card data. | 181 * array that contains the credit card data. |
182 * @private | 182 * @private |
183 */ | 183 */ |
184 showEditCreditCardOverlay_: function(creditCard) { | 184 showEditCreditCardOverlay_: function(creditCard) { |
185 var title = localStrings.getString('editCreditCardTitle'); | 185 var title = localStrings.getString('editCreditCardTitle'); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 AutoFillOptions.getInstance().showEditCreditCardOverlay_(creditCard); | 221 AutoFillOptions.getInstance().showEditCreditCardOverlay_(creditCard); |
222 }; | 222 }; |
223 | 223 |
224 // Export | 224 // Export |
225 return { | 225 return { |
226 AutoFillOptions: AutoFillOptions | 226 AutoFillOptions: AutoFillOptions |
227 }; | 227 }; |
228 | 228 |
229 }); | 229 }); |
230 | 230 |
OLD | NEW |