From 8926a7f6c845384b89f49f425ebe41722c1ae5ac Mon Sep 17 00:00:00 2001 From: Thririot Christophe Date: Sat, 13 Jul 2013 16:29:30 -0400 Subject: [PATCH] Mark as read does not reload the page anymore --- assets/js/app.js | 5 +++++ templates/unread_items.php | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 57aa789..2f50e65 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -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; diff --git a/templates/unread_items.php b/templates/unread_items.php index edb86ea..ad67ae7 100644 --- a/templates/unread_items.php +++ b/templates/unread_items.php @@ -38,14 +38,20 @@ | - | + + + |