mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-13 05:51:03 +00:00
no more location.reload()
This commit is contained in:
parent
a688dc5958
commit
40246e6e65
@ -141,30 +141,6 @@ function newProfileModal(username) {
|
|||||||
return profileModalContent;
|
return profileModalContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
function openProfileModal(e)
|
|
||||||
{
|
|
||||||
e.stopPropagation();
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
var $this = $( this );
|
|
||||||
var username = $.MAL.urlToUser( $this.attr("href") );
|
|
||||||
openProfileModalWithUsername(username);
|
|
||||||
}
|
|
||||||
|
|
||||||
function openProfileModalWithUsername(username)
|
|
||||||
{
|
|
||||||
if(!username)
|
|
||||||
{
|
|
||||||
alert(polyglot.t("You don't have any profile because you are not logged in."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.location.hash = '#profile?user=' + username;
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
function openProfileModalWithUsernameHandler(username)
|
function openProfileModalWithUsernameHandler(username)
|
||||||
{
|
{
|
||||||
var profileModalClass = "profile-modal";
|
var profileModalClass = "profile-modal";
|
||||||
@ -180,9 +156,7 @@ function openProfileModalWithUsernameHandler(username)
|
|||||||
if(followingUsers.indexOf(username) != -1){
|
if(followingUsers.indexOf(username) != -1){
|
||||||
$('.profile-card button.dinamicFollowButton').first().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);
|
unfollow(username);
|
||||||
closeModal($(this));
|
window.setTimeout("loadModalFromHash();",500);
|
||||||
// delay reload so dhtput may do it's job
|
|
||||||
window.setTimeout("location.reload();",500);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow );
|
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow );
|
||||||
|
@ -710,7 +710,7 @@ function initUserSearch() {
|
|||||||
$(".following-config-method-buttons .public-following").click( function() {
|
$(".following-config-method-buttons .public-following").click( function() {
|
||||||
closePrompt();
|
closePrompt();
|
||||||
// delay reload so dhtput may do it's job
|
// delay reload so dhtput may do it's job
|
||||||
window.setTimeout("location.reload();",500);
|
window.setTimeout("loadModalFromHash();",500);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user