forked from MarseyWorld/MarseyWorld
better js for follower pages
parent
981256eb00
commit
25c5c8fb7d
|
@ -1,5 +1,4 @@
|
||||||
function removeFollower(t, username) {
|
function removeFollower(t, username) {
|
||||||
post_toast(t,'/remove_follow/' + username);
|
post_toast(t,'/remove_follow/' + username);
|
||||||
let table = document.getElementById("followers-table");
|
t.parentElement.parentElement.remove();
|
||||||
table.removeChild(t.parentElement.parentElement);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
function removeFollowing(t, username) {
|
function removeFollowing(t, username) {
|
||||||
post_toast(t,'/unfollow/' + username);
|
post_toast(t,'/unfollow/' + username);
|
||||||
let table = document.getElementById("followers-table");
|
t.parentElement.parentElement.remove();
|
||||||
table.removeChild(t.parentElement.parentElement);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<td>{% include "user_in_table.html" %}</td>
|
<td>{% include "user_in_table.html" %}</td>
|
||||||
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
|
<td {% if follow.created_utc > 1599343262 %}data-time="{{follow.created_utc}}"{% endif %}></td>
|
||||||
{% if v.id == u.id %}
|
{% if v.id == u.id %}
|
||||||
<td><div class="btn btn-danger pr-2" onclick="removeFollower(this, '{{user.username}}')">Remove follow</div></td>
|
<td><div class="btn btn-danger" onclick="removeFollower(this, '{{user.username}}')">Remove follow</div></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue