pannello filtri in dialog

This commit is contained in:
boyska 2020-09-30 00:47:59 +02:00
parent 509d3bd47a
commit d6afc92aee
2 changed files with 20 additions and 4 deletions

View file

@ -52,6 +52,7 @@ function viewMap () {
}
jQuery(function ($) {
var dateFormat = "yy-mm-dd";
$('.btn').button()
function getDate( element ) {
var date;
try {
@ -77,5 +78,9 @@ jQuery(function ($) {
).on("change", function() {
from.datepicker("option", "maxDate", getDate(this))
})
$('#filters').dialog({autoOpen: false, modal: true, height: 'auto', width: $(window).width() - 200})
$('#btn-open-filter').click(function() {
$('#filters').dialog('open')
})
viewMap()
})

View file

@ -11,9 +11,12 @@
{% block content %}
<style>
.ui-datepicker { z-index: 10 !important ;}
.ui-datepicker { z-index: 200 !important ;}
</style>
<div id="dialog"></div>
<div id="short-actions">
<button class="btn" id="btn-open-filter">Filtra</button>
</div>
<div id="filters">
<!-- TODO: rendi collassabile -->
<header><h3>Filtra</h3></header>
@ -22,9 +25,17 @@
<div class="form-field-line">
<label for="tipo_radio__id">Osservazione fatta con</label>
<select name="tipo_radio__id" >
<option value="NA" disabled selected="selected">//</option>
<option value=""
{% if params.tipo_radio__id == "" %} selected="selected" {% endif %}
>//</option>
{% for tr in tipiradio %}
<option value="{{tr.id}}"><strong>{{tr.nome}}</strong> - {{tr.descrizione|default:'' }}</option>
<option value="{{tr.id}}"
{% if tr.id == params.tipo_radio__id|add:"0" %}
selected="selected"
{% endif %}
>
<strong>{{tr.nome}}</strong> - {{tr.descrizione|default:'' }}
</option>
{% endfor %}
</select>
<div>
@ -36,7 +47,7 @@
</div>
<button id="search">Filtra</button>
<button class="btn" id="search">Filtra</button>
</form>
</div>