Mark as read does not reload the page anymore

This commit is contained in:
Thririot Christophe 2013-07-13 16:29:30 -04:00
parent e2121cc72d
commit 8926a7f6c8
2 changed files with 13 additions and 2 deletions

View File

@ -400,6 +400,11 @@
refresh_feed(feed_id);
break;
case 'mark-read':
e.preventDefault();
var item_id = e.target.getAttribute("data-item-id");
mark_as_read(item_id);
break;
case 'original-link':
var item_id = e.target.getAttribute("data-item-id");
mark_as_read(item_id);
break;

View File

@ -38,14 +38,20 @@
<a id="bookmark-<?= $item_id ?>" href="?action=bookmark&amp;value=1&amp;id=<?= $item_id ?>&amp;redirect=unread&amp;offset=<?= $offset ?>"><?= t('bookmark') ?></a> |
<?php endif ?>
<a href="?action=mark-item-read&amp;id=<?= $item_id ?>&amp;offset=<?= $offset ?>"><?= t('mark as read') ?></a> |
<a
href="?action=mark-item-read&amp;id=<?= $item_id ?>&amp;offset=<?= $offset ?>"
data-action="mark-read"
data-item-id="<?= $item_id ?>"
>
<?= t('mark as read') ?>
</a> |
<a
href="<?= $item['url'] ?>"
id="original-<?= $item_id ?>"
rel="noreferrer"
target="_blank"
data-item-id="<?= $item_id ?>"
data-action="mark-read"
data-action="original-link"
data-hide="true"
>
<?= t('original link') ?>