Fixed the list filter.
[redakcja.git] / apps / wiki / templates / wiki / document_list.html
index 1b0662b..558ef55 100644 (file)
@@ -14,7 +14,7 @@ $(function() {
         
         var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
        
-        $('#file-list p').hide().filter(function(index) {
+        $('#file-list tbody tr').hide().filter(function(index) {
             console.log(expr.test($(this).attr('title')))
             return expr.test(slugify($('a', this).html()));
         }).show();
@@ -30,17 +30,24 @@ $(function() {
 <h1><img src="{{STATIC_URL}}/img/logo.png">Platforma Redakcyjna</h1>
 
 <div id="document-list">        
-    <div id="file-list">
+    <table id="file-list">
+       <thead><tr><th colspan="2">
        <form action="#" method="GET">
-       <p>Filtr: <input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
+       Filtr: <input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" />
                <input type="submit" value="Znajdź" id="file-list-find-button"/>
                <input type="reset" value="Wyczyść" id="file-list-reset-button"/>
-       </p>
+       
        </form>
+               </th></tr></thead>              
+               <tbody>
        {% for file in document_list %}
-               <p><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p>
+            <tr>
+               <td><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></td>
+                               <td><!-- placeholder --></td>
+                       </tr>
        {% endfor %}
-    </div>
+               </tbody>
+    </table>
        
        <div id="last-edited-list">
                <h2>Twoje ostatnio otwierane dokumenty:</h2>