Style the add score button

This commit is contained in:
Raphaël Jakse 2020-05-01 11:10:53 +02:00
parent 01bd051e4b
commit a3ef7431d8
2 changed files with 24 additions and 7 deletions

View File

@ -373,18 +373,33 @@ td.blink {
#participants th, #participants td {
border:1px solid gray;
padding:0.33ex 1ex
padding:0.33ex 0.5ex
}
#participants .score-cell {
min-width:4em;
#participants .score-cell > span {
display:inline-block;
min-width:2.5em;
}
#participants .score-cell:hover, .turn-cell button:hover {
#participants .score-cell > span:hover, .turn-cell button:hover {
cursor:pointer;
background:#FFA
}
#participants .score-cell button {
min-height: auto;
font-size:x-small;
padding:0 0.5ex;
margin:0;
background:#CCC;
color:back;
border:0;
}
#participants .score-cell button:hover {
background:#DDD;
}
#participants th {
font-weight:normal;
background:#EEE;

View File

@ -742,11 +742,13 @@
participants.insertBefore(row, before);
row.appendChild(document.createElement("td"));
row.lastChild.textContent = playerName;
row.appendChild(document.createElement("td"));
row.appendChild(document.createElement("td"));
row.appendChild(document.createElement("td"));
row.lastChild.className = "score-cell";
row.lastChild.appendChild(document.createElement("span"));
row.lastChild.lastChild.className = "score-cell";
row.lastChild.lastChild.onclick = (
function (row) {
return function () {
@ -775,7 +777,7 @@
};
}
)(row);
row.lastChild.appendChild(document.createTextNode(" "));
row.lastChild.appendChild(document.createElement("button"));
row.lastChild.lastChild.textContent = "+";
row.lastChild.lastChild.onclick = (