1
{% extends "base.html" %}
5
{% block pagetitle %}Search{% endblock %}
9
<form action="" method="post" id="search-form" style="text-align: center">
12
<div id="search-loading" class="invisible">
13
<img src="/media/images/loading.gif" alt="" title="" /> Loading ...
16
<div id="search-errors" class="hidden error">
17
An error occurred during search.
21
<div id="search-results" class="hidden">
25
{% include 'main/oneliners.html' %}
32
function search_success(html) {
33
$('#search-results .oneliners').html($(html).html());
34
bind_details_trigger($('#search-results div.oneliners'));
35
$('#search-results').show();
38
function search_error(err) {
39
$('#search-errors').show();
42
function search_completed() {
43
$('#search-loading').css('visibility', 'hidden');
46
$('#search-form').submit(function(e) {
48
$('#search-loading').css('visibility', 'visible');
49
$('#search-errors').hide();
52
'url': '{% url bashoneliners.main.views.search_ajax %}',
54
'data': { 'query': $('#id_query').val() },
55
'success': search_success,
56
'error': search_error,
57
'complete': search_completed
62
$('#id_query').focus();