Fix action menu positioning

This commit is contained in:
Mikei386
2026-07-13 20:00:43 +02:00
parent bdebf1bb2b
commit 4cd2b7da47
8 changed files with 36 additions and 6 deletions
-1
View File
@@ -1 +0,0 @@
237c35b49afd25a77903a6c858b20fad1747dbe0131d35c7934f0ee7f94be1a3 urbm-2026.07.13.r002-x86_64-1.txz
+1
View File
@@ -0,0 +1 @@
d486804b98406ddef9d29076a8e96ed71b73fb3921911a94b899f225ca5dd97d urbm-2026.07.13.r003-x86_64-1.txz
+6 -2
View File
@@ -2,13 +2,17 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.07.13.r002">
<!ENTITY version "2026.07.13.r003">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg">
<!ENTITY packageURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm-&version;-x86_64-1.txz">
<!ENTITY packageSHA256 "237c35b49afd25a77903a6c858b20fad1747dbe0131d35c7934f0ee7f94be1a3">
<!ENTITY packageSHA256 "d486804b98406ddef9d29076a8e96ed71b73fb3921911a94b899f225ca5dd97d">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="7.0.0" support="https://git.casaderoll.de/michael/URBM/issues" icon="urbm.png">
<CHANGES>
### 2026.07.13.r003
- Keep repository and job action menus above following table rows and cards.
- Automatically open long action menus upward when the available viewport space below is insufficient.
### 2026.07.13.r002
- Redesign the dashboard around actionable health, active work, recent failures, and the latest successful backup.
- Add searchable responsive job and repository lists with compact secondary-action menus.
+5 -1
View File
@@ -2,13 +2,17 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.07.13.r002">
<!ENTITY version "2026.07.13.r003">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg">
<!ENTITY packageURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm-&version;-x86_64-1.txz">
<!ENTITY packageSHA256 "REPLACE_DURING_RELEASE">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="7.0.0" support="https://git.casaderoll.de/michael/URBM/issues" icon="urbm.png">
<CHANGES>
### 2026.07.13.r003
- Keep repository and job action menus above following table rows and cards.
- Automatically open long action menus upward when the available viewport space below is insufficient.
### 2026.07.13.r002
- Redesign the dashboard around actionable health, active work, recent failures, and the latest successful backup.
- Add searchable responsive job and repository lists with compact secondary-action menus.
+1 -1
View File
@@ -8,7 +8,7 @@ Tag="URBM Unraid Restic Backup Manager backup snapshots restore"
---
<?php
$pluginRoot = '/plugins/urbm';
$urbmVersion = '2026.07.13.r002';
$urbmVersion = '2026.07.13.r003';
$urbmAssetVersion = preg_replace('/[^A-Za-z0-9]/', '', $urbmVersion);
?>
<link rel="stylesheet" href="<?= $pluginRoot ?>/assets/urbm.css?v=<?= $urbmAssetVersion ?>">
+4 -1
View File
@@ -197,9 +197,12 @@
#urbm-app .bu-button.danger { color: var(--bu-bad) !important; }
#urbm-app .bu-button:disabled { cursor: wait; opacity: .55; }
.bu-action-menu { position: relative; }
.bu-action-menu[open] { z-index: 80; }
.bu-table tr.bu-menu-open, .bu-table tr.bu-menu-open > td { overflow: visible; position: relative; z-index: 70; }
#urbm-app .bu-action-menu > summary { align-items: center; display: inline-flex; gap: 8px; list-style: none; }
.bu-action-menu > summary::-webkit-details-marker { display: none; }
.bu-action-menu-popover { background: var(--bu-panel); border: 1px solid var(--bu-border-strong); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.22); display: grid; min-width: 220px; padding: 6px; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; }
.bu-action-menu-popover { background: var(--bu-panel); border: 1px solid var(--bu-border-strong); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.22); display: grid; max-height: min(430px, calc(100vh - 24px)); min-width: 220px; overflow-y: auto; padding: 6px; position: absolute; right: 0; top: calc(100% + 6px); z-index: 90; }
.bu-action-menu.open-up .bu-action-menu-popover { bottom: calc(100% + 6px); top: auto; }
#urbm-app .bu-action-menu-popover .bu-button { background: transparent !important; border-color: transparent !important; justify-content: flex-start; text-align: left; width: 100%; }
#urbm-app .bu-action-menu-popover .bu-button:hover { background: var(--bu-panel-alt) !important; border-color: transparent !important; }
#urbm-app .bu-action-menu-popover .bu-button.danger { border-top: 1px solid var(--bu-border) !important; border-radius: 0 !important; margin-top: 4px !important; }
+19
View File
@@ -977,6 +977,25 @@
document.addEventListener('click', e=>{
document.querySelectorAll('.bu-action-menu[open]').forEach(menu=>{ if(!menu.contains(e.target)) menu.removeAttribute('open'); });
});
content.addEventListener('toggle', e=>{
const menu=e.target.closest?.('.bu-action-menu');
if(!menu) return;
const row=menu.closest('tr');
row?.classList.toggle('bu-menu-open',menu.open);
menu.classList.remove('open-up');
if(!menu.open) return;
content.querySelectorAll('.bu-action-menu[open]').forEach(other=>{ if(other!==menu) other.removeAttribute('open'); });
requestAnimationFrame(()=>{
const summary=menu.querySelector('summary');
const popover=menu.querySelector('.bu-action-menu-popover');
if(!summary||!popover) return;
const rect=summary.getBoundingClientRect();
const needed=Math.min(popover.scrollHeight,430);
const below=window.innerHeight-rect.bottom-12;
const above=rect.top-12;
menu.classList.toggle('open-up',below<needed&&above>below);
});
},true);
content.addEventListener('change', e => {
if (e.target.name === 'type' && e.target.closest('#bu-repo-form')) {
renderRepositorySpecific(e.target.value);