]> git.parisson.com Git - telemeta.git/commitdiff
Add checkboxes on search results
authorafilsaime <shadow_kungfu@hotmail.fr>
Tue, 2 Jun 2015 08:31:10 +0000 (10:31 +0200)
committerafilsaime <shadow_kungfu@hotmail.fr>
Tue, 2 Jun 2015 08:31:10 +0000 (10:31 +0200)
examples/sandbox/src/django-haystack
telemeta/templates/search/mediaitem_listhaystack.html
telemeta/templates/search/search.html

index bd60745ce82318b1819768c9a31db0579228654d..cecb459ff4468a79a43cead3d09e213d0980c080 160000 (submodule)
@@ -1 +1 @@
-Subproject commit bd60745ce82318b1819768c9a31db0579228654d
+Subproject commit cecb459ff4468a79a43cead3d09e213d0980c080
index b3c5c21388acb8640ef0e7aadf720c7756ee2e6d..4a7ed19961dfb05fab70d0385d8f4b3cf8332ba3 100644 (file)
@@ -8,7 +8,8 @@
 
 <table class="listing">
 <tr>
-    <th class="highlight">{% trans "Title" %}</th>
+    <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+    <th>{% trans "Title" %}</th>
     <th>{% trans "Digitized" %}</th>
     <th>{% trans "Recordist" %}</th>
     {% if location_name %}
@@ -21,7 +22,8 @@
 </tr>
 {% for result in page.object_list %}
 <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-    <td class="highlight">
+    <td class="highlight"><input type="checkbox" class="check1"/></td>
+    <td>
         <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object }}</a></br>
     </td>
     <td align="center">
index 6f661ab8763368d083808258e16f2f135ad67222..455889b448f8726d4584b39805bb8c19b0da2b28 100644 (file)
@@ -62,7 +62,7 @@
     <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() {
+        $(function() {
             var nouvellesIcones = {
                 header : 'ui-icon-carat-1-e',
                 activeHeader : 'ui-icon-carat-1-s',
                 icons : nouvellesIcones,
             });
             $( "#datepicker").datepicker();
+            $("#selectAll").click(function(){
+                if(this.checked){
+                    $(".check1").each(function(){
+                        this.checked=true;
+                    });
+                }
+                else{
+                    $(".check1").each(function(){
+                        this.checked=false;
+                    });
+                }
+            });
         });
     </script>
 {% endblock %}