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
+ }
};
</script>