From 0dfed66987e704d757725257d4b2a5e55b72ee5e Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sun, 21 Jun 2020 15:38:44 +0200 Subject: Filter improve, missing chips and date --- server/templates/server/doc_list.html | 56 ++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 14 deletions(-) (limited to 'server/templates') diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index 730837c..331a3d5 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -61,7 +61,7 @@
@@ -73,31 +73,29 @@
- - + +
- - + +
-
-
- - +
+
+
-
-
- - +
+
+
@@ -202,6 +200,34 @@ $(document).ready(function(){ M.toast({html: '{{ error_text}}', classes: 'orange'}) {% endif %} }); +$('.chips').chips(); +$('#chips_type').chips({ + placeholder: 'Tipo', + secondaryPlaceholder: '+Altro tipo', + autocompleteOptions: { + data: { + {% for t in types %} + '{{t.name}}': null, + {% endfor %} + }, + limit: Infinity, + minLength: 0 + } +}); +$('#chips_owner').chips({ + placeholder: 'Utente', + secondaryPlaceholder: '+Altro utente', + autocompleteOptions: { + data: { + {% for user in users %} + '{{user.first_name}} {{user.last_name}}': null, + {% endfor %} + }, + limit: Infinity, + minLength: 0 + } +}); + function send(id) { var form = document.getElementById('selection') var action = document.getElementById('action') @@ -221,6 +247,7 @@ $('#select-all').click(function(event) { } }); var options = { + showClearBtn: true, container: document.getElementById('main'), yearRange:100, format:'dd mmmm yyyy', @@ -233,6 +260,7 @@ var options = { today: 'Oggi', clear: 'Cancella', close: 'Chiudi', + cancel: 'Annulla', firstDay: 1, format: 'dddd d mmmm yyyy', formatSubmit: 'yyyy/mm/dd', -- cgit v1.2.1