Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Jan 8, 2025
1 parent 6cb20cc commit a1693bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web_src/js/features/common-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export function initGlobalDeleteButton(): void {
// Some model/form elements will be filled by `data-id` / `data-name` / `data-data-xxx` attributes.
// If there is a form defined by `data-form`, then the form will be submitted as-is (without any modification).
// If there is no form, then the data will be posted to `data-url`.
// TODO: it's not encouraged to use this method. `show-modal` does far better than this.
// TODO: do not use this method in new code. `show-modal` / `link-action(data-modal-confirm)` does far better than this.
// FIXME: all legacy `delete-button` should be refactored to use `show-modal` or `link-action`
for (const btn of document.querySelectorAll<HTMLElement>('.delete-button')) {
btn.addEventListener('click', (e) => {
e.preventDefault();
Expand Down

0 comments on commit a1693bf

Please sign in to comment.