mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-20 14:55:14 +03:00
Fix steps
This commit is contained in:
parent
cf57493fdb
commit
cfdfff0c94
2 changed files with 43 additions and 59 deletions
|
@ -57,29 +57,32 @@ helper.defaultsDialog = (function (data) {
|
||||||
|
|
||||||
console.log(steps[wizardStep], wizardStep, stepsCount);
|
console.log(steps[wizardStep], wizardStep, stepsCount);
|
||||||
|
|
||||||
if (wizardStep >= stepsCount - 1) {
|
if (wizardStep >= stepsCount) {
|
||||||
//This is the last step, time to finalize
|
//This is the last step, time to finalize
|
||||||
$container.hide();
|
$container.hide();
|
||||||
privateScope.saveAndReboot();
|
privateScope.saveAndReboot();
|
||||||
} else {
|
} else {
|
||||||
const $content = $container.find('.defaults-dialog__wizard');
|
const $content = $container.find('.defaults-dialog__wizard');
|
||||||
|
|
||||||
|
$content.unbind();
|
||||||
|
|
||||||
$.get("./wizard/" + stepName + ".html", function (data) {
|
$.get("./wizard/" + stepName + ".html", function (data) {
|
||||||
|
$content.html("");
|
||||||
$(data).appendTo($content);
|
$(data).appendTo($content);
|
||||||
|
|
||||||
$.get("./wizard/buttons.html", function (data) {
|
$.get("./wizard/buttons.html", function (data) {
|
||||||
$(data).appendTo($content);
|
$(data).appendTo($content);
|
||||||
|
|
||||||
$container.on('click', '#wizard-next', function () {
|
$content.on('click', '#wizard-next', function () {
|
||||||
privateScope.saveWizardStep(selectedDefaultPreset, wizardStep);
|
privateScope.saveWizardStep(selectedDefaultPreset, wizardStep);
|
||||||
});
|
});
|
||||||
|
|
||||||
$container.on('click', '#wizard-skip', function () {
|
$content.on('click', '#wizard-skip', function () {
|
||||||
privateScope.wizard(selectedDefaultPreset, wizardStep + 1);
|
privateScope.wizard(selectedDefaultPreset, wizardStep + 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (stepName == "receiver") {
|
if (stepName == "receiver") {
|
||||||
privateScope.handleTabLoadReceiver($container);
|
privateScope.handleTabLoadReceiver($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings.configureInputs().then(
|
Settings.configureInputs().then(
|
||||||
|
|
|
@ -1,24 +1,5 @@
|
||||||
var helper = helper || {};
|
var helper = helper || {};
|
||||||
|
|
||||||
helper.defaultsDialogReceivers = {
|
|
||||||
0: "SPEK1024",
|
|
||||||
1: "SPEK2048",
|
|
||||||
2: "SBUS",
|
|
||||||
3: "SUMD",
|
|
||||||
4: "SUMH",
|
|
||||||
5: "XB-B",
|
|
||||||
6: "XB-B-RJ01",
|
|
||||||
7: "IBUS",
|
|
||||||
8: "JETIEXBUS",
|
|
||||||
9: "CRSF",
|
|
||||||
10: "FPORT",
|
|
||||||
11: "SBUS_FAST",
|
|
||||||
12: "FPORT2",
|
|
||||||
13: "SRXL2",
|
|
||||||
14: "GHST",
|
|
||||||
15: "MAVLINK"
|
|
||||||
}
|
|
||||||
|
|
||||||
helper.defaultsDialogData = [
|
helper.defaultsDialogData = [
|
||||||
{
|
{
|
||||||
"title": 'Test',
|
"title": 'Test',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue