Browse Source

no more location.reload()

master
Julian Steinwachs 10 years ago
parent
commit
40246e6e65
  1. 28
      js/interface_common.js
  2. 2
      js/twister_following.js

28
js/interface_common.js

@ -141,30 +141,6 @@ function newProfileModal(username) { @@ -141,30 +141,6 @@ function newProfileModal(username) {
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)
{
var profileModalClass = "profile-modal";
@ -180,9 +156,7 @@ function openProfileModalWithUsernameHandler(username) @@ -180,9 +156,7 @@ function openProfileModalWithUsernameHandler(username)
if(followingUsers.indexOf(username) != -1){
$('.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);
window.setTimeout("loadModalFromHash();",500);
});
} else {
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow );

2
js/twister_following.js

@ -710,7 +710,7 @@ function initUserSearch() { @@ -710,7 +710,7 @@ function initUserSearch() {
$(".following-config-method-buttons .public-following").click( function() {
closePrompt();
// delay reload so dhtput may do it's job
window.setTimeout("location.reload();",500);
window.setTimeout("loadModalFromHash();",500);
});
}

Loading…
Cancel
Save