Fixed search. Changes stylesheet name, so changes can propagate faster.
authorŁukasz Rekucki <lrekucki@gmail.com>
Mon, 15 Mar 2010 14:00:01 +0000 (15:00 +0100)
committerŁukasz Rekucki <lrekucki@gmail.com>
Mon, 15 Mar 2010 14:00:01 +0000 (15:00 +0100)
apps/wiki/templates/wiki/document_list.html
platforma/static/css/xmlcolors.css [deleted file]
platforma/static/css/xmlcolors_15032010.css [new file with mode: 0644]
platforma/static/js/main.js

index 558ef55..415c3bc 100644 (file)
 <script type="text/javascript" charset="utf-8">
 $(function() {
        function search(event) {
-        event.preventDefault();
-        
-        var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');
-       
-        $('#file-list tbody tr').hide().filter(function(index) {
-            console.log(expr.test($(this).attr('title')))
-            return expr.test(slugify($('a', this).html()));
+        event.preventDefault();        
+        var expr = new RegExp(slugify($('#file-list-filter').val()), 'i');     
+        $('#file-list tbody tr').hide().filter(function(index) {            
+            return expr.test(slugify($('a', this).text()));
         }).show();
     }
        
@@ -29,25 +26,26 @@ $(function() {
 {% block maincontent %}
 <h1><img src="{{STATIC_URL}}/img/logo.png">Platforma Redakcyjna</h1>
 
-<div id="document-list">        
-    <table id="file-list">
-       <thead><tr><th colspan="2">
-       <form action="#" method="GET">
-       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"/>
-       
-       </form>
-               </th></tr></thead>              
+
+<div id="document-list">
+       <form method="get" action="#">           
+    <table  id="file-list">
+       <thead>         
+               <tr><th>Filtr:</th>
+                       <th><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="40" /></th>
+                       <th><input type="reset" value="Wyczyść" id="file-list-reset-button"/></th>
+                       </tr>           
+               </thead>                
                <tbody>
        {% for file in document_list %}
             <tr>
-               <td><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></td>
-                               <td><!-- placeholder --></td>
+               <td colspan="3"><a target="_blank" href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></td>
+                               <!-- placeholder </td> -->
                        </tr>
        {% endfor %}
                </tbody>
     </table>
+       </form>
        
        <div id="last-edited-list">
                <h2>Twoje ostatnio otwierane dokumenty:</h2>
diff --git a/platforma/static/css/xmlcolors.css b/platforma/static/css/xmlcolors.css
deleted file mode 100644 (file)
index 5a2d7cc..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-.editbox {  
-  margin: .4em;
-  margin-top: 5px;
-  margin-left: 45px;
-  padding: 0;
-  
-  font-family:"Lucida Console", monospace;
-  font-size: 13px;
-  line-height: 18px;
-  
-  color: black;
-}
-
-.editbox p {
-  margin: 0;
-}
-
-.editbox span {
-       display: inline;  
-       font-size: 13px;
-    line-height: 18px; 
-}
-
-span.xml-tagname {
-  color: #0e5f0e;
-}
-
-span.xml-attribute {
-  color: #8b8b8b;
-}
-
-span.xml-punctuation {
-  color: black;
-}
-
-span.xml-attname {
-  color: #817aff;
-}
-
-span.xml-comment {
-  color: #A70;
-}
-
-span.xml-cdata {
-  color: #48A;
-}
-
-span.xml-processing {
-  color: #999;
-}
-
-span.xml-entity {
-  color: #A22;
-}
-
-span.xml-error {
-  color: #F00;
-  font-weight: bolder;
-}
-
-span.xml-text {
-  color: black;
-}
diff --git a/platforma/static/css/xmlcolors_15032010.css b/platforma/static/css/xmlcolors_15032010.css
new file mode 100644 (file)
index 0000000..5a2d7cc
--- /dev/null
@@ -0,0 +1,63 @@
+.editbox {  
+  margin: .4em;
+  margin-top: 5px;
+  margin-left: 45px;
+  padding: 0;
+  
+  font-family:"Lucida Console", monospace;
+  font-size: 13px;
+  line-height: 18px;
+  
+  color: black;
+}
+
+.editbox p {
+  margin: 0;
+}
+
+.editbox span {
+       display: inline;  
+       font-size: 13px;
+    line-height: 18px; 
+}
+
+span.xml-tagname {
+  color: #0e5f0e;
+}
+
+span.xml-attribute {
+  color: #8b8b8b;
+}
+
+span.xml-punctuation {
+  color: black;
+}
+
+span.xml-attname {
+  color: #817aff;
+}
+
+span.xml-comment {
+  color: #A70;
+}
+
+span.xml-cdata {
+  color: #48A;
+}
+
+span.xml-processing {
+  color: #999;
+}
+
+span.xml-entity {
+  color: #A22;
+}
+
+span.xml-error {
+  color: #F00;
+  font-weight: bolder;
+}
+
+span.xml-text {
+  color: black;
+}
index cdcc21a..d42af82 100644 (file)
@@ -763,7 +763,7 @@ $(function() {
     CodeMirror.fromTextArea('id_text', {
         parserfile: 'parsexml.js',
         path: STATIC_URL + "js/lib/codemirror/",
-        stylesheet: STATIC_URL + "css/xmlcolors.css",
+        stylesheet: STATIC_URL + "css/xmlcolors_15032010.css",
         parserConfig: {
             useHTMLKludges: false
         },