link following to profile pages; css fixes

This commit is contained in:
Msjoinder 2014-01-06 09:41:14 -06:00
parent 0f9571f0e1
commit 438767b214
4 changed files with 28 additions and 8 deletions

View File

@ -1335,6 +1335,7 @@ button.disabled:hover
}
.following-modal .modal-content
{
padding: 15px;
overflow-y: auto;
}
.following-modal .modal-buttons
@ -1343,7 +1344,23 @@ button.disabled:hover
}
.following-modal ol
{
margin: 15px;
margin: 5px;
}
.following-modal .open-profile-modal:hover
{
text-decoration: none;
}
.following-modal .open-profile-modal img
{
float: none;
}
.following-modal .open-profile-modal span
{
vertical-align: middle;
}
.following-modal .open-profile-modal span:hover
{
text-decoration: underline;
}
/*************************************
****************** LOADER ************

View File

@ -401,8 +401,8 @@
<ol class="following-list">
<li id="following-by-user-template" style="display: none;">
<div class="mini-following-info" data-screen-name="">
<a href="#" class="open-following-modal">
<img class="mini-following-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-following-name">Fulano da Silva</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>

View File

@ -408,8 +408,8 @@
<ol class="following-list">
<li id="following-by-user-template" style="display: none;">
<div class="mini-following-info" data-screen-name="">
<a href="#" class="open-following-modal">
<img class="mini-following-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-following-name">Fulano da Silva</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>

View File

@ -89,10 +89,13 @@ function loadFollowingIntoList( username, html_list ) {
html_list.html("");
$.each(following, function(i, following_user){
var following_user_li = $( "#following-by-user-template" ).children().clone(true);
following_user_li.find(".mini-following-info").attr("data-screen-name", following_user);
following_user_li.find(".following-screen-name b").text(following_user);
// link follower to profile page
$(following_user_li.children()[0]).attr("data-screen-name", following_user);
$(following_user_li.children()[0]).attr("href", $.MAL.userUrl(following_user));
getAvatar( following_user, following_user_li.find(".mini-following-photo") );
following_user_li.find(".following-screen-name b").text(following_user);
getAvatar( following_user, following_user_li.find(".mini-profile-photo") );
getFullname( following_user, following_user_li.find(".mini-following-name") );
html_list.append( following_user_li );