// Add check list filters value
This commit is contained in:
+29
-3
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user