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

Unified Diff: chrome/browser/resources/settings/site_settings/site_data_details_dialog.js

Issue 2395853002: MD Settings: Migrating site_data_details_dialog to native select. (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_data_details_dialog.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
diff --git a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
index 9bfbdb0b6dc5c89d0975233f400c4a906509c776..94b9e910704c30695baad828a8fa8ad4deb4c326 100644
--- a/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/site_data_details_dialog.js
@@ -81,7 +81,7 @@ Polymer({
this.$.clear.textContent =
loadTimeData.getString('siteSettingsCookieRemove');
} else {
- this.$.picker.selected = this.entries_[0].id;
+ this.$.picker.value = this.entries_[0].id;
this.lastSelectedIndex_ = 0;
}
@@ -145,7 +145,7 @@ Polymer({
if (this.entries_.length <= this.lastSelectedIndex_)
this.lastSelectedIndex_ = this.entries_.length - 1;
var selectedId = this.entries_[this.lastSelectedIndex_].id;
- this.$.picker.selected = selectedId;
+ this.$.picker.value = selectedId;
this.populateItem_(selectedId, this.site_);
},
@@ -153,13 +153,14 @@ Polymer({
* A handler for when the user changes the dropdown box (switches cookies).
* @private
*/
- onItemSelected_: function(event) {
- this.populateItem_(event.detail.selected, this.site_);
+ onItemSelected_: function() {
+ var selectedItem = this.$.picker.value;
+ this.populateItem_(selectedItem, this.site_);
// Store the index of what was selected so we can re-select the next value
// when things get deleted.
for (var i = 0; i < this.entries_.length; ++i) {
- if (this.entries_[i].data.id == event.detail.selected) {
+ if (this.entries_[i].data.id == selectedItem) {
this.lastSelectedIndex_ = i;
break;
}
@@ -182,7 +183,7 @@ Polymer({
*/
onRemove_: function(event) {
this.browserProxy.removeCookie(this.nodePath_(
- this.site_, this.site_.data_.id, this.$.picker.selected));
+ this.site_, this.site_.data_.id, this.$.picker.value));
},
/**
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_data_details_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698