3dae99ac27
The item id exists as data attribute or as element.id postfix on multiple elements in an article. The basic idea is to traverse the DOM tree - starting from the event firing element - in reverse order till an article element is found. This article element is passed to the JavaScript functions. These JavaScript functions are getting the elements which they want to manipulate starting from the article utilizing the JavaScript querySelector function. The bootstrap themes had a conflicting and unused class style definied, which is removed by now.
24 lines
982 B
PHP
24 lines
982 B
PHP
<li class="hide-mobile">
|
|
<a
|
|
href="?action=mark-item-removed&id=<?= $item['id'] ?>&offset=<?= $offset ?>&redirect=<?= $redirect ?>&feed_id=<?= $item['feed_id'] ?>"
|
|
data-action="mark-removed"
|
|
class="delete"
|
|
><?= t('remove') ?></a>
|
|
</li>
|
|
<li>
|
|
<?php if ($item['status'] == 'unread'): ?>
|
|
<a
|
|
class="mark"
|
|
href="?action=mark-item-read&id=<?= $item['id'] ?>&offset=<?= $offset ?>&redirect=<?= $redirect ?>&feed_id=<?= $item['feed_id'] ?>"
|
|
data-action="mark-read"
|
|
data-reverse-label="<?= t('mark as unread') ?>"
|
|
><?= t('mark as read') ?></a>
|
|
<?php else: ?>
|
|
<a
|
|
class="mark"
|
|
href="?action=mark-item-unread&id=<?= $item['id'] ?>&offset=<?= $offset ?>&redirect=<?= $redirect ?>&feed_id=<?= $item['feed_id'] ?>"
|
|
data-action="mark-unread"
|
|
data-reverse-label="<?= t('mark as read') ?>"
|
|
><?= t('mark as unread') ?></a>
|
|
<?php endif ?>
|
|
</li>
|