From 64628978d76c19e946754acc922144aff739b83d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 27 Sep 2014 22:12:18 +0200 Subject: Add colorbox on thumnail pages Signed-off-by: Florian Pritz --- data/js/script.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'data/js/script.js') diff --git a/data/js/script.js b/data/js/script.js index 77336a88e..9aabf7557 100644 --- a/data/js/script.js +++ b/data/js/script.js @@ -78,10 +78,12 @@ function fixedEncodeURIComponent (str) { $('#delete_button').hide(); $("#delete_form input[id^='delete_']").remove(); $(".upload_thumbnails .marked").removeClass("marked"); + setup_colorbox(); break; default: window.page_mode = "delete"; $('#delete_button').show(); + $.colorbox.remove(); break; } }); @@ -236,5 +238,19 @@ function fixedEncodeURIComponent (str) { }); } + function setup_colorbox() { + $('.colorbox').colorbox({ + photo: true, + retinaImage: true, + maxHeight: "100%", + maxWidth: "100%", + next: '', + previous: '', + close: '', + loop: false, + }); + } + setup_colorbox(); + }); })(jQuery); -- cgit v1.2.3-24-g4f1b