mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 00:35:26 +03:00
Make the 'Update Firmware' buttom more consistent (#1571)
Make the 'Update Firmware' buttom more consistent
This commit is contained in:
commit
2b0e5617f4
2 changed files with 7 additions and 4 deletions
|
@ -90,15 +90,11 @@ function initializeSerialBackend() {
|
||||||
if ($('div#flashbutton a.flash_state').hasClass('active') && $('div#flashbutton a.flash').hasClass('active')) {
|
if ($('div#flashbutton a.flash_state').hasClass('active') && $('div#flashbutton a.flash').hasClass('active')) {
|
||||||
$('div#flashbutton a.flash_state').removeClass('active');
|
$('div#flashbutton a.flash_state').removeClass('active');
|
||||||
$('div#flashbutton a.flash').removeClass('active');
|
$('div#flashbutton a.flash').removeClass('active');
|
||||||
document.getElementById("tab_landing").style.display = "block";
|
|
||||||
document.getElementById("tab_help").style.display = "block";
|
|
||||||
$('#tabs ul.mode-disconnected .tab_landing a').click();
|
$('#tabs ul.mode-disconnected .tab_landing a').click();
|
||||||
} else {
|
} else {
|
||||||
$('#tabs ul.mode-disconnected .tab_firmware_flasher a').click();
|
$('#tabs ul.mode-disconnected .tab_firmware_flasher a').click();
|
||||||
$('div#flashbutton a.flash_state').addClass('active');
|
$('div#flashbutton a.flash_state').addClass('active');
|
||||||
$('div#flashbutton a.flash').addClass('active');
|
$('div#flashbutton a.flash').addClass('active');
|
||||||
document.getElementById("tab_landing").style.display = "none";
|
|
||||||
document.getElementById("tab_help").style.display = "none";
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -684,6 +684,9 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Update Firmware button at top
|
||||||
|
$('div#flashbutton a.flash_state').addClass('active');
|
||||||
|
$('div#flashbutton a.flash').addClass('active');
|
||||||
GUI.content_ready(callback);
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -700,6 +703,10 @@ TABS.firmware_flasher.cleanup = function (callback) {
|
||||||
$(document).unbind('keypress');
|
$(document).unbind('keypress');
|
||||||
$(document).off('click', 'span.progressLabel a');
|
$(document).off('click', 'span.progressLabel a');
|
||||||
|
|
||||||
|
// Update Firmware button at top
|
||||||
|
$('div#flashbutton a.flash_state').removeClass('active');
|
||||||
|
$('div#flashbutton a.flash').removeClass('active');
|
||||||
|
|
||||||
analytics.resetFirmwareData();
|
analytics.resetFirmwareData();
|
||||||
|
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue