Skip to content

Commit

Permalink
Retweets are no longer hidden when tab not in focus, rather set opaci…
Browse files Browse the repository at this point in the history
…ty to 30%
  • Loading branch information
Andrew Ellis committed Oct 3, 2011
1 parent 3f6c724 commit 3d44fba
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 30 deletions.
14 changes: 0 additions & 14 deletions assets/admin.css
Expand Up @@ -394,20 +394,6 @@
font-weight: bold;
}

.cf-clearfix {
display: block;
zoom: 1;
}

.cf-clearfix:after {
content: " ";
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}

/**
* Meta Broadcast Box
*/
Expand Down
28 changes: 22 additions & 6 deletions assets/comments.css
Expand Up @@ -411,7 +411,7 @@ override submit styles in TwentyEleven theme */
list-style-image: none;
list-style-position: outside;
list-style-type: none;
margin: 0;
margin: 10px 0 0;
}

#social .social-comment {
Expand Down Expand Up @@ -599,6 +599,7 @@ override submit styles in TwentyEleven theme */
}

#social .social-last-reply-when {
float: right;
font-size: 11px;
font-style: italic;
margin-bottom: 4px;
Expand Down Expand Up @@ -807,10 +808,6 @@ override submit styles in TwentyEleven theme */
/**
* Social items display (retweets, likes, etc...)
*/
.social-items {
clear: both;
}

#social .social-items-icon {
float: left;
margin: 2px 5px;
Expand All @@ -821,9 +818,28 @@ override submit styles in TwentyEleven theme */
margin: 2px;
}

#social .social-items.social-comment-collapse {
filter: alpha(opacity = 30);
opacity: .3;
}

#social .social-items-and-more {
float: left;
margin: 8px 0 0 5px;
font-size: 11px;
font-size: 12px;
color: #666;
}

.cf-clearfix {
display: block;
zoom: 1;
}

.cf-clearfix:after {
content: " ";
display: block;
font-size: 0;
height: 0;
clear: both;
visibility: hidden;
}
10 changes: 2 additions & 8 deletions assets/social.js
Expand Up @@ -77,8 +77,6 @@

var className = $(this).attr('rel');
if (className == 'social-all') {
$('.social-items').show();

if (nextLink !== null) {
$nextLink.attr('href', nextLink);
}
Expand All @@ -87,13 +85,9 @@
$prevLink.attr('href', prevLink);
}

$('.social-commentlist li').removeClass('social-comment-collapse');
$('.social-commentlist li, .social-items').removeClass('social-comment-collapse');
} else {
$('.social-items').hide();
if ($('.social-items.'+className).length) {
$('.social-items.'+className).show();
}

$('.social-items:not(.'+className+')').addClass('social-comment-collapse');
$('.social-commentlist li').each(function() {
if (!$(this).hasClass(className)) {
$(this).addClass('social-comment-collapse');
Expand Down
14 changes: 14 additions & 0 deletions social-facebook.php
Expand Up @@ -97,6 +97,19 @@ public static function get_avatar($avatar, $comment, $size, $default, $alt) {
return $avatar;
}

/**
* Pre-processor to the comments.
*
* @wp-filter social_comments_array
* @static
* @param array $comments
* @param int $post_id
* @return array
*/
public static function comments_array(array $comments, $post_id) {

}

} // End Social_Facebook

define('SOCIAL_FACEBOOK_FILE', __FILE__);
Expand All @@ -107,5 +120,6 @@ public static function get_avatar($avatar, $comment, $size, $default, $alt) {
add_filter('social_comment_type_to_service', array('Social_Facebook', 'comment_type_to_service'));
add_filter('get_avatar', array('Social_Facebook', 'get_avatar'), 10, 5);
add_filter('get_avatar_comment_types', array('Social_Facebook', 'get_avatar_comment_types'));
add_filter('social_comments_array', array('Social_Twitter', 'comments_array'), 10, 2);

}
4 changes: 2 additions & 2 deletions social-twitter.php
Expand Up @@ -34,9 +34,9 @@ public static function get_avatar_comment_types(array $types) {
}

/**
* Pre-processor to the comments to match up in_reply_to_status_ids.
* Pre-processor to the comments.
*
* @wp-filter comments_array
* @wp-filter social_comments_array
* @static
* @param array $comments
* @param int $post_id
Expand Down
1 change: 1 addition & 0 deletions views/comments.php
Expand Up @@ -106,6 +106,7 @@
));
}
}
echo '<div class="cf-clearfix"></div>';
}
?>
<ol class="social-commentlist">
Expand Down

0 comments on commit 3d44fba

Please sign in to comment.