// Add check list filters value

This commit is contained in:
Jerome Nadaud
2013-10-21 12:35:57 +02:00
parent b141975d57
commit 101df4c0b9
2 changed files with 32 additions and 4 deletions
+29 -3
View File
@@ -871,7 +871,34 @@ $(document).ready(function()
});
bindTabModuleListAction();
//Check filters value on submit filter
$("[name='submitFilter']").click(function(event) {
var list_id = $(this).data('list-id');
var empty_filters = true;
$(document.body).find("input[name*='"+list_id+"Filter']").each(function() {
if ($(this).val() != '')
{
empty_filters = false;
return false;
}
});
$(document.body).find("select[name*='"+list_id+"Filter']").each(function() {
if ($(this).val() != '')
{
empty_filters = false;
return false;
}
});
if (empty_filters)
{
event.preventDefault();
$('#'+list_id+'-empty-filters-alert').show();
}
});
});
@@ -1077,5 +1104,4 @@ function sendBulkAction(form, action)
$(form).attr('action', form_action.splice(form_action.lastIndexOf('&'), 0, '&' + action));
$(form).submit();
}
}