1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

Improve conditionals

This commit is contained in:
Asizon 2020-12-13 08:40:57 +01:00
parent 511ba1cf96
commit d243a24755

View file

@ -1021,12 +1021,14 @@ TABS.firmware_flasher.initialize = function (callback) {
}); });
portPickerElement.change(function () { portPickerElement.change(function () {
if ($('option:selected', this).data().isDFU && !GUI.connect_lock) { if (!GUI.connect_lock) {
exitDfuElement.removeClass('disabled'); if ($('option:selected', this).data().isDFU) {
} else if (!GUI.connect_lock) { exitDfuElement.removeClass('disabled');
$("a.load_remote_file").removeClass('disabled'); } else {
$("a.load_file").removeClass('disabled'); $("a.load_remote_file").removeClass('disabled');
exitDfuElement.addClass('disabled'); $("a.load_file").removeClass('disabled');
exitDfuElement.addClass('disabled');
}
} }
}).change(); }).change();