We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e22bc39 commit 19186b2Copy full SHA for 19186b2
src/main/webapp/WEB-INF/jsp/meals.jsp
@@ -37,6 +37,10 @@
37
</form>
38
</div>
39
<div class="card-footer text-right">
40
+ <button class="btn btn-danger" onclick="clearFilter()">
41
+ <span class="fa fa-remove"></span>
42
+ <spring:message code="common.cancel"/>
43
+ </button>
44
<button class="btn btn-primary" onclick="ctx.updateTable()">
45
<span class="fa fa-filter"></span>
46
<spring:message code="meal.filter"/>
src/main/webapp/resources/js/topjava.meals.js
@@ -12,6 +12,11 @@ const ctx = {
12
}
13
};
14
15
+function clearFilter() {
16
+ $("#filter")[0].reset();
17
+ $.get(mealAjaxUrl, updateTableByData);
18
+}
19
+
20
$(function () {
21
makeEditable(
22
$("#datatable").DataTable({
0 commit comments