perf(web): improve form submit handling

This commit is contained in:
2023-01-31 01:54:33 +03:00
parent 9cf6daefb8
commit 70f593997d
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ $(document).on("input", "#text-filter", function (e) {
});
});
$(document).on("click", "#btn-confirm", function (e) {
$(document).on("submit", "#menu-view form", function (e) {
e.preventDefault();
let resp = tdb_query("$TFM", 24, '' + current_sasa.id);
if (!resp.status) {
@@ -89,7 +89,7 @@ $(document).on("click", "#btn-confirm", function (e) {
$("#text-filter").val("");
});
$(document).on("click", "#btn-add", function (e) {
$(document).on("submit", "#menu-add form", function (e) {
e.preventDefault();
let resp = tdb_query("$TFM", 18, $("#new-name").val());
if (!resp.status) {