diff options
author | Dave Z <dzaikos@users.noreply.github.com> | 2018-08-28 23:44:34 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-08-28 20:44:34 -0700 |
commit | 5341bbcbe27fd8a9e73f4eeb18319daf5421dcb4 (patch) | |
tree | 3e905f97ac2c4d086f990d674072e916d74fc081 /ui/static/js/bootstrap.js | |
parent | 4f62a704e2cb77e2c9d99c6f9fa45f3485cf0af7 (diff) |
Add toggle status button to entry page
Diffstat (limited to 'ui/static/js/bootstrap.js')
-rw-r--r-- | ui/static/js/bootstrap.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/static/js/bootstrap.js b/ui/static/js/bootstrap.js index 3e9004f..fe6e87c 100644 --- a/ui/static/js/bootstrap.js +++ b/ui/static/js/bootstrap.js @@ -46,7 +46,11 @@ document.addEventListener("DOMContentLoaded", function() { mouseHandler.onClick("a[data-toggle-status]", (event) => { event.preventDefault(); - let currentItem = DomHelper.findParent(event.target, "item"); + let currentItem = DomHelper.findParent(event.target, "entry"); + if (! currentItem) { + currentItem = DomHelper.findParent(event.target, "item"); + } + if (currentItem) { EntryHandler.toggleEntryStatus(currentItem); } |