diff --git a/frontends/etiquette_flask/templates/bookmarks.html b/frontends/etiquette_flask/templates/bookmarks.html
index 1c9bf6e..e4f1871 100644
--- a/frontends/etiquette_flask/templates/bookmarks.html
+++ b/frontends/etiquette_flask/templates/bookmarks.html
@@ -51,7 +51,7 @@
Bookmarks
{% for bookmark in bookmarks %}
-
+
@@ -108,9 +108,10 @@ function create_bookmark_form()
return api.bookmarks.create(url, title, common.refresh);
}
-function delete_bookmark_form()
+function delete_bookmark_form(event)
{
- api.bookmarks.delete('{{bookmark.id}}', common.refresh);
+ const id = event.target.closest(".bookmark_card").dataset.id;
+ api.bookmarks.delete(id, common.refresh);
}
function on_open(ed, edit_element_map)
@@ -158,7 +159,7 @@ function create_editors()
const title_div = card.getElementsByClassName("bookmark_title")[0];
const url_div = card.getElementsByClassName("bookmark_url")[0];
ed = new editor.Editor([title_div, url_div], on_open, on_save, on_cancel);
- ed.misc_data["bookmark_id"] = card.dataset.bookmarkId;
+ ed.misc_data["bookmark_id"] = card.dataset.id;
}
}