diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-09-27 22:12:18 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-10-03 14:22:34 +0200 |
commit | 64628978d76c19e946754acc922144aff739b83d (patch) | |
tree | 431c8c058fbe654f0adff107416bf9cfbf88d85f /data/js/script.js | |
parent | 53b51fbf09f101da341fc0c3fb811982d6150631 (diff) |
Add colorbox on thumnail pages
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'data/js/script.js')
-rw-r--r-- | data/js/script.js | 16 |
1 files changed, 16 insertions, 0 deletions
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: '<span class="glyphicon glyphicon-chevron-right"></span>', + previous: '<span class="glyphicon glyphicon-chevron-left"></span>', + close: '<span class="glyphicon glyphicon-remove"></span>', + loop: false, + }); + } + setup_colorbox(); + }); })(jQuery); |