1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Moved dialog to main page

And fixed some strings in messages.json
This commit is contained in:
fgiudice98 2020-07-05 20:20:06 +02:00
parent 69603ee46b
commit 69cd83abdd
7 changed files with 28 additions and 43 deletions

View file

@ -760,3 +760,15 @@ function showErrorDialog(message) {
dialog.showModal();
}
function showDialogDynFiltersChange() {
const dialogDynFiltersChange = $('.dialogDynFiltersChange')[0];
if (!dialogDynFiltersChange.hasAttribute('open')) {
dialogDynFiltersChange.showModal();
$('.dialogDynFiltersChange-confirmbtn').click(function() {
dialogDynFiltersChange.close();
});
}
}

View file

@ -541,15 +541,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
if (FILTER_CONFIG.dyn_notch_width_percent !== self.previousFilterDynWidth) {
const dialogDynFiltersChange = $('.dialogDynFiltersChange')[0];
if (!dialogDynFiltersChange.hasAttribute('open')) {
dialogDynFiltersChange.showModal();
$('.dialogDynFiltersChange-confirmbtn').click(function() {
dialogDynFiltersChange.close();
});
}
showDialogDynFiltersChange();
}
});

View file

@ -407,15 +407,7 @@ TABS.pid_tuning.initialize = function (callback) {
dynamicNotchQ_e.val(FILTER_DEFAULT.dyn_notch_q);
}
const dialogDynFiltersChange = $('.dialogDynFiltersChange')[0];
if (!dialogDynFiltersChange.hasAttribute('open')) {
dialogDynFiltersChange.showModal();
$('.dialogDynFiltersChange-confirmbtn').click(function() {
dialogDynFiltersChange.close();
});
}
showDialogDynFiltersChange();
} else { // same value, return saved values
dynamicNotchWidthPercent_e.val(FILTER_CONFIG.dyn_notch_width_percent);