fixing UI

This commit is contained in:
HB9HIL
2024-08-25 11:15:09 +02:00
parent 42d0c8e7df
commit dc0138b718
2 changed files with 7 additions and 5 deletions

View File

@@ -126,12 +126,10 @@
<textarea name="qso" class="form-control qso-area" cols="auto" rows="11" id="sfle_textarea" style="font-family: 'Courier New', sans-serif;"></textarea>
</div>
</div>
</div>
<!-- Container for errors -->
<div class="card-body">
<div class="row">
<div class="row" id="errorMessages">
<div class="col">
<div class="js-status"></div>
<div class="js-status mt-3"></div>
</div>
</div>
</div>

View File

@@ -526,11 +526,13 @@ function clearSession() {
$(".js-qso-count").html("");
errors = [];
$(".js-status").html("");
window.location.reload();
}
function showErrors() {
if (errors) {
$(".js-status").html(errors.join("\n"));
resizeElements();
}
}
@@ -822,6 +824,8 @@ function resizeElements() {
var textarea = $('#sfle_textarea');
var textareaOffset = 40;
var errorMessagesContainer = $('#errorMessages');
var tableFrame = $('.sfletable.table');
var tableFrameOffset = 140;
@@ -829,7 +833,7 @@ function resizeElements() {
var tableoOffset = 160;
if ($(window).width() >= 768) {
var newHeight = $(window).height() - textarea.offset().top - textareaOffset;
var newHeight = $(window).height() - textarea.offset().top - textareaOffset - errorMessagesContainer.height();
textarea.css('height', newHeight + 'px');
var newHeight = $(window).height() - tableFrame.offset().top - tableFrameOffset;