perf(web): improve form submit handling
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -55,7 +55,7 @@ $(document).on("dblclick", ".item", function (e) {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", "#btn-confirm", function (e) {
|
||||
$(document).on("submit", "#menu-view form", function (e) {
|
||||
e.preventDefault();
|
||||
let resp = tdb_query("$TFM", 40, '' + current_tanzaku.id);
|
||||
if (!resp.status) {
|
||||
@@ -82,7 +82,7 @@ $(document).on("click", "#btn-confirm", function (e) {
|
||||
$(".list-item").removeClass("selected").css("display", "block");
|
||||
});
|
||||
|
||||
$(document).on("click", "#btn-add", function (e) {
|
||||
$(document).on("submit", "#menu-add form", function (e) {
|
||||
e.preventDefault();
|
||||
let resp = tdb_query("$TFM", 34, $("#new-name").val() + '\n' + $("#new-description").val());
|
||||
if (!resp.status) {
|
||||
|
||||
Reference in New Issue
Block a user