Commit 157f6188 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Cleanup/modernize history_deletion_dialog

- Remove unnecessary indentation
- Use "show-on-attach" attribute instead of custom code
- s/Tap/Click/

Inspired by comments on crrev.com/c/2288850

Bug: none
Change-Id: If0bc7fb58e2d0a41fa272cf90feb014ad859d739
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309430Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790408}
parent e4eb1a1d
<style include="settings-shared"></style>
<style include="settings-shared"></style>
<cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{historyDeletionDialogTitle}</div>
<div slot="body">$i18nRaw{historyDeletionDialogBody}</div>
<div slot="button-container">
<cr-button class="action-button" on-click="onOkTap_">
$i18n{historyDeletionDialogOK}
</cr-button>
</div>
</cr-dialog>
<cr-dialog id="dialog" close-text="$i18n{close}" show-on-attach>
<div slot="title">$i18n{historyDeletionDialogTitle}</div>
<div slot="body">$i18nRaw{historyDeletionDialogBody}</div>
<div slot="button-container">
<cr-button class="action-button" on-click="onOkClick_">
$i18n{historyDeletionDialogOK}
</cr-button>
</div>
</cr-dialog>
......@@ -19,16 +19,11 @@ Polymer({
_template: html`{__html_template__}`,
/** @override */
attached() {
this.$.dialog.showModal();
},
/**
* Tap handler for the "OK" button.
* Click handler for the "OK" button.
* @private
*/
onOkTap_() {
onOkClick_() {
this.$.dialog.close();
},
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment