aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-05-06 22:48:09 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-05-06 22:48:09 -0400
commit8bd9d1519eee62660c395333a764a5d7443b85e2 (patch)
treecb505b1eb95f0731ecbcb1e248f65406b31aabaa /web/js
parentPolishing... (diff)
downloadPhotoFloat-8bd9d1519eee62660c395333a764a5d7443b85e2.tar.xz
PhotoFloat-8bd9d1519eee62660c395333a764a5d7443b85e2.zip
LIl things.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/010-control.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/web/js/010-control.js b/web/js/010-control.js
index ab3a410..d41d41d 100644
--- a/web/js/010-control.js
+++ b/web/js/010-control.js
@@ -10,6 +10,8 @@ $(document).ready(function() {
.replace(/\(/g, "")
.replace(/\)/g, "")
.replace(/#/g, "")
+ .replace(/&/g, "")
+ .replace(/,/g, "")
.replace(/\[/g, "")
.replace(/\]/g, "")
.replace(/"/g, "")
@@ -42,7 +44,7 @@ $(document).ready(function() {
$.ajax({
type: "GET",
url: "cache/" + current_album_cache + ".json",
- error: function() { $(document.body).html("Couldn't fetch it."); },
+ error: die,
success: albumLoaded
});
}
@@ -147,6 +149,8 @@ $(document).ready(function() {
$("#back").attr("href", "#" + current_album_cache + "/" + cachePath(current_album.photos[
(current_photo_index - 1 < 0) ? (current_album.photos.length - 1) : (current_photo_index - 1)
].name));
+ $("#original-link").attr("target", "_blank").attr("href", "albums/" + current_album.path + "/" + current_photo.name);
+ $("#metadata-link").attr("href", "javascript:alert('Coming soon...')");
$("#album-view").addClass("photo-view-container");
$("#subalbums").hide();
@@ -188,13 +192,19 @@ $(document).ready(function() {
$.ajax({
type: "GET",
url: "cache/" + album + ".json",
- error: function() { $(document.body).html("Couldn't fetch it."); },
+ error: die,
success: callback
});
}
function albumThumbFinder(album, callback) {
fetchAlbumForThumb(album, function(fetchedAlbum) { albumForThumbIteration(fetchedAlbum, callback); });
}
+ function die() {
+ $("#album-view").hide();
+ $("#photo-view").hide();
+ $("#title").hide();
+ $("#error").fadeIn(5000);
+ }
var current_album_cache = null;
var current_photo_cache = null;
@@ -237,4 +247,10 @@ $(document).ready(function() {
}
return true;
});
+ $("#photo-box").mouseenter(function() {
+ $("#photo-links").stop().fadeTo("slow", 0.50).css("display", "inline");
+ });
+ $("#photo-box").mouseleave(function() {
+ $("#photo-links").stop().fadeOut("slow");
+ });
});