Wizard step 2: add jump-to-columns shortcut for known tables.
New text input + "jump to columns" button skip the full table listing when you already know what you want. Typing "schema.table" and tabbing out auto-splits into the schema qualifier + table name. Jump button stays disabled until the table field has a value. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
fde4fa99b6
commit
bb0b493d18
@ -27,10 +27,45 @@
|
||||
</label>
|
||||
{% endfor %}
|
||||
|
||||
<label class="field">
|
||||
<span>table (skip browse)</span>
|
||||
<input type="text" name="table" id="jump-table"
|
||||
placeholder="schema.table — or leave blank to browse"
|
||||
autocomplete="off" spellcheck="false">
|
||||
<span class="help">if you know the table, fill this in and click jump. <code>schema.table</code> auto-populates the qualifier above on tab-out.</span>
|
||||
</label>
|
||||
|
||||
<div class="actions" style="margin-top:0.8rem">
|
||||
<button type="submit" class="primary">browse →</button>
|
||||
<button type="submit" id="jump-btn"
|
||||
formaction="/wizard/columns" disabled>
|
||||
jump to columns →
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
(function () {
|
||||
var tbl = document.getElementById('jump-table');
|
||||
var btn = document.getElementById('jump-btn');
|
||||
var schemaInput = document.querySelector('input[name="schema"]')
|
||||
|| document.querySelector('input[name="library"]');
|
||||
|
||||
function updateBtn() {
|
||||
btn.disabled = !tbl.value.trim();
|
||||
}
|
||||
tbl.addEventListener('input', updateBtn);
|
||||
tbl.addEventListener('blur', function () {
|
||||
var v = tbl.value.trim();
|
||||
var dot = v.indexOf('.');
|
||||
if (dot > 0 && schemaInput) {
|
||||
schemaInput.value = v.substring(0, dot);
|
||||
tbl.value = v.substring(dot + 1);
|
||||
updateBtn();
|
||||
}
|
||||
});
|
||||
updateBtn();
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user