Move some of the delete/rename dialog event handlers

This commit is contained in:
Gnome Ann 2021-09-01 13:05:24 -04:00
parent 16184ceee8
commit 556835cd34
1 changed files with 16 additions and 13 deletions

View File

@ -596,10 +596,6 @@ function buildLoadList(ar) {
socket.send({'cmd': 'deletestory', 'data': name});
}
})(name));
$("#btn_dsclose").off("click").on("click", function () {
$("#loadcontainerdelete").removeClass("flex").addClass("hidden");
hide([$(".saveasoverwrite"), $(".popuperror")]);
});
$("#loadcontainerdelete").removeClass("hidden").addClass("flex");
}
})(ar[i].name));
@ -618,15 +614,6 @@ function buildLoadList(ar) {
}
})(name);
$("#btn_rensaccept").off("click").on("click", submit);
$("#newsavename").off("keydown").on("keydown", function (ev) {
if (ev.which == 13 && $(this).val() != "") {
submit();
}
});
$("#btn_rensclose").off("click").on("click", function () {
$("#loadcontainerrename").removeClass("flex").addClass("hidden");
hide([$(".saveasoverwrite"), $(".popuperror")]);
});
$("#loadcontainerrename").removeClass("hidden").addClass("flex");
$("#newsavename").val(name).select();
}
@ -1308,6 +1295,22 @@ $(document).ready(function(){
hideNewStoryPopup();
});
$("#btn_dsclose").on("click", function () {
$("#loadcontainerdelete").removeClass("flex").addClass("hidden");
hide([$(".saveasoverwrite"), $(".popuperror")]);
});
$("#newsavename").on("keydown", function (ev) {
if (ev.which == 13 && $(this).val() != "") {
submit();
}
});
$("#btn_rensclose").on("click", function () {
$("#loadcontainerrename").removeClass("flex").addClass("hidden");
hide([$(".saveasoverwrite"), $(".popuperror")]);
});
button_rndgame.on("click", function(ev) {
showRandomStoryPopup();
});