|
|
@ -524,7 +524,6 @@ function showFollowingUsers(){ |
|
|
|
resItem.find(".mini-profile-info").attr("data-screen-name", followingUsers[i]); |
|
|
|
resItem.find(".mini-profile-info").attr("data-screen-name", followingUsers[i]); |
|
|
|
resItem.find(".following-screen-name").text(followingUsers[i]); |
|
|
|
resItem.find(".following-screen-name").text(followingUsers[i]); |
|
|
|
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(followingUsers[i])); |
|
|
|
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(followingUsers[i])); |
|
|
|
resItem.find("a.unfollow").attr("href",$.MAL.unfollowUrl(followingUsers[i])); |
|
|
|
|
|
|
|
resItem.find("a.direct-messages-with-user").attr("href", $.MAL.dmchatUrl(followingUsers[i])); |
|
|
|
resItem.find("a.direct-messages-with-user").attr("href", $.MAL.dmchatUrl(followingUsers[i])); |
|
|
|
if (isPublicFollowing(followingUsers[i])) { |
|
|
|
if (isPublicFollowing(followingUsers[i])) { |
|
|
|
resItem.find(".public-following").text(polyglot.t("Public")); |
|
|
|
resItem.find(".public-following").text(polyglot.t("Public")); |
|
|
@ -538,11 +537,11 @@ function showFollowingUsers(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resItem.prependTo($followingList); |
|
|
|
resItem.prependTo($followingList); |
|
|
|
|
|
|
|
toggleFollowButton(followingUsers[i], true) |
|
|
|
} |
|
|
|
} |
|
|
|
$.MAL.followingListLoaded(); |
|
|
|
$.MAL.followingListLoaded(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function processSuggestion(arg, suggestion, followedBy) { |
|
|
|
function processSuggestion(arg, suggestion, followedBy) { |
|
|
|
var dashboard = $(".follow-suggestions"); |
|
|
|
var dashboard = $(".follow-suggestions"); |
|
|
|
if( suggestion ) { |
|
|
|
if( suggestion ) { |
|
|
@ -656,9 +655,9 @@ function processDropdownUserResults(partialName, results){ |
|
|
|
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(results[i])); |
|
|
|
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(results[i])); |
|
|
|
getAvatar(results[i],resItem.find(".mini-profile-photo")); |
|
|
|
getAvatar(results[i],resItem.find(".mini-profile-photo")); |
|
|
|
getFullname(results[i],resItem.find(".mini-profile-name")); |
|
|
|
getFullname(results[i],resItem.find(".mini-profile-name")); |
|
|
|
if (followingUsers.indexOf(results[i]) >= 0) |
|
|
|
|
|
|
|
toggleFollowButton(resItem.find(".follow"), results[i]); |
|
|
|
|
|
|
|
resItem.appendTo(typeaheadAccounts); |
|
|
|
resItem.appendTo(typeaheadAccounts); |
|
|
|
|
|
|
|
if (followingUsers.indexOf(results[i]) >= 0) |
|
|
|
|
|
|
|
toggleFollowButton(results[i], true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$.MAL.searchUserListLoaded(); |
|
|
|
$.MAL.searchUserListLoaded(); |
|
|
@ -682,11 +681,6 @@ function userClickFollow(e) { |
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
var followingInitiator = $(".followingInitiator"); |
|
|
|
|
|
|
|
if (followingInitiator) |
|
|
|
|
|
|
|
followingInitiator.removeClass("followingInitiator"); |
|
|
|
|
|
|
|
$(e.target).addClass("followingInitiator"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $this = $(this); |
|
|
|
var $this = $(this); |
|
|
|
var $userInfo = $this.closest("[data-screen-name]"); |
|
|
|
var $userInfo = $this.closest("[data-screen-name]"); |
|
|
|
var username = $userInfo.attr("data-screen-name"); |
|
|
|
var username = $userInfo.attr("data-screen-name"); |
|
|
@ -723,16 +717,6 @@ function initUserSearch() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function followingListUnfollow(e) { |
|
|
|
|
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $this = $(this); |
|
|
|
|
|
|
|
var username = $this.closest(".mini-profile-info").attr("data-screen-name"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unfollow(username); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function followingListPublicCheckbox(e) { |
|
|
|
function followingListPublicCheckbox(e) { |
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
|
|
|
@ -764,9 +748,7 @@ function setFollowingMethod(e) { |
|
|
|
//console.log("start following @" +username +" by method "+publicFollow);
|
|
|
|
//console.log("start following @" +username +" by method "+publicFollow);
|
|
|
|
follow(username, publicFollow, |
|
|
|
follow(username, publicFollow, |
|
|
|
(function() { |
|
|
|
(function() { |
|
|
|
var followingInitiator = $(".followingInitiator"); |
|
|
|
toggleFollowButton(this, true); |
|
|
|
if (followingInitiator) |
|
|
|
|
|
|
|
toggleFollowButton(followingInitiator, this); |
|
|
|
|
|
|
|
}).bind(username) |
|
|
|
}).bind(username) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -818,7 +800,6 @@ function initInterfaceFollowing() { |
|
|
|
initUserSearch(); |
|
|
|
initUserSearch(); |
|
|
|
initInterfaceDirectMsg(); |
|
|
|
initInterfaceDirectMsg(); |
|
|
|
|
|
|
|
|
|
|
|
$("button.unfollow").bind( "click", followingListUnfollow ); |
|
|
|
|
|
|
|
$(".mini-profile-info .public-following").bind( "click", followingListPublicCheckbox ); |
|
|
|
$(".mini-profile-info .public-following").bind( "click", followingListPublicCheckbox ); |
|
|
|
|
|
|
|
|
|
|
|
$(".mentions-from-user").bind( "click", openMentionsModal ); |
|
|
|
$(".mentions-from-user").bind( "click", openMentionsModal ); |
|
|
|