Merge remote-tracking branch 'origin/erase_params_filter' into click_outside_close_pan

This commit is contained in:
JC 2016-11-07 12:35:33 +01:00
commit 20cab702f6
3 changed files with 8 additions and 3 deletions

View file

@ -16,6 +16,9 @@ function filters_init() {
filter_framed_close_all_excepted(framed_id(event)); filter_framed_close_all_excepted(framed_id(event));
event.stopPropagation(); event.stopPropagation();
}); });
$(".erase-filter").on('click', function (event) {
$(this).parent().find(".filter_input").val("");
});
} }
function filter_framed_close_all_excepted(id) { function filter_framed_close_all_excepted(id) {

View file

@ -30,4 +30,4 @@ function pref_list_dossier_close_action() {
} }
) )
}); });
} }

View file

@ -3,6 +3,8 @@
= preference.libelle = preference.libelle
=form_tag @dossiers_list_facade.filter_url, {class: 'panel-body form-inline', method: :post} do =form_tag @dossiers_list_facade.filter_url, {class: 'panel-body form-inline', method: :post} do
%input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 84%', value: "#{preference.filter}"} %input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 69%', value: "#{preference.filter}"}
%button.btn.btn-sm.btn-success %button.btn.btn-sm.btn-success
%i.fa.fa-check %i.fa.fa-check
%div.btn.btn-sm.btn-danger.erase-filter
%i.fa.fa-remove