Browse Source

fix of 'followers' link in peer profile modal

readme-update
Simon Grim 9 years ago
parent
commit
50a3ef3272
  1. 2
      home.html
  2. 4
      js/interface_common.js
  3. 3
      js/twister_following.js
  4. 6
      js/twister_io.js

2
home.html

@ -655,7 +655,7 @@
<ul class="module profile-data"> <ul class="module profile-data">
<li><a href="#"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li> <li><a href="#"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li>
<li><a href="#" class="open-following-modal"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li> <li><a href="#" class="open-following-modal"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li>
<li><a href="#"><span class="followers-count">&nbsp;</span><span class="label">Followers</span></a></li> <li><a class="open-followers"><span class="followers-count">&nbsp;</span><span class="label">Followers</span></a></li>
</ul> </ul>
</div> </div>
<div class="profile-card-buttons b-buttons"> <div class="profile-card-buttons b-buttons">

4
js/interface_common.js

@ -449,6 +449,8 @@ function openUserProfileModalWithNameHandler(peerAlias) {
content.find('.tox-ctc').attr('title', polyglot.t('Copy to clipboard')); content.find('.tox-ctc').attr('title', polyglot.t('Copy to clipboard'));
content.find('.bitmessage-ctc').attr('title', polyglot.t('Copy to clipboard')); content.find('.bitmessage-ctc').attr('title', polyglot.t('Copy to clipboard'));
content.find('.open-followers').on('mouseup', {route: '#followers?user=' + peerAlias}, routeOnClick);
var modal = openModal({ var modal = openModal({
classAdd: 'profile-modal', classAdd: 'profile-modal',
content: content, content: content,
@ -2354,7 +2356,7 @@ function initInterfaceCommon() {
closePrompt(event); closePrompt(event);
}); });
$('.open-followers').on('mouseup', {route: '#followers'}, routeOnClick); $('.module.mini-profile .open-followers').on('mouseup', {route: '#followers'}, routeOnClick);
$('.post-text').on('click', 'a', muteEvent); $('.post-text').on('click', 'a', muteEvent);
$('.post-reply').on('click', postReplyClick); $('.post-reply').on('click', postReplyClick);

3
js/twister_following.js

@ -145,7 +145,8 @@ TwisterFollowing.prototype = {
.find('li[data-peer-alias="' + args.fu + '"]').remove(); .find('li[data-peer-alias="' + args.fu + '"]').remove();
} }
} }
$(".open-followers").attr("title", args.tf.knownFollowers.length.toString()); $('.module.mini-profile .open-followers')
.attr('title', args.tf.knownFollowers.length.toString());
var ctime = new Date().getTime() / 1000; var ctime = new Date().getTime() / 1000;
if (typeof(args.tf.followingsFollowings[args.fu]) === 'undefined' || if (typeof(args.tf.followingsFollowings[args.fu]) === 'undefined' ||

6
js/twister_io.js

@ -279,7 +279,8 @@ function getFullname(peerAlias, elem) {
twisterFollowingO.knownFollowers.push(req.peerAlias); twisterFollowingO.knownFollowers.push(req.peerAlias);
twisterFollowingO.save(); twisterFollowingO.save();
addPeerToFollowersList(getElem('.followers-modal .followers-list'), req.peerAlias, true); addPeerToFollowersList(getElem('.followers-modal .followers-list'), req.peerAlias, true);
$('.open-followers').attr('title', twisterFollowingO.knownFollowers.length.toString()); $('.module.mini-profile .open-followers')
.attr('title', twisterFollowingO.knownFollowers.length.toString());
} }
req.elem.addClass('isFollowing'); req.elem.addClass('isFollowing');
req.elem.attr('title', polyglot.t('follows you')); req.elem.attr('title', polyglot.t('follows you'));
@ -291,7 +292,8 @@ function getFullname(peerAlias, elem) {
if (twisterFollowingO.knownFollowers.indexOf(req.peerAlias) === -1) { if (twisterFollowingO.knownFollowers.indexOf(req.peerAlias) === -1) {
twisterFollowingO.knownFollowers.push(req.peerAlias); twisterFollowingO.knownFollowers.push(req.peerAlias);
addPeerToFollowersList(getElem('.followers-modal .followers-list'), req.peerAlias, true); addPeerToFollowersList(getElem('.followers-modal .followers-list'), req.peerAlias, true);
$('.open-followers').attr('title', twisterFollowingO.knownFollowers.length.toString()); $('.module.mini-profile .open-followers')
.attr('title', twisterFollowingO.knownFollowers.length.toString());
} }
req.elem.addClass('isFollowing'); req.elem.addClass('isFollowing');
req.elem.attr('title', polyglot.t('follows you')); req.elem.attr('title', polyglot.t('follows you'));

Loading…
Cancel
Save