percent box initial (prefill)
This commit is contained in:
parent
80ca653599
commit
aee60e754a
4 changed files with 31 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
|
@ -683,3 +683,16 @@ input[type="radio"] {
|
|||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.percent-box {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 1.1rem;
|
||||
vertical-align: middle;
|
||||
color: #d9f3ff;
|
||||
margin: 0 0.5rem 0rem 0.5rem;
|
||||
padding: 0.2rem 1.2rem 0.2rem 1.2rem;
|
||||
background: #1e4d6c;
|
||||
border: 2px solid #3e6d8c;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -575,4 +575,17 @@ input[type="radio"] {
|
|||
.tooltip:hover .tooltip-text {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.percent-box {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 1.1rem;
|
||||
vertical-align: middle;
|
||||
color: #d9f3ff;
|
||||
margin: 0 0.5rem 0rem 0.5rem;
|
||||
padding: 0.2rem 1.2rem 0.2rem 1.2rem;
|
||||
background: #1e4d6c;
|
||||
border: 2px solid #3e6d8c;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
|
@ -275,11 +275,12 @@ function PrefillHTML(jsObj) {
|
|||
h2 = jsObj[i].h2;
|
||||
h2id = "h2-" + jsObj[i].id;
|
||||
|
||||
mp = " – " + jsObj[i].maxPercent + "%";
|
||||
if (!jsObj[i].hasOwnProperty("maxPercent") || i === "intro") mp = "";
|
||||
mp = `<div class='percent-box'>${(i === "intro") ? 0: jsObj[i].maxPercent}%</div>`;
|
||||
if (!jsObj[i].hasOwnProperty("maxPercent")) mp = "";
|
||||
|
||||
document.getElementById("generated").innerHTML += "<div id='" + id + "'" + cl + ">" + "</div>";
|
||||
document.getElementById(id).innerHTML += "<h2 id='" + h2id + "'>" + h2 + mp + "</h2>";
|
||||
// document.getElementById(id).innerHTML += "<h2 id='" + h2id + "'>" + h2 + mp + "</h2>";
|
||||
document.getElementById(id).innerHTML += `<h2 id='${h2id}'>${h2}${mp}</h2>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue