diff options
Diffstat (limited to 'data/js/script.js')
-rw-r--r-- | data/js/script.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/data/js/script.js b/data/js/script.js index 77336a88e..57a2b6021 100644 --- a/data/js/script.js +++ b/data/js/script.js @@ -78,10 +78,16 @@ function fixedEncodeURIComponent (str) { $('#delete_button').hide(); $("#delete_form input[id^='delete_']").remove(); $(".upload_thumbnails .marked").removeClass("marked"); + if (typeof $.colorbox !== 'undefined') { + setup_colorbox(); + } break; default: window.page_mode = "delete"; $('#delete_button').show(); + if (typeof $.colorbox !== 'undefined') { + $.colorbox.remove(); + } break; } }); @@ -236,5 +242,27 @@ function fixedEncodeURIComponent (str) { }); } + if (typeof $.colorbox !== 'undefined') { + function setup_colorbox() { + $('.colorbox').colorbox({ + transistion: "none", + speed: 0, + initialWidth: "100%", + initialHeight: "100%", + 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, + orientation: function() { + return parseInt($(this).children().first().parent().attr("data-orientation")); + }, + }); + } + setup_colorbox(); + } }); })(jQuery); |