Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

On search results, if g-item's onhover height is less than it's sibli…

…ngs set height, set the hover item's height equal to its siblings.
  • Loading branch information...
commit 4204d554b8edf7963cd1b755ee8ef1873838acb6 1 parent ed401fc
@ckieffer ckieffer authored
Showing with 17 additions and 8 deletions.
  1. +9 −6 themes/wind/css/screen.css
  2. +8 −2 themes/wind/js/ui.init.js
View
15 themes/wind/css/screen.css
@@ -275,6 +275,13 @@ td {
z-index: 1;
}
+/* Search results ~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#g-content #g-search-results {
+ margin-top: 1em;
+ padding-top: 1em;
+}
+
/* Individual photo content ~~~~~~~~~~~~~~ */
#g-item {
@@ -300,14 +307,10 @@ td {
padding-right: 1.2em;
}
-#g-content #g-search-results {
- margin-top: 1em;
- padding-top: 1em;
-}
-
/* In-line editing ~~~~~~~~~~~~~~~~~~~~~~ */
+
#g-in-place-edit-message {
- background-color: #FFF;
+ background-color: #fff;
}
/** *******************************************************************
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.