Improve conditionals

10.8-maintenance
Asizon 2020-12-13 08:40:57 +01:00
parent 511ba1cf96
commit d243a24755
1 changed files with 8 additions and 6 deletions

View File

@ -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();