X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b9e5161a49d56f4bc177159c93d0f027e5ba4337..27f3af0b6c08485f3b06b10458c35da5827cd09e:/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 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 + } };