From 9122cfed447a643a8c383be5558fd82fc3be7cc7 Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 26 Nov 2010 19:04:25 +0100 Subject: prettify --- templates/_base.html | 32 +++++++++++++++++++------------- templates/search.html | 23 ++++++++++++++++------- 2 files changed, 35 insertions(+), 20 deletions(-) (limited to 'templates') diff --git a/templates/_base.html b/templates/_base.html index ba9e8f2..d6d2010 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -3,30 +3,36 @@ {% block head %} - + {% block title %}{% endblock %} - booksearch {% block javascript %}{% endblock %} {% endblock %} - -
+
{% block content %}{% endblock %}
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