Improve conditionals
parent
511ba1cf96
commit
d243a24755
|
@ -1021,12 +1021,14 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
});
|
||||
|
||||
portPickerElement.change(function () {
|
||||
if ($('option:selected', this).data().isDFU && !GUI.connect_lock) {
|
||||
exitDfuElement.removeClass('disabled');
|
||||
} else if (!GUI.connect_lock) {
|
||||
$("a.load_remote_file").removeClass('disabled');
|
||||
$("a.load_file").removeClass('disabled');
|
||||
exitDfuElement.addClass('disabled');
|
||||
if (!GUI.connect_lock) {
|
||||
if ($('option:selected', this).data().isDFU) {
|
||||
exitDfuElement.removeClass('disabled');
|
||||
} else {
|
||||
$("a.load_remote_file").removeClass('disabled');
|
||||
$("a.load_file").removeClass('disabled');
|
||||
exitDfuElement.addClass('disabled');
|
||||
}
|
||||
}
|
||||
}).change();
|
||||
|
||||
|
|
Loading…
Reference in New Issue