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

Unified Diff: chrome/browser/resources/options/autofill_edit_address_overlay.js

Issue 3157027: DOMUI: Add the basic HTML for the 'Edit Address' AutoFill overlay. (Closed)
Patch Set: Review fixes 2. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/autofill_edit_address_overlay.js
diff --git a/chrome/browser/resources/options/autofill_edit_address_overlay.js b/chrome/browser/resources/options/autofill_edit_address_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..4b2d389085f6f78c794bb48823a65000b792962e
--- /dev/null
+++ b/chrome/browser/resources/options/autofill_edit_address_overlay.js
@@ -0,0 +1,61 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('options', function() {
+ const OptionsPage = options.OptionsPage;
+
+ /**
+ * AutoFillEditAddressOverlay class
+ * Encapsulated handling of the 'Add Page' overlay page.
+ * @class
+ */
+ function AutoFillEditAddressOverlay() {
+ OptionsPage.call(this, 'autoFillEditAddressOverlay',
+ templateData.autoFillEditAddressTitle,
+ 'autoFillEditAddressOverlay');
+ }
+
+ cr.addSingletonGetter(AutoFillEditAddressOverlay);
+
+ AutoFillEditAddressOverlay.prototype = {
+ __proto__: OptionsPage.prototype,
+
+ /**
+ * Initializes the page.
+ */
+ initializePage: function() {
+ OptionsPage.prototype.initializePage.call(this);
+
+ var self = this;
+ $('autoFillEditAddressCancelButton').onclick = function(event) {
+ self.dismissOverlay_();
+ }
+ },
+
+ /**
+ * Clears any uncommited input, and dismisses the overlay.
+ * @private
+ */
+ dismissOverlay_: function() {
+ $('fullName').value = '';
+ $('companyName').value = '';
+ $('addrLine1').value = '';
+ $('addrLine2').value = '';
+ $('city').value = '';
+ $('state').value = '';
+ $('zipCode').value = '';
+ $('phone').value = '';
+ $('fax').value = '';
+ $('email').value = '';
+ OptionsPage.clearOverlays();
+ },
+
+ };
+
+ // Export
+ return {
+ AutoFillEditAddressOverlay: AutoFillEditAddressOverlay
+ };
+
+});

Powered by Google App Engine
This is Rietveld 408576698