mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-11 13:01:19 +00:00
fix follow button behavior
This commit is contained in:
parent
5e7a6f50df
commit
d998de6299
@ -412,7 +412,7 @@
|
||||
<li><a href="#"><span class="followers-count"> </span><span class="label">Followers</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="followButton follow" href="#">Follow</button>
|
||||
<button class="dinamicFollowButton" href="#">Follow</button>
|
||||
<button class="direct-messages-with-user" href="#">Direct Messages</button>
|
||||
</div>
|
||||
<div class="who-follow"></div>
|
||||
|
@ -441,7 +441,7 @@
|
||||
<li><a href="#"><span class="followers-count"> </span><span class="label">Followers</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="followButton follow" href="#">Follow</button>
|
||||
<button class="dinamicFollowButton" href="#">Follow</button>
|
||||
<button class="direct-messages-with-user" href="#">Direct Messages</button>
|
||||
<button class="mentions-from-user" href="#">Mentions</a>
|
||||
</div>
|
||||
|
@ -135,9 +135,14 @@ function openProfileModalWithUsernameHandler(username)
|
||||
|
||||
//hed//add dinamic follow button in profile modal window
|
||||
if(followingUsers.indexOf(username) != -1){
|
||||
$('.profile-card button.followButton').first().removeClass('follow').addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){
|
||||
$('.profile-card button.dinamicFollowButton').first().addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){
|
||||
unfollow(username);
|
||||
closeModal($(this));
|
||||
// delay reload so dhtput may do it's job
|
||||
window.setTimeout("location.reload();",500);
|
||||
});
|
||||
} else {
|
||||
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow );
|
||||
};
|
||||
|
||||
$(".tox-ctc").attr("title", polyglot.t("Copy to clipboard"));
|
||||
|
@ -710,6 +710,8 @@ function initUserSearch() {
|
||||
$(".following-config-method-buttons .public-following").bind( "click", setFollowingMethod );
|
||||
$(".following-config-method-buttons .public-following").click( function() {
|
||||
closeModal($(this));
|
||||
// delay reload so dhtput may do it's job
|
||||
window.setTimeout("location.reload();",500);
|
||||
});
|
||||
}
|
||||
|
||||
@ -755,10 +757,7 @@ function setFollowingMethod(e) {
|
||||
}
|
||||
|
||||
//console.log("start following @" +username +" by method "+method);
|
||||
follow(username, method, function() {
|
||||
// delay reload so dhtput may do it's job
|
||||
window.setTimeout("location.reload();",500);
|
||||
});
|
||||
follow(username, method);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user