forked from fixin.me/fixin.me
Merge branch 'feature/measurements-wide-view' into demo/example-data
This commit is contained in:
@@ -134,13 +134,9 @@ window.detailsObserver = new MutationObserver((mutations) => {
|
|||||||
function readoutUnitChanged(select) {
|
function readoutUnitChanged(select) {
|
||||||
var button = select.closest('tr').querySelector('.set-default-unit');
|
var button = select.closest('tr').querySelector('.set-default-unit');
|
||||||
if (select.value && select.value !== select.dataset.defaultUnitId) {
|
if (select.value && select.value !== select.dataset.defaultUnitId) {
|
||||||
button.removeAttribute('disabled');
|
Turbo.StreamElement.prototype.enableElement(button);
|
||||||
button.removeAttribute('aria-disabled');
|
|
||||||
button.removeAttribute('tabindex');
|
|
||||||
} else {
|
} else {
|
||||||
button.setAttribute('disabled', 'disabled');
|
Turbo.StreamElement.prototype.disableElement(button);
|
||||||
button.setAttribute('aria-disabled', 'true');
|
|
||||||
button.setAttribute('tabindex', '-1');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.readoutUnitChanged = readoutUnitChanged
|
window.readoutUnitChanged = readoutUnitChanged
|
||||||
|
|||||||
Reference in New Issue
Block a user