From 9122cfed447a643a8c383be5558fd82fc3be7cc7 Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 26 Nov 2010 19:04:25 +0100 Subject: prettify --- templates/search.html | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'templates/search.html') diff --git a/templates/search.html b/templates/search.html index dc4cfe8..adbd92d 100644 --- a/templates/search.html +++ b/templates/search.html @@ -18,17 +18,22 @@ ui.newContent.children("div.excerpt").html(data); } ); - /* update image preview */ var frontpage = jQuery(this).parent().parent().find("img.frontpage"); - frontpage.attr('src', "{{ url_for("static", filename="ajax-loader.gif") }}"); + var loader = jQuery(this).parent().parent().find("div.loader"); + frontpage.attr('src', "{{ url_for("do_page_image",docnum=-9999) }}".replace("-9999", docnum)); + frontpage.hide(); + loader.show() frontpage.load(function() { - frontpage.attr('src', "{{ url_for("do_page_image",docnum=-9999) }}".replace("-9999", docnum)); + loader.hide(); + frontpage.show(); }); - - /* scroll image preview */ - var offset = ui.newHeader[0].offsetTop - frontpage.parent()[0].offsetTop; - frontpage.parent().css({paddingTop: offset+"px"}); + }); + acc.bind('accordionchange', function(event, ui) { + /* align image preview to current match */ + var frontpage = jQuery(this).parent().parent().find("img.frontpage"); + var offset = ui.newHeader[0].offsetTop - frontpage.parent()[0].offsetTop; + frontpage.parent().animate({paddingTop: offset}); }); }); @@ -51,6 +56,10 @@
+
+ + Loading.. +
filename, creationtime, indexed-time, +any pdf metadata -- cgit v1.2.1