X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b9e5161a49d56f4bc177159c93d0f027e5ba4337..4024af4373eb6755075aa3c5f259e511d0f1b5a4:/project/templates/explorer/panels/gallery.html diff --git a/project/templates/explorer/panels/gallery.html b/project/templates/explorer/panels/gallery.html index f0ec99bf..30c1c83a 100644 --- a/project/templates/explorer/panels/gallery.html +++ b/project/templates/explorer/panels/gallery.html @@ -13,17 +13,23 @@ panel_hooks = { load: function() { var contentDiv = this.contentDiv; - $('.id_folders', contentDiv).change(function() - { - $('.images', contentDiv).load('{% url folder_image_ajax %}' + $('.id_folders', contentDiv).val() + '/', - function() { + $('.id_folders', contentDiv).change(function() { + $('.images', contentDiv).fadeOut('slow', function() { + $(this).html('').load('{% url folder_image_ajax %}' + $('.id_folders', contentDiv).val() + '/', function() { $('.images-wrap', contentDiv).data('lazyload:lastCheckedScrollTop', -10000); }); + }) }); $('.images-wrap', contentDiv).lazyload('.image-box', {threshold: 640 * 10, scrollTreshold: 640 * 5} ); - } + }, + refresh: function() { + return true; // gallery is always fresh + }, + dirty: function() { + return true; // and it doesn't get dirty + } };