summaryrefslogtreecommitdiff
path: root/templates/search.html
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-11-26 19:04:25 +0100
committeryvesf <yvesf-git@xapek.org>2010-11-26 19:04:25 +0100
commit9122cfed447a643a8c383be5558fd82fc3be7cc7 (patch)
treede4711d4bddc99815726356b136926e2d7e9714d /templates/search.html
parent06b3f727378323089ee56a24999dd97c87887cc0 (diff)
downloadbooksearch-9122cfed447a643a8c383be5558fd82fc3be7cc7.tar.gz
booksearch-9122cfed447a643a8c383be5558fd82fc3be7cc7.zip
prettify
Diffstat (limited to 'templates/search.html')
-rw-r--r--templates/search.html23
1 files changed, 16 insertions, 7 deletions
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});
});
});
</script>
@@ -51,6 +56,10 @@
<div class="book">
<div class="c_frontpage">
<img class="frontpage" src="{{ url_for("do_book_frontpage", docnum=docnum) }}"/>
+ <div class="loader">
+ <img class="ajaxLoader" src="{{ url_for("static", filename="ajax-loader.gif") }}"/>
+ Loading..
+ </div>
</div>
<div class="description">
filename, creationtime, indexed-time, +any pdf metadata