fix(web): fix quote create form positioning

This commit is contained in:
Masahiko AMANO 2025-01-07 15:40:14 +03:00
parent 3bfc54e407
commit 93374f1164
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100vh;
background-color: #0008;
}

View File

@ -123,11 +123,14 @@ $(document).on("click", "#btn-add-open", function (e) {
now = new Date;
now = new Date(now.getTime() - now.getTimezoneOffset() * 60000);
$("#new-quote-datetime").val(now.toJSON().slice(0,19));
$("body").css("overflow", "hidden");
$("#quote-creator").css("top", $(window).scrollTop());
$("#quote-creator").removeClass("hidden");
});
$(document).on("click", "#btn-add-close", function (e) {
$("#quote-creator").addClass("hidden");
$("body").css("overflow", "");
});
$(document).on("submit", "#quote-create", function (e) {
@ -143,6 +146,7 @@ $(document).on("submit", "#quote-create", function (e) {
dataType: "json",
success: function (resp) {
$("#quote-creator").addClass("hidden");
$("body").css("overflow", "");
reload();
$("#new-quote-text").val("");
$("#new-quote-author").val("");