Révision b057fff0
Ajouté par Serghei Mihai il y a plus de 9 ans
calebasse/static/js/calebasse.dossiers.js | ||
---|---|---|
19 | 19 |
}); |
20 | 20 |
} |
21 | 21 |
|
22 |
function filter_date_bounds(tab, selector) { |
|
22 |
function filter_date_bounds(tab, container, selector) {
|
|
23 | 23 |
var from = $(tab + ' form.filter input[name=from]').datepicker('getDate'); |
24 | 24 |
var to = $(tab + ' form.filter input[name=to]').datepicker('getDate'); |
25 | 25 |
if (to) { |
26 | 26 |
to.setHours(23); to.setMinutes(59); to.setSeconds(59); |
27 | 27 |
} |
28 |
$.each($(tab + ' ' + selector), function(){ |
|
29 |
var current = $.datepicker.parseDate('d/m/yy', $(this).text()); |
|
30 |
if (current < from || (to && current >= to)) { |
|
31 |
$(this).parent().parent().addClass('screen-only'); |
|
32 |
} else { |
|
33 |
$(this).parent().parent().removeClass('screen-only'); |
|
28 |
$.each($(tab + ' ' + container), function(element) { |
|
29 |
var block = $(this); |
|
30 |
block.addClass('screen-only'); |
|
31 |
if ($(selector, $(this)).length) { |
|
32 |
$.each($(selector, this), function() { |
|
33 |
var current = $.datepicker.parseDate('d/m/yy', $(this).text()); |
|
34 |
if (current < from || (to && current >= to)) { |
|
35 |
$(this).parent().parent().addClass('screen-only'); |
|
36 |
} else { |
|
37 |
block.removeClass('screen-only'); |
|
38 |
$(this).parent().parent().removeClass('screen-only'); |
|
39 |
} |
|
40 |
}); |
|
34 | 41 |
} |
35 |
});
|
|
36 |
} |
|
42 |
}) |
|
43 |
};
|
|
37 | 44 |
|
38 | 45 |
function load_add_address_dialog() { |
39 | 46 |
var str = $("#contactform").serialize(); |
Formats disponibles : Unified diff
dossiers: remove block not matching date filter criteria
Closes #3109