mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 06:38:49 +01:00
Fix Admin Panel / People editing and layout.
Thanks to xet7 ! Fixes #5961
This commit is contained in:
parent
8d3b53f51d
commit
7a585a3dfb
5 changed files with 67 additions and 65 deletions
|
|
@ -218,6 +218,22 @@ window.Popup = new (class {
|
|||
const viewportHeight = $(window).height();
|
||||
const popupWidth = Math.min(380, viewportWidth * 0.55) + 15; // Add 15px for margin
|
||||
|
||||
// Check if this is an admin panel edit popup
|
||||
const isAdminEditPopup = $element.hasClass('edit-user') ||
|
||||
$element.hasClass('edit-org') ||
|
||||
$element.hasClass('edit-team');
|
||||
|
||||
if (isAdminEditPopup) {
|
||||
// Center the popup horizontally and use full height
|
||||
const centeredLeft = (viewportWidth - popupWidth) / 2;
|
||||
|
||||
return {
|
||||
left: Math.max(10, centeredLeft), // Ensure popup doesn't go off screen
|
||||
top: 10, // Start from top with small margin
|
||||
maxHeight: viewportHeight - 20, // Use full height minus small margins
|
||||
};
|
||||
}
|
||||
|
||||
// Calculate available height for popup
|
||||
const popupTop = offset.top + $element.outerHeight();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue