From 4204d554b8edf7963cd1b755ee8ef1873838acb6 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 14 Feb 2010 17:27:08 -0700 Subject: On search results, if g-item's onhover height is less than it's siblings set height, set the hover item's height equal to its siblings. --- themes/wind/js/ui.init.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'themes/wind/js/ui.init.js') diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index f9fb8519..64eb6bc3 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -43,7 +43,7 @@ $(document).ready(function() { }); } - // Album view only + // Album and search results views if ($("#g-album-grid").length) { // Set equal height for album items and vertically align thumbnails/metadata $('.g-item').equal_heights().gallery_valign(); @@ -64,7 +64,13 @@ $(document).ready(function() { $(this).height("auto"); var context_menu = $(this).find(".g-context-menu"); var adj_height = $(this).height() + context_menu.height(); - $(this).height(adj_height); + if ($(this).next().height() > $(this).height()) { + $(this).height($(this).next().height()); + } else if ($(this).prev().height() > $(this).height()) { + $(this).height($(this).prev().height()); + } else { + $(this).height(adj_height); + } }, function() { // Reset item height and position -- cgit v1.2.3