diff --git a/js/firmware.js b/js/firmware.js
index 0c46b79..d59e76d 100644
--- a/js/firmware.js
+++ b/js/firmware.js
@@ -89,10 +89,10 @@ function change (origin, select) {
.material_select()
$('#erstinstallation').html("")
if(router_json[id].stablefactory === 1) {
- $('#erstinstallation').append('');
+ $('#erstinstallation').append('');
}
if(router_json[id].stablesysupgrade === 1) {
- $('#erstinstallation').append('');
+ $('#erstinstallation').append('');
}
$('#erstinstallation').removeAttr('disabled')
$('#erstinstallation').material_select()
@@ -100,20 +100,41 @@ function change (origin, select) {
$('#img_router_back').attr("src", router_json[$(select).val()].imageback)
}
else if (origin === 'erstinstallation') {
+ var erstinstallation;
+ if($('#erstinstallation').val().lastIndexOf('N') < 0) {
+ erstinstallation = true;
+ } else if($('#erstinstallation').val().lastIndexOf('Y') < 0) {
+ erstinstallation = false;
+ }
var stadium = $('#entwicklungsstadium')
stadium.html("")
var id = $('#version').val()
- if (router_json[id].stablefactory == 1) {
- stadium.append("")
- }
- if (router_json[id].betafactory == 1) {
- stadium.append("")
- }
- if (router_json[id].experimentalfactory == 1) {
- stadium.append("")
- }
- if (router_json[id].brokenfactory == 1) {
- stadium.append("")
+ if(erstinstallation) {
+ if (router_json[id].stablefactory === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].betafactory === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].experimentalfactory === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].brokenfactory === 1) {
+ stadium.append("")
+ }
+ } else if (!erstinstallation) {
+ if (router_json[id].stablesysupgrade === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].betasysupgrade === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].experimentalsysupgrade === 1) {
+ stadium.append("")
+ }
+ if (router_json[id].brokensysupgrade === 1) {
+ stadium.append("")
+ }
}
stadium.removeAttr('disabled')
stadium.material_select()