mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(ui): a VM page on a phone opens on its tab, not under it
On a phone the VM card's facts, three rows of section buttons and up to three rows of settings tabs pushed every tab's content below the first screen. Both tab rows are now a single row that scrolls sideways, the chosen tab is kept in sight, and the card's facts run inline below the lg breakpoint. The Migrate tab of a VM that cannot be migrated shows only the reason, as Bulk Migrate does, not an empty destination list and a disabled button. The card's Refresh and OS details buttons are outlined, like the panel's other secondary buttons; filled gray read as disabled in the united theme.
This commit is contained in:
parent
4881c3cd3e
commit
701d9b1f0a
4 changed files with 38 additions and 30 deletions
|
|
@ -298,6 +298,14 @@
|
|||
migrateCompute.addEventListener("change", loadMigratePlan);
|
||||
}
|
||||
|
||||
// the tab rows scroll sideways on a phone: the chosen tab is centred in its row, the page stays put
|
||||
document.addEventListener("shown.bs.tab", function (event) {
|
||||
var row = event.target.closest(".overflow-x-auto");
|
||||
if (!row) return;
|
||||
var tab = event.target.getBoundingClientRect(), box = row.getBoundingClientRect();
|
||||
row.scrollLeft += tab.left - box.left - (box.width - tab.width) / 2;
|
||||
});
|
||||
|
||||
// the tab a redirect points to; a template opens on its clone form
|
||||
restoreInstanceTab(document, location.hash || summary.dataset.opensOn, show_tab, load_osinfo);
|
||||
// none open (a template has no Power tab): the first section the page has
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue