From 04996b8360e4b4d6b3a3cc445710147ff2f0de1a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 9 May 2011 19:36:15 -0400 Subject: [PATCH] Mark current thumb. --- web/css/000-controls.css | 3 +++ web/js/010-control.js | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/web/css/000-controls.css b/web/css/000-controls.css index bd2e947..6f52d3a 100644 --- a/web/css/000-controls.css +++ b/web/css/000-controls.css @@ -38,6 +38,9 @@ a:hover { margin: 0; padding: 0; } +.current-thumb { + /* do something to the current thumbnail */ +} #subalbums { padding-top: 1.5em; } diff --git a/web/js/010-control.js b/web/js/010-control.js index 5cd6cb7..8a6ed2b 100644 --- a/web/js/010-control.js +++ b/web/js/010-control.js @@ -125,6 +125,7 @@ $(document).ready(function() { } if (current_photo_cache == null) { + $("#thumbs img").removeClass("current-thumb"); $("#album-view").removeClass("photo-view-container"); $("#subalbums").show(); $("#photo-view").hide(); @@ -221,6 +222,11 @@ $(document).ready(function() { scroller.stop().animate({ scrollLeft: thumb.position().left + scroller.scrollLeft() - scroller.width() / 2 + thumb.width() / 2 }, "slow"); } else $("html, body").stop().animate({ scrollTop: thumb.offset().top - $(window).height() / 2 + thumb.height() }, "slow"); + + if (current_photo_cache != null) { + $("#thumbs img").removeClass("current-thumb"); + thumb.addClass("current-thumb"); + } } function currentPhoto() { for (current_photo_index = 0; current_photo_index < current_album.photos.length; ++current_photo_index) {