Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/resources/options/autofill_edit_address_overlay.js

Issue 3125039: DOMUI: Several fixes for AutoFill page. (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 /** 8 /**
9 * AutoFillEditAddressOverlay class 9 * AutoFillEditAddressOverlay class
10 * Encapsulated handling of the 'Add Page' overlay page. 10 * Encapsulated handling of the 'Add Page' overlay page.
(...skipping 20 matching lines...) Expand all
31 $('autoFillEditAddressCancelButton').onclick = function(event) { 31 $('autoFillEditAddressCancelButton').onclick = function(event) {
32 self.dismissOverlay_(); 32 self.dismissOverlay_();
33 } 33 }
34 }, 34 },
35 35
36 /** 36 /**
37 * Clears any uncommited input, and dismisses the overlay. 37 * Clears any uncommited input, and dismisses the overlay.
38 * @private 38 * @private
39 */ 39 */
40 dismissOverlay_: function() { 40 dismissOverlay_: function() {
41 $('fullName').value = ''; 41 AutoFillEditAddressOverlay.clearInputFields();
42 $('companyName').value = '';
43 $('addrLine1').value = '';
44 $('addrLine2').value = '';
45 $('city').value = '';
46 $('state').value = '';
47 $('zipCode').value = '';
48 $('phone').value = '';
49 $('fax').value = '';
50 $('email').value = '';
51 OptionsPage.clearOverlays(); 42 OptionsPage.clearOverlays();
52 }, 43 },
44 };
53 45
46 AutoFillEditAddressOverlay.clearInputFields = function() {
47 $('fullName').value = '';
48 $('companyName').value = '';
49 $('addrLine1').value = '';
50 $('addrLine2').value = '';
51 $('city').value = '';
52 $('state').value = '';
53 $('zipCode').value = '';
54 $('phone').value = '';
55 $('fax').value = '';
56 $('email').value = '';
57 };
58
59 AutoFillEditAddressOverlay.setTitle = function(title) {
60 $('autoFillAddressTitle').textContent = title;
54 }; 61 };
55 62
56 // Export 63 // Export
57 return { 64 return {
58 AutoFillEditAddressOverlay: AutoFillEditAddressOverlay 65 AutoFillEditAddressOverlay: AutoFillEditAddressOverlay
59 }; 66 };
60 67
61 }); 68 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698