]> git.parisson.com Git - telemeta.git/commitdiff
graphic changes for the filter panel/using of jquery-ui
authorafilsaime <shadow_kungfu@hotmail.fr>
Tue, 12 May 2015 13:40:56 +0000 (15:40 +0200)
committerafilsaime <shadow_kungfu@hotmail.fr>
Tue, 12 May 2015 13:40:56 +0000 (15:40 +0200)
telemeta/templates/search/filters.html
telemeta/templates/search/mediaitem_listhaystack.html
telemeta/templates/search/search.html

index ecb4eb1fc02fafccee258abbeebcbb9f759b00b9..dcb575a9ae7812a2d40ea98bbf1879e8f3c30cd8 100644 (file)
@@ -1,6 +1,9 @@
-<div class="panel panel-default" style="font-weight:bold">
-        <div class="panel-heading" style="background-color:#6a0307;color:white;"><span class="glyphicon glyphicon-filter"></span> Filters<a href="{% url "haystack_search_type" "type" %}?q={{ query }}&amp;page=1" class="pull-right" style="color:white">&raquo; Remove All Filters</a></div>
-            <table class="table" style="font-size:0.9em">
+
+
+<div id="accordeon" style="margin-bottom:20px">
+    <div><a href="#">Filters</a></div>
+    <div>
+        <table class="table" style="font-size:0.9em">
                 <tr>
                     {% if facets.fields.item_status %}
                         <td>Item Status</td>
                 {% endif %}
             </tr>
         </table>
-    <div class="btn-group btn-group-justified">
-        <div class="btn-group" role="group" >
-            <button type="button " class="btn btn-default dropdown-toggle" data-toggle="dropdown" style="background-color:#6a0307;color:white;font-weight:bold;text-align:left">
-                    <span class="glyphicon glyphicon-chevron-down"></span> Other Filters
-            </button>
-            <div class="dropdown-menu" role="menu" style="width:100%">
-                <table class="table" style="font-size:0.9em">
+    </div>
+
+    <div><a href="#">Other Filters</a></div>
+    <div>
+        <table class="table" style="font-size:0.9em">
                     <tr>
                         {% if facets.fields.media_type %}
                             <td>Media Type</td>
                         {% endif %}
                     </tr>
                 </table>
-            </div>
-        </div>
     </div>
+
 </div>
+
 {% if selected_facets %}
-     <p> <span class="glyphicon glyphicon-filter"/> selected filters :
-         {{selected_facets|join:" + "}}</b></p>
- {% endif %}
\ No newline at end of file
+     <p> <span class="glyphicon glyphicon-filter"> selected filters :
+         {{selected_facets|join:" + "}}</b></span><a class="pull-right" href="{% url "haystack_search_type" "type" %}?q={{ query }}&amp;page=1">&raquo; Remove All Filters</a></p>
+ {% endif %}
+
+
+
+
index cce0dc7d100ee1b475e2d70d3cd69819e30b6060..f5383db6033466a8078080ddf821ca6f3e9618a9 100644 (file)
@@ -5,6 +5,7 @@
 
 
 
+
 <table class="listing">
 <tr>
     <th class="highlight">{% trans "Title" %}</th>
@@ -49,3 +50,5 @@
 {% else %}
     <p>{% trans "No results found" %}</p>
 {% endif %}
+
+
index 2125ec9b453298771f565a09a9a23542c0a62748..6f661ab8763368d083808258e16f2f135ad67222 100644 (file)
@@ -5,7 +5,9 @@
 {% block title %}
 {% trans "Search" %}
 {% endblock %}
-
+{% block extra_stylesheets %}
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+{% endblock %}
 {% block content %}
 
     <form method="get" action=".">
@@ -31,6 +33,7 @@
                 {% endifequal %}
              {% endifequal %}
              {% include "search/filters.html" %}
+
              {% with object_list as items %}
                 <div class="fullpage">
                     {% ifequal type 'item' %}
         {% endif %}
     </form>
 {% endblock %}
+{% block extra_javascript %}
+    <script src="{{ STATIC_URL }}telemeta/js/jquery.js" type="text/javascript"></script>
+    <script src="{{ STATIC_URL }}telemeta/js/jquery-ui.min.js" type="text/javascript"></script>
+    <script>
+        $(document).ready(function() {
+            var nouvellesIcones = {
+                header : 'ui-icon-carat-1-e',
+                activeHeader : 'ui-icon-carat-1-s',
+
+
+            };
+
+            $("#accordeon").accordion({
+                collapsible : true,
+                icons : nouvellesIcones,
+            });
+            $( "#datepicker").datepicker();
+        });
+    </script>
+{% endblock %}