summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGit <git@what.cd>2015-02-20 08:00:25 +0000
committerGit <git@what.cd>2015-02-20 08:00:25 +0000
commit051ed8520e685973ed4686ed4e0635374bbd8de6 (patch)
tree9b6d95b15c5812e5afc0429de76ddd7b041a2df2
parent2838f1526d617cee4c92c0abf2e6886f6cdc0866 (diff)
downloadGazelle-051ed8520e685973ed4686ed4e0635374bbd8de6.zip
Gazelle-051ed8520e685973ed4686ed4e0635374bbd8de6.tar.gz
Gazelle-051ed8520e685973ed4686ed4e0635374bbd8de6.tar.bz2
Empty commit
-rw-r--r--sections/friends/friends.php2
-rw-r--r--sections/userhistory/subscriptions.php4
-rw-r--r--static/functions/comments.js28
3 files changed, 24 insertions, 10 deletions
diff --git a/sections/friends/friends.php b/sections/friends/friends.php
index d754b6d..6d82599 100644
--- a/sections/friends/friends.php
+++ b/sections/friends/friends.php
@@ -13,7 +13,7 @@ include_once(SERVER_ROOT.'/classes/paranoia.class.php');
-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 3ec8487..30ddc94 100644
--- a/sections/userhistory/subscriptions.php
+++ b/sections/userhistory/subscriptions.php
@@ -10,7 +10,7 @@ if (isset($LoggedUser['PostsPerPage'])) {
}
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 @@ if (!$NumResults) {
<tr class="row<?=$ShowCollapsed ? ' hidden' : '' ?>">
<? if (Users::has_avatars_enabled()) { ?>
<td class="avatar" valign="top">
- <?=Users::show_avatar($Result['LastReadAvatar'], $Result['LastReadUsername'], $HeavyInfo['DisableAvatars'])?>
+ <?=Users::show_avatar($Result['LastReadAvatar'], $Result['LastReadUserID'], $Result['LastReadUsername'], $HeavyInfo['DisableAvatars'])?>
</td>
<? } ?>
<td class="body" valign="top">
diff --git a/static/functions/comments.js b/static/functions/comments.js
index b309433..efb0f6a 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", "");
+ });
+ }
});
}