From 28b99e2aa4846fe4e6074e8689e6d1d1f065ab2b Mon Sep 17 00:00:00 2001 From: labcode-de Date: Sat, 23 Sep 2017 20:40:47 +0200 Subject: [PATCH] add data attr --- js/firmware.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/firmware.js b/js/firmware.js index 15864c3..0c46b79 100644 --- a/js/firmware.js +++ b/js/firmware.js @@ -83,12 +83,17 @@ function change (origin, select) { .material_select(); } else if(origin === 'version') { + var id = $('#version').val() $('#entwicklungsstadium') .attr('disabled', '') .material_select() - $('#erstinstallation').html("" + - "" + - "") + $('#erstinstallation').html("") + if(router_json[id].stablefactory === 1) { + $('#erstinstallation').append(''); + } + if(router_json[id].stablesysupgrade === 1) { + $('#erstinstallation').append(''); + } $('#erstinstallation').removeAttr('disabled') $('#erstinstallation').material_select() $('#img_router_front').attr("src", router_json[$(select).val()].imagefront) @@ -98,7 +103,6 @@ function change (origin, select) { var stadium = $('#entwicklungsstadium') stadium.html("") var id = $('#version').val() - console.log(router_json[id]) if (router_json[id].stablefactory == 1) { stadium.append("") }