(change): MM revamp, scroll behavior

This commit is contained in:
2025-10-19 21:35:18 -04:00
parent d7523f3e67
commit 0b0ae291d0
5 changed files with 26 additions and 16 deletions

View File

@@ -28,7 +28,12 @@
<input type="number" bind:value={pagerForm.id_from}> <input type="number" bind:value={pagerForm.id_from}>
<div style="font-size: 22pt">-</div> <div style="font-size: 22pt">-</div>
<input type="number" bind:value={pagerForm.id_to}> <input type="number" bind:value={pagerForm.id_to}>
<button class="styled" onclick={functions.refreshPage}>Refresh</button> <button class="styled" onclick={() => {
if (Math.abs(pagerForm.id_to - pagerForm.id_from) > 800) {
pagerForm.id_to = pagerForm.id_from + 799;
}
setTimeout(functions.refreshPage, 50);
}}>Refresh</button>
</div> </div>
<div class="flex-row"> <div class="flex-row">
<button class="styled" title="Alt + B" tabindex="-1" onclick={functions.prevPage}>Prev Page</button> <button class="styled" title="Alt + B" tabindex="-1" onclick={functions.prevPage}>Prev Page</button>

View File

@@ -40,14 +40,19 @@
<a href="/counts" target="_blank" class="styled">Counts</a> <a href="/counts" target="_blank" class="styled">Counts</a>
</div> </div>
<div> <div>
<h2>Select Prefix:</h2> <h2>Current Prefix: {current_prefix.name}</h2>
</div> </div>
<div class="prefix-selector"> <div class="change_title">
<select style="width: 100%; box-sizing: border-box;" bind:value={prefix_name}> <h2>Change Prefix:</h2>
{#each all_prefixes as prefix} </div>
<option value={prefix.name}>{prefix.name}</option> <div class="prefix-selector flex-row">
{/each} {#each all_prefixes as prefix}
</select> <div class={prefix.color}>
<button class="styled" onclick={() => {
prefix_name = prefix.name;
}}>{prefix.name}</button>
</div>
{/each}
</div> </div>
<div><h2>Forms:</h2></div> <div><h2>Forms:</h2></div>
<div class="flex-row {current_prefix.color}"> <div class="flex-row {current_prefix.color}">
@@ -60,14 +65,14 @@
<a href="/reports/byname/{current_prefix.name}/" target="_blank" class="styled">By Name</a> <a href="/reports/byname/{current_prefix.name}/" target="_blank" class="styled">By Name</a>
<a href="/reports/bybasket/{current_prefix.name}/" target="_blank" class="styled">By Basket ID</a> <a href="/reports/bybasket/{current_prefix.name}/" target="_blank" class="styled">By Basket ID</a>
</div> </div>
{#if admin_mode} </div>
<div><h2>Admin Mode:</h2></div> {#if admin_mode}
<div class="flex-row {current_prefix.color}"> <div><h2>Admin Mode:</h2></div>
<div class="flex-row">
<a href="/prefixes" target="_blank" class="styled">Prefix Editor</a> <a href="/prefixes" target="_blank" class="styled">Prefix Editor</a>
<a href="/backuprestore" target="_blank" class="styled">Backup/Restore</a> <a href="/backuprestore" target="_blank" class="styled">Backup/Restore</a>
</div>
{/if}
</div> </div>
{/if}
<div class="status tb-margin"> <div class="status tb-margin">
{data.status} {data.status}

View File

@@ -14,7 +14,7 @@
const focusDe = document.getElementById(`${idx}_de`); const focusDe = document.getElementById(`${idx}_de`);
if (focusDe) { if (focusDe) {
focusDe.select(); focusDe.select();
focusDe.scrollIntoView({block: "end"}); focusDe.scrollIntoView({block: "center"});
} }
} }

View File

@@ -13,7 +13,7 @@
const focusWt = document.getElementById(`${idx}_wt`); const focusWt = document.getElementById(`${idx}_wt`);
if (focusWt) { if (focusWt) {
focusWt.select(); focusWt.select();
focusWt.scrollIntoView({block: "end"}); focusWt.scrollIntoView({block: "center"});
} }
} }

View File

@@ -13,7 +13,7 @@
const focusFn = document.getElementById(`${idx}_fn`); const focusFn = document.getElementById(`${idx}_fn`);
if (focusFn) { if (focusFn) {
focusFn.select(); focusFn.select();
focusFn.scrollIntoView({block: "end"}); focusFn.scrollIntoView({block: "center"});
} }
} }