1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 06:15:11 +03:00
This commit is contained in:
Scavanger 2024-04-01 14:44:39 -03:00
commit ca13eefa1b
32 changed files with 2988 additions and 796 deletions

View file

@ -83,6 +83,8 @@ var Settings = (function () {
if (input.prop('tagName') == 'SELECT' || s.setting.table) {
if (input.attr('type') == 'checkbox') {
input.prop('checked', s.value > 0);
} else if (input.attr('type') == 'radio') {
input.prop( 'checked', s.value == input.attr('value') );
} else {
input.empty();
let option = null;
@ -537,6 +539,10 @@ var Settings = (function () {
if (setting.table) {
if (input.attr('type') == 'checkbox') {
value = input.prop('checked') ? 1 : 0;
} else if (input.attr('type') == 'radio') {
if (input.prop('checked')) {
value = parseInt(input.val());
}
} else {
value = parseInt(input.val());
}