X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d08b6d8dbb82ea41d9a72f7d96b894f43bd6c002..d936f1c483381d29bd5cf7af73d0b1aa35b323f2:/project/templates/explorer/panels/gallery.html?ds=inline diff --git a/project/templates/explorer/panels/gallery.html b/project/templates/explorer/panels/gallery.html index a5ac5592..0d669726 100644 --- a/project/templates/explorer/panels/gallery.html +++ b/project/templates/explorer/panels/gallery.html @@ -10,10 +10,23 @@ panel_hooks = { load: function() { var contentDiv = this.contentDiv; - $('.id_folders', contentDiv).change(function() { + $('select[name=folders]', contentDiv).change(function() { + var select = this; $('.images', contentDiv).fadeOut('slow', function() { - $(this).html('').load('{% url folder_image_ajax %}' + $('.id_folders', contentDiv).val() + '/', function() { + $(this).html('').load('{% url folder_image_ajax %}' + $(select).val() + '/', function() { + $('.images', contentDiv).fadeIn('slow'); $('.images-wrap', contentDiv).data('lazyload:lastCheckedScrollTop', -10000); + $('.image-box').click(function() { + var src = $('img', $(this)).attr('src'); + var idx = src.lastIndexOf('/'); + var bigSrc = src.substring(0, idx) + '/big' + src.substring(idx, src.length); + var zoom = $('