Skip to content

Commit

Permalink
Fix subscription targets
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Mar 3, 2024
1 parent 9b76673 commit 49e94af
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion assets/js/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#js-subscription-target
' Error!
.js-subscription-target
' Error!
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#js-subscription-target
' Error!
.js-subscription-target
' Error!
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#js-subscription-target
' Error!
.js-subscription-target
' Error!
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49e94af

Please sign in to comment.