Dodanie planszy ładowania do document_details.html.
[redakcja.git] / platforma / templates / wiki / document_list.html
1 {% extends "base.html" %}
2
3 {% block extrahead %}
4 <link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
5 <script src="{{ STATIC_URL }}js/slugify.js" type="text/javascript" charset="utf-8"></script>
6 <script type="text/javascript" charset="utf-8">
7 $(function() {
8         function search(event) {
9         event.preventDefault();
10         
11         var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
12         
13         $('#file-list p').hide().filter(function(index) {
14             console.log(expr.test($(this).attr('title')))
15             return expr.test(slugify($('a', this).html()));
16         }).show();
17     }
18         
19     $('#file-list-find-button').click(search).hide();
20         $('#file-list-filter').bind('keyup change DOMAttrModified', search);
21 });
22 </script>
23 {% endblock extrahead %}
24
25 {% block maincontent %}
26 <div id="main-page-widgets">
27
28 <div class="file-list-widget">
29     <form action="#" method="GET">
30     <p><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
31         <input type="submit" value="Znajdź" id="file-list-find-button"/>
32         <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
33     </p>
34     </form> 
35     <div id="file-list">
36     {% for file in document_list %}
37         <p><a href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p>
38     {% endfor %}
39     </div>
40 </div>
41
42 </div>
43 {% endblock maincontent %}