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