mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +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() {
|
function bindSubscriptionLinks() {
|
||||||
delegate(document, 'fetchcomplete', {
|
delegate(document, 'fetchcomplete', {
|
||||||
'.js-subscription-link': event => {
|
'.js-subscription-link': event => {
|
||||||
const target = $('#js-subscription-target');
|
const target = event.target.closest('.js-subscription-target');
|
||||||
event.detail.text().then(text => {
|
event.detail.text().then(text => {
|
||||||
target.outerHTML = text;
|
target.outerHTML = text;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#js-subscription-target
|
.js-subscription-target
|
||||||
' Error!
|
' Error!
|
|
@ -6,7 +6,7 @@ elixir:
|
||||||
unwatch_class = if @watching, do: "", else: "hidden"
|
unwatch_class = if @watching, do: "", else: "hidden"
|
||||||
|
|
||||||
= if @conn.assigns.current_user do
|
= 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"
|
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>
|
i.fa.fa-bell>
|
||||||
span.hide-mobile
|
span.hide-mobile
|
||||||
|
|
|
@ -6,7 +6,7 @@ elixir:
|
||||||
unwatch_class = if @watching, do: "", else: "hidden"
|
unwatch_class = if @watching, do: "", else: "hidden"
|
||||||
|
|
||||||
= if @conn.assigns.current_user do
|
= 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"
|
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||||
i.fa.fa-bell>
|
i.fa.fa-bell>
|
||||||
span.hide-mobile
|
span.hide-mobile
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#js-subscription-target
|
.js-subscription-target
|
||||||
' Error!
|
' Error!
|
|
@ -6,7 +6,7 @@ elixir:
|
||||||
unwatch_class = if @watching, do: "", else: "hidden"
|
unwatch_class = if @watching, do: "", else: "hidden"
|
||||||
|
|
||||||
= if @conn.assigns.current_user do
|
= 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"
|
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||||
i.fa.fa-bell>
|
i.fa.fa-bell>
|
||||||
span.hide-mobile
|
span.hide-mobile
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#js-subscription-target
|
.js-subscription-target
|
||||||
' Error!
|
' Error!
|
|
@ -6,7 +6,7 @@ elixir:
|
||||||
unwatch_class = if @watching, do: "", else: "hidden"
|
unwatch_class = if @watching, do: "", else: "hidden"
|
||||||
|
|
||||||
= if @conn.assigns.current_user do
|
= 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"
|
a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
|
||||||
i.fa.fa-bell>
|
i.fa.fa-bell>
|
||||||
' Subscribe
|
' Subscribe
|
||||||
|
|
Loading…
Reference in a new issue