cleaning up a bit
parent
1921691040
commit
e0c8e786f1
@ -1,14 +1,16 @@
|
||||
<form action="#" onsubmit="updateLabel(event)">
|
||||
<input type="text" name="label" onkeyup="updateLabel(event)" value="{{ label }}" id="label-input-{{ address }}" onfocusout="updateLabel(event)">
|
||||
</form>
|
||||
<script>
|
||||
function updateLabel(e) {
|
||||
e.preventDefault();
|
||||
if (e.keyCode === 13) {
|
||||
htmx.ajax('GET', `/wallet/{{ address }}/label/${e.target.value}`, '#show_wallets');
|
||||
} else if (e.keyCode === 27 || e.type == "focusout") {
|
||||
htmx.ajax('GET', '{{ url_for("htmx.show_wallets") }}', '#show_wallets');
|
||||
<div>
|
||||
<form action="#" onsubmit="updateLabel(event)">
|
||||
<input type="text" name="label" onkeyup="updateLabel(event)" value="{{ label }}" id="label-input-{{ address }}" onfocusout="updateLabel(event)">
|
||||
</form>
|
||||
<script>
|
||||
function updateLabel(e) {
|
||||
e.preventDefault();
|
||||
if (e.keyCode === 13) {
|
||||
htmx.ajax('GET', `/wallet/{{ address }}/label/${e.target.value}`, '#show_wallets');
|
||||
} else if (e.keyCode === 27 || e.type == "focusout") {
|
||||
htmx.ajax('GET', '{{ url_for("htmx.show_wallets") }}', '#show_wallets');
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById('label-input-{{ address }}').focus();
|
||||
</script>
|
||||
document.getElementById('label-input-{{ address }}').focus();
|
||||
</script>
|
||||
</div>
|
@ -1,14 +1,16 @@
|
||||
<form action="#" onsubmit="updateHeight(event)">
|
||||
<input type="text" name="label" onkeyup="updateHeight(event)" value="{{ height }}" id="height-input-{{ address }}" onfocusout="updateHeight(event)">
|
||||
</form>
|
||||
<script>
|
||||
function updateHeight(e) {
|
||||
e.preventDefault();
|
||||
if (e.keyCode === 13) {
|
||||
htmx.ajax('GET', `/wallet/{{ address }}/rescan/${e.target.value}`, '#show_wallets');
|
||||
} else if (e.keyCode === 27 || e.type == "focusout") {
|
||||
htmx.ajax('GET', '{{ url_for("htmx.show_wallets") }}', '#show_wallets');
|
||||
<div>
|
||||
<form action="#" onsubmit="updateHeight(event)">
|
||||
<input type="text" name="label" onkeyup="updateHeight(event)" value="{{ height }}" id="height-input-{{ address }}" onfocusout="updateHeight(event)">
|
||||
</form>
|
||||
<script>
|
||||
function updateHeight(e) {
|
||||
e.preventDefault();
|
||||
if (e.keyCode === 13) {
|
||||
htmx.ajax('GET', `/wallet/{{ address }}/rescan/${e.target.value}`, '#show_wallets');
|
||||
} else if (e.keyCode === 27 || e.type == "focusout") {
|
||||
htmx.ajax('GET', '{{ url_for("htmx.show_wallets") }}', '#show_wallets');
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById('height-input-{{ address }}').focus();
|
||||
</script>
|
||||
document.getElementById('height-input-{{ address }}').focus();
|
||||
</script>
|
||||
</div>
|
Loading…
Reference in New Issue