X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/45fcd6d5e47f5f51e645f12a87776b9b95b2c0b6..80a2c67a898b06c9c28bda89d7aa012676c2a23a:/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 af3a5cb4..0d669726 100644 --- a/project/templates/explorer/panels/gallery.html +++ b/project/templates/explorer/panels/gallery.html @@ -14,7 +14,19 @@ panel_hooks = { var select = this; $('.images', contentDiv).fadeOut('slow', 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 = $('
' + + '' + + '
').click(function() { + $(this).remove(); + }) + zoom.appendTo(contentDiv); + }); }); }) }); @@ -22,6 +34,8 @@ panel_hooks = { $('.images-wrap', contentDiv).lazyload('.image-box', {threshold: 640 * 10, scrollTreshold: 640 * 5} ); + + this._endload(); }, refresh: function() { return true; // gallery is always fresh