|
|
@ -483,33 +483,20 @@ function fillWhoFollows(list, item, offset, size) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getWhoFollows(username, item) { |
|
|
|
function getWhoFollows(peerAlias, elem) { |
|
|
|
if (!defaultScreenName || typeof(defaultScreenName) === 'undefined') |
|
|
|
if (!defaultScreenName) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
var list = whoFollows(username); |
|
|
|
var list = whoFollows(peerAlias); |
|
|
|
|
|
|
|
|
|
|
|
fillWhoFollows(list, item, 0, (list.length > 5 ? 5 : list.length)); |
|
|
|
fillWhoFollows(list, elem, 0, (list.length > 5 ? 5 : list.length)); |
|
|
|
|
|
|
|
|
|
|
|
if (list.length > 5) { |
|
|
|
if (list.length > 5) |
|
|
|
var more_link = $('<a class="show-more-followers">' + polyglot.t('show_more_count', {'smart_count': list.length - 5}) + '</a>'); |
|
|
|
twister.tmpl.profileShowMoreFollowers.clone(true) |
|
|
|
more_link.on('click', function() { |
|
|
|
.text(polyglot.t('show_more_count', {'smart_count': list.length - 5})) |
|
|
|
fillWhoFollows(list, item, 5, list.length - 5); |
|
|
|
.on('mouseup', {route: '#followers?user=' + peerAlias}, routeOnClick) |
|
|
|
|
|
|
|
.appendTo(elem) |
|
|
|
var $this = $(this); |
|
|
|
; |
|
|
|
$this.remove(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this.text(polyglot.t('hide')); |
|
|
|
|
|
|
|
$this.unbind('click'); |
|
|
|
|
|
|
|
$this.bind('click', function() { |
|
|
|
|
|
|
|
item.html(''); |
|
|
|
|
|
|
|
getWhoFollows(username, item); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.append($this); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
item.append(more_link); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function processWhoToFollowSuggestion(suggestion, followedBy) { |
|
|
|
function processWhoToFollowSuggestion(suggestion, followedBy) { |
|
|
|