This commit is contained in:
Frederic Guillot 2013-07-14 12:40:11 -04:00
commit b5a5afba37
2 changed files with 13 additions and 2 deletions

View File

@ -400,6 +400,11 @@
refresh_feed(feed_id); refresh_feed(feed_id);
break; break;
case 'mark-read': 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"); var item_id = e.target.getAttribute("data-item-id");
mark_as_read(item_id); mark_as_read(item_id);
break; 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> | <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 ?> <?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 <a
href="<?= $item['url'] ?>" href="<?= $item['url'] ?>"
id="original-<?= $item_id ?>" id="original-<?= $item_id ?>"
rel="noreferrer" rel="noreferrer"
target="_blank" target="_blank"
data-item-id="<?= $item_id ?>" data-item-id="<?= $item_id ?>"
data-action="mark-read" data-action="original-link"
data-hide="true" data-hide="true"
> >
<?= t('original link') ?> <?= t('original link') ?>