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

Side by Side Diff: chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js

Issue 2707383002: MD Settings: change confirm text to save startup url's dialog. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview 'settings-startup-url-dialog' is a component for adding 6 * @fileoverview 'settings-startup-url-dialog' is a component for adding
7 * or editing a startup URL entry. 7 * or editing a startup URL entry.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-startup-url-dialog', 10 is: 'settings-startup-url-dialog',
(...skipping 18 matching lines...) Expand all
29 29
30 /** @private {!settings.SearchEnginesBrowserProxy} */ 30 /** @private {!settings.SearchEnginesBrowserProxy} */
31 browserProxy_: null, 31 browserProxy_: null,
32 32
33 /** @override */ 33 /** @override */
34 attached: function() { 34 attached: function() {
35 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance(); 35 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance();
36 36
37 if (this.model) { 37 if (this.model) {
38 this.dialogTitle_ = loadTimeData.getString('onStartupEditPage'); 38 this.dialogTitle_ = loadTimeData.getString('onStartupEditPage');
39 this.actionButtonText_ = loadTimeData.getString('edit'); 39 this.actionButtonText_ = loadTimeData.getString('save');
40 this.$.actionButton.disabled = false; 40 this.$.actionButton.disabled = false;
41 // Pre-populate the input field. 41 // Pre-populate the input field.
42 this.url_ = this.model.url; 42 this.url_ = this.model.url;
43 } else { 43 } else {
44 this.dialogTitle_ = loadTimeData.getString('onStartupAddNewPage'); 44 this.dialogTitle_ = loadTimeData.getString('onStartupAddNewPage');
45 this.actionButtonText_ = loadTimeData.getString('add'); 45 this.actionButtonText_ = loadTimeData.getString('add');
46 this.$.actionButton.disabled = true; 46 this.$.actionButton.disabled = true;
47 } 47 }
48 this.$.dialog.showModal(); 48 this.$.dialog.showModal();
49 }, 49 },
(...skipping 26 matching lines...) Expand all
76 this.onActionButtonTap_(); 76 this.onActionButtonTap_();
77 }, 77 },
78 78
79 /** @private */ 79 /** @private */
80 validate_: function() { 80 validate_: function() {
81 this.browserProxy_.validateStartupPage(this.url_).then(function(isValid) { 81 this.browserProxy_.validateStartupPage(this.url_).then(function(isValid) {
82 this.$.actionButton.disabled = !isValid; 82 this.$.actionButton.disabled = !isValid;
83 }.bind(this)); 83 }.bind(this));
84 }, 84 },
85 }); 85 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698