#12488 tips window move for clicks

This commit is contained in:
Jonathan 2024-02-05 14:34:43 +01:00
parent 64f6825d65
commit 21fe027a62

View File

@ -82,6 +82,7 @@ function removeInputImage(e) {
} }
} }
function render({ title, text, url, files, method }) { function render({ title, text, url, files, method }) {
var positionButtonsBefore = $(".ui-dialog-buttonset").offset().top;
$("#title_tip").html(title); $("#title_tip").html(title);
$("#text_tip").html(text); $("#text_tip").html(text);
if (url) { if (url) {
@ -123,6 +124,7 @@ function render({ title, text, url, files, method }) {
} }
}); });
activeCarousel(); activeCarousel();
checkPositionButtons(positionButtonsBefore);
} }
function close_dialog() { function close_dialog() {
@ -429,3 +431,18 @@ function validateImages() {
}); });
return validate; return validate;
} }
function checkPositionButtons(positionButtonsBefore) {
// posicion actual botones
var buttonsNow = $(".ui-dialog-buttonset").offset().top;
// Position of dialog
var dialogPosition = $(".dialog_tips").position().top;
var positionFinal;
if (positionButtonsBefore > buttonsNow) {
positionFinal = dialogPosition + (positionButtonsBefore - buttonsNow);
$(".dialog_tips").css("top", positionFinal);
} else if (positionButtonsBefore < buttonsNow) {
positionFinal = dialogPosition - (buttonsNow - positionButtonsBefore);
$(".dialog_tips").css("top", positionFinal);
}
}