mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
Fix notification dismissal
This commit is contained in:
parent
3f832e89f6
commit
c30406bcca
7 changed files with 19 additions and 12 deletions
|
@ -52,6 +52,13 @@ const actions = {
|
||||||
addTag(document.querySelector(data.el.closest('[data-target]').dataset.target), data.el.dataset.tagName);
|
addTag(document.querySelector(data.el.closest('[data-target]').dataset.target), data.el.dataset.tagName);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideParent(data) {
|
||||||
|
const base = data.el.closest(data.value);
|
||||||
|
if (base) {
|
||||||
|
base.classList.add('hidden');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
tab(data) {
|
tab(data) {
|
||||||
const block = data.el.parentNode.parentNode,
|
const block = data.el.parentNode.parentNode,
|
||||||
newTab = $(`.block__tab[data-tab="${data.value}"]`),
|
newTab = $(`.block__tab[data-tab="${data.value}"]`),
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/channels/#{@notification.channel}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/channels/#{@notification.channel}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/channels/#{@notification.channel}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/channels/#{@notification.channel}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/images/#{image}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/images/#{image}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/images/#{image}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/images/#{image}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/galleries/#{gallery}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/galleries/#{gallery}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/galleries/#{gallery}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/galleries/#{gallery}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/images/#{target}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/images/#{target}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/images/#{target}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/images/#{target}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/forums/#{topic.forum}/topics/#{topic}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/forums/#{topic.forum}/topics/#{topic}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/forums/#{topic.forum}/topics/#{topic}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/forums/#{topic.forum}/topics/#{topic}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
=> pretty_time @notification.updated_at
|
=> pretty_time @notification.updated_at
|
||||||
|
|
||||||
.flex.flex--centered.flex--no-wrap
|
.flex.flex--centered.flex--no-wrap
|
||||||
a.button.button--separate-right title="Delete" href=~p"/forums/#{forum}/topics/#{topic}/read" data-method="post" data-remote="true"
|
a.button.button--separate-right title="Delete" href=~p"/forums/#{forum}/topics/#{topic}/read" data-method="post" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-trash
|
i.fa.fa-trash
|
||||||
|
|
||||||
a.button title="Unsubscribe" href=~p"/forums/#{forum}/subscription" data-method="delete" data-remote="true"
|
a.button title="Unsubscribe" href=~p"/forums/#{forum}/subscription" data-method="delete" data-remote="true" data-click-hideparent=".notification"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
|
|
Loading…
Reference in a new issue