diff --git a/sections/friends/friends.php b/sections/friends/friends.php index d754b6db..6d82599c 100644 --- a/sections/friends/friends.php +++ b/sections/friends/friends.php @@ -13,7 +13,7 @@ -View::show_header('Friends'); +View::show_header('Friends','comments'); $UserID = $LoggedUser['ID']; diff --git a/sections/userhistory/subscriptions.php b/sections/userhistory/subscriptions.php index 3ec8487f..30ddc94e 100644 --- a/sections/userhistory/subscriptions.php +++ b/sections/userhistory/subscriptions.php @@ -10,7 +10,7 @@ } list($Page, $Limit) = Format::page_limit($PerPage); -View::show_header('Subscriptions','subscriptions,bbcode'); +View::show_header('Subscriptions','subscriptions,comments,bbcode'); $ShowUnread = (!isset($_GET['showunread']) && !isset($HeavyInfo['SubscriptionsUnread']) || isset($HeavyInfo['SubscriptionsUnread']) && !!$HeavyInfo['SubscriptionsUnread'] || isset($_GET['showunread']) && !!$_GET['showunread']); $ShowCollapsed = (!isset($_GET['collapse']) && !isset($HeavyInfo['SubscriptionsCollapse']) || isset($HeavyInfo['SubscriptionsCollapse']) && !!$HeavyInfo['SubscriptionsCollapse'] || isset($_GET['collapse']) && !!$_GET['collapse']); @@ -230,7 +230,7 @@ - + diff --git a/static/functions/comments.js b/static/functions/comments.js index b309433a..efb0f6a0 100644 --- a/static/functions/comments.js +++ b/static/functions/comments.js @@ -395,22 +395,36 @@ $(document).ready(function() { var avatars = new Array(); $(".double_avatar").each(function() { if ($(this).data("gazelle-second-avatar")) { + $(this).data("fading", ""); var secondAvatar = $(this).data("gazelle-second-avatar"); var originalAvatar = $(this).attr("src"); if ($.inArray(secondAvatar, avatars) == -1) { + // Preload second image avatars.push(secondAvatar); - image = new Image(); + var image = new Image(); image.src = secondAvatar; } $(this).mouseover(function() { - $(this).fadeOut(fadeSpeed, function() { - $(this).attr("src", secondAvatar); - }).fadeIn(fadeSpeed); + if ($(this).data("fading") == "") { + var originalHeight = $(this).parent().height(); + $(this).data("fading", "in"); + $(this).fadeTo(fadeSpeed, 0, function() { + $(this).attr("src", secondAvatar); + if (!this.parentNode.style.height) { + $(this).parent().css("height", Math.max($(this).parent().height(), originalHeight) + 'px'); + } + }).fadeTo(fadeSpeed, 1); + } }); $(this).mouseout(function() { - $(this).fadeOut(fadeSpeed, function() { - $(this).attr("src", originalAvatar); - }).fadeIn(fadeSpeed); + if ($(this).data("fading") != "out" && ($(this).data("fading") != "" || $(this).attr("src") != originalAvatar)) { + $(this).data("fading", "out"); + $(this).fadeOut(fadeSpeed, function() { + $(this).attr("src", originalAvatar); + }).fadeIn(fadeSpeed, function() { + $(this).data("fading", ""); + }); + } }); }