|
|
@@ -21,6 +21,8 @@
|
|
|
|
|
|
<p>Please select the required options for the custom firmware build.</p>
|
|
|
|
|
|
+ <textarea style="float:right" readonly>hello</textarea>
|
|
|
+
|
|
|
<form action="/generate" method="post">
|
|
|
<label for="vehicle">Choose a vehicle:</label>
|
|
|
<select name="vehicle">
|
|
|
@@ -52,9 +54,9 @@
|
|
|
{% for f in get_build_options(c) %}
|
|
|
<li>
|
|
|
{% if f.default == 1 %}
|
|
|
- <input onclick='handleClick(this, "{{f.label}}", "{{f.dependency}}");' type="checkbox" name="{{f.label}}" id="{{f.label}}" value="1" checked>
|
|
|
+ <input onclick='dependencies(this, "{{f.label}}", "{{f.dependency}}");' type="checkbox" name="{{f.label}}" id="{{f.label}}" value="1" checked>
|
|
|
{% else %}
|
|
|
- <input onclick='handleClick(this, "{{f.label}}", "{{f.dependency}}");' type="checkbox" name="{{f.label}}" id="{{f.label}}" value="1">
|
|
|
+ <input onclick='dependencies(this, "{{f.label}}", "{{f.dependency}}");' type="checkbox" name="{{f.label}}" id="{{f.label}}" value="1">
|
|
|
{% endif %}
|
|
|
{{f.description}}
|
|
|
</li>
|
|
|
@@ -70,6 +72,8 @@
|
|
|
<hr>
|
|
|
<div id="build_status"></div>
|
|
|
<br />
|
|
|
+<p id="demo"></p>
|
|
|
+<p id="demo2"></p>
|
|
|
<script>
|
|
|
CollapsibleLists.apply();
|
|
|
function reload() {
|
|
|
@@ -91,11 +95,15 @@
|
|
|
xhr.send();
|
|
|
}
|
|
|
|
|
|
- function handleClick(cb, f_label, f_dependency) {
|
|
|
+ function dependencies(cb, f_label, f_dependency1) {
|
|
|
switch (cb.name) {
|
|
|
case f_label:
|
|
|
- if (document.getElementById(f_dependency).checked == false){
|
|
|
- document.getElementById(f_dependency).checked = cb.checked;
|
|
|
+ const f_dependency = f_dependency1.split(",")
|
|
|
+ var arrayLength = f_dependency.length;
|
|
|
+ for (var i = 0; i < arrayLength; i++) {
|
|
|
+ if (document.getElementById(f_dependency[i]).checked == false){
|
|
|
+ document.getElementById(f_dependency[i]).checked = cb.checked;
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
}
|