X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b9e5161a49d56f4bc177159c93d0f027e5ba4337..568abb2a9b95e1ee739307d2711bc3502451b0b1:/project/templates/explorer/panels/gallery.html?ds=sidebyside 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 + } };