mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
#12488 tips window move for clicks
This commit is contained in:
parent
64f6825d65
commit
21fe027a62
@ -82,6 +82,7 @@ function removeInputImage(e) {
|
||||
}
|
||||
}
|
||||
function render({ title, text, url, files, method }) {
|
||||
var positionButtonsBefore = $(".ui-dialog-buttonset").offset().top;
|
||||
$("#title_tip").html(title);
|
||||
$("#text_tip").html(text);
|
||||
if (url) {
|
||||
@ -123,6 +124,7 @@ function render({ title, text, url, files, method }) {
|
||||
}
|
||||
});
|
||||
activeCarousel();
|
||||
checkPositionButtons(positionButtonsBefore);
|
||||
}
|
||||
|
||||
function close_dialog() {
|
||||
@ -429,3 +431,18 @@ function validateImages() {
|
||||
});
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user