mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Fix subscription targets
This commit is contained in:
parent
9b766733a5
commit
49e94afa1e
8 changed files with 11 additions and 11 deletions
|
@ -17,7 +17,7 @@ function makeRequest(verb) {
|
|||
function bindSubscriptionLinks() {
|
||||
delegate(document, 'fetchcomplete', {
|
||||
'.js-subscription-link': event => {
|
||||
const target = $('#js-subscription-target');
|
||||
const target = event.target.closest('.js-subscription-target');
|
||||
event.detail.text().then(text => {
|
||||
target.outerHTML = text;
|
||||
});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#js-subscription-target
|
||||
' Error!
|
||||
.js-subscription-target
|
||||
' Error!
|
||||
|
|
|
@ -6,7 +6,7 @@ elixir:
|
|||
unwatch_class = if @watching, do: "", else: "hidden"
|
||||
|
||||
= if @conn.assigns.current_user do
|
||||
span#js-subscription-target
|
||||
span.js-subscription-target
|
||||
a.js-subscription-link.media-box__header.media-box__header--channel.media-box__header--link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||
i.fa.fa-bell>
|
||||
span.hide-mobile
|
||||
|
|
|
@ -6,7 +6,7 @@ elixir:
|
|||
unwatch_class = if @watching, do: "", else: "hidden"
|
||||
|
||||
= if @conn.assigns.current_user do
|
||||
span#js-subscription-target
|
||||
span.js-subscription-target
|
||||
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||
i.fa.fa-bell>
|
||||
span.hide-mobile
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#js-subscription-target
|
||||
' Error!
|
||||
.js-subscription-target
|
||||
' Error!
|
||||
|
|
|
@ -6,7 +6,7 @@ elixir:
|
|||
unwatch_class = if @watching, do: "", else: "hidden"
|
||||
|
||||
= if @conn.assigns.current_user do
|
||||
span#js-subscription-target
|
||||
span.js-subscription-target
|
||||
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||
i.fa.fa-bell>
|
||||
span.hide-mobile
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#js-subscription-target
|
||||
' Error!
|
||||
.js-subscription-target
|
||||
' Error!
|
||||
|
|
|
@ -6,7 +6,7 @@ elixir:
|
|||
unwatch_class = if @watching, do: "", else: "hidden"
|
||||
|
||||
= if @conn.assigns.current_user do
|
||||
span#js-subscription-target
|
||||
span.js-subscription-target
|
||||
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||
i.fa.fa-bell>
|
||||
' Subscribe
|
||||
|
|
Loading…
Reference in a new issue