etiquette/frontends/etiquette_flask/static/js/cards.js
Ethan Dalool b0f8414c11
Add photo_card.photo_card_tools infra for contextual tools.
I'm not satisfied with the appearance of the toolbutton just yet,
but we can revise that later.
2021-01-21 15:37:30 -08:00

28 lines
807 B
JavaScript

const cards = {};
/******************************************************************************/
cards.albums = {};
/******************************************************************************/
cards.bookmarks = {};
/******************************************************************************/
cards.photos = {};
cards.photos.show_tools =
function show_tools(event)
{
event.stopPropagation();
event.preventDefault();
const photo_card = event.target.closest(".photo_card");
const toolbox = photo_card.getElementsByClassName("photo_card_tools")[0];
if (toolbox.childElementCount === 0)
{
return;
}
contextmenus.show_menu(event, toolbox);
return false;
}
/******************************************************************************/
cards.tags = {};