fix selectors
isekai-main
Barış Soner Uşaklı 2 years ago
parent 24bd9d4e88
commit 8f6a68ca09

@ -110,10 +110,10 @@ define('forum/post-queue', [
if (listEl) {
listEl.addEventListener('click', (e) => {
const subselector = e.target.closest('[data-action]');
console.log(subselector);
if (subselector) {
const action = subselector.getAttribute('data-action');
const uid = subselector.closest('[data-uid]').getAttribute('data-uid');
switch (action) {
case 'editCategory': {
const categoryEl = e.target.closest('[data-id]').querySelector('.topic-category');

@ -45,7 +45,7 @@
{{{ end }}}
{{{ each posts }}}
<div class="card mb-3" data-id="{posts.id}">
<div class="card mb-3" data-id="{./id}"data-uid="{./user.uid}">
<div class="card-header">
{{{ if !singlePost }}}
<input type="checkbox" class="form-check-input" autocomplete="off" />

Loading…
Cancel
Save