[FIX] className.add gibt es nicht daher classList.add verwendet und firmwarePage.onUpdate_1() wieder in populateA() umgewandelt, bis der ganze JS code ein rewrite erhält...

This commit is contained in:
Caspar Armster 2016-07-24 22:55:12 +02:00
parent e4f7638bc8
commit 078ab00800

View File

@ -99,7 +99,7 @@ $community_id = $_REQUEST['id'];
} }
s6.href = '#' s6.href = '#'
s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success') s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success')
s6.className.add('btn-primary', 'disabled') s6.classList.add('btn-primary', 'disabled')
s6.textContent = 'Download Firmware' s6.textContent = 'Download Firmware'
img_router_front.src = 'router_images/keinbild.jpg' img_router_front.src = 'router_images/keinbild.jpg'
img_router_back.src = 'router_images/keinbild.jpg' img_router_back.src = 'router_images/keinbild.jpg'
@ -147,7 +147,7 @@ $community_id = $_REQUEST['id'];
} }
s6.href = '#' s6.href = '#'
s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success') s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success')
s6.className.add('btn-primary', 'disabled') s6.classList.add('btn-primary', 'disabled')
s6.textContent = 'Download Firmware' s6.textContent = 'Download Firmware'
img_router_front.src = 'router_images/keinbild.jpg' img_router_front.src = 'router_images/keinbild.jpg'
img_router_back.src = 'router_images/keinbild.jpg' img_router_back.src = 'router_images/keinbild.jpg'
@ -184,7 +184,7 @@ $community_id = $_REQUEST['id'];
} }
s6.href = '#' s6.href = '#'
s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success') s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success')
s6.className.add('btn-primary', 'disabled') s6.classList.add('btn-primary', 'disabled')
s6.textContent = 'Download Firmware' s6.textContent = 'Download Firmware'
img_router_front.src = newImageFront img_router_front.src = newImageFront
img_router_back.src = newImageBack img_router_back.src = newImageBack
@ -244,7 +244,7 @@ $community_id = $_REQUEST['id'];
} }
s6.href = '#' s6.href = '#'
s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success') s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success')
s6.className.add('btn-primary', 'disabled') s6.classList.add('btn-primary', 'disabled')
s6.textContent = 'Download Firmware' s6.textContent = 'Download Firmware'
} }
function populateE () { function populateE () {
@ -256,46 +256,46 @@ $community_id = $_REQUEST['id'];
if (s5.value.lastIndexOf('Jbeta') != -1) { if (s5.value.lastIndexOf('Jbeta') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 4)) id = parseInt(s5.value.slice(0, s5.value.length - 4))
link = router_json[id].betafactorylink link = router_json[id].betafactorylink
linkclass = ' btn-warning' linkclass = 'btn-warning'
} }
if (s5.value.lastIndexOf('Jbroken') != -1) { if (s5.value.lastIndexOf('Jbroken') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 6)) id = parseInt(s5.value.slice(0, s5.value.length - 6))
link = router_json[id].brokenfactorylink link = router_json[id].brokenfactorylink
linkclass = ' btn-danger' linkclass = 'btn-danger'
} }
if (s5.value.lastIndexOf('Jexp') != -1) { if (s5.value.lastIndexOf('Jexp') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 3)) id = parseInt(s5.value.slice(0, s5.value.length - 3))
link = router_json[id].experimentalfactorylink link = router_json[id].experimentalfactorylink
linkclass = ' btn-warning' linkclass = 'btn-warning'
} }
if (s5.value.lastIndexOf('Jstable') != -1) { if (s5.value.lastIndexOf('Jstable') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 6)) id = parseInt(s5.value.slice(0, s5.value.length - 6))
link = router_json[id].stablefactorylink link = router_json[id].stablefactorylink
linkclass = ' btn-success' linkclass = 'btn-success'
} }
if (s5.value.lastIndexOf('Nbeta') != -1) { if (s5.value.lastIndexOf('Nbeta') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 4)) id = parseInt(s5.value.slice(0, s5.value.length - 4))
link = router_json[id].betasysupgradelink link = router_json[id].betasysupgradelink
linkclass = ' btn-warning' linkclass = 'btn-warning'
} }
if (s5.value.lastIndexOf('Nbroken') != -1) { if (s5.value.lastIndexOf('Nbroken') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 6)) id = parseInt(s5.value.slice(0, s5.value.length - 6))
link = router_json[id].brokensysupgradelink link = router_json[id].brokensysupgradelink
linkclass = ' btn-danger' linkclass = 'btn-danger'
} }
if (s5.value.lastIndexOf('Nexp') != -1) { if (s5.value.lastIndexOf('Nexp') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 3)) id = parseInt(s5.value.slice(0, s5.value.length - 3))
link = router_json[id].experimentalsysupgradelink link = router_json[id].experimentalsysupgradelink
linkclass = ' btn-warning' linkclass = 'btn-warning'
} }
if (s5.value.lastIndexOf('Nstable') != -1) { if (s5.value.lastIndexOf('Nstable') != -1) {
id = parseInt(s5.value.slice(0, s5.value.length - 6)) id = parseInt(s5.value.slice(0, s5.value.length - 6))
link = router_json[id].stablesysupgradelink link = router_json[id].stablesysupgradelink
linkclass = ' btn-success' linkclass = 'btn-success'
} }
s6.href = link s6.href = link
s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success') s6.classList.remove('disabled', 'btn-primary', 'btn-danger', 'btn-warning', 'btn-success')
s6.className.add(linkclass) s6.classList.add(linkclass)
s6.textContent = 'Download Firmware' s6.textContent = 'Download Firmware'
} }
</script> </script>
@ -349,7 +349,7 @@ $community_id = $_REQUEST['id'];
<h3 class="panel-title">Router Hersteller</h3> <h3 class="panel-title">Router Hersteller</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<select id="fw-dl-1" name="fw-dl-1" class="form-control" onchange="firmwarePage.onUpdate_1()"> <select id="fw-dl-1" name="fw-dl-1" class="form-control" onchange="populateA()">
<option value="">Hersteller auswählen</option> <option value="">Hersteller auswählen</option>
<?php foreach ($hersteller as $value): ?> <?php foreach ($hersteller as $value): ?>
<option value="<?php echo $value['name']?>"><?php echo $value['name']?></option> <option value="<?php echo $value['name']?>"><?php echo $value['name']?></option>
@ -379,6 +379,7 @@ $community_id = $_REQUEST['id'];
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">