Status korektury jako atribut a ne třída
This commit is contained in:
parent
3b74772949
commit
5563eb681c
3 changed files with 12 additions and 8 deletions
|
@ -20,16 +20,16 @@ body[data-status="zastarale"] {
|
|||
img{background:white;}
|
||||
|
||||
/* Barvy korektur */
|
||||
.k_oprave {
|
||||
[data-opravastatus="k_oprave"] {
|
||||
--rgb: 255, 0, 0;
|
||||
}
|
||||
.opraveno {
|
||||
[data-opravastatus="opraveno"] {
|
||||
--rgb: 0, 0, 255;
|
||||
}
|
||||
.neni_chyba {
|
||||
[data-opravastatus="neni_chyba"] {
|
||||
--rgb: 128, 128, 128;
|
||||
}
|
||||
.k_zaneseni {
|
||||
[data-opravastatus="k_zaneseni"] {
|
||||
--rgb: 0, 255, 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
|
||||
<div onclick='img_click(this,event)'
|
||||
id='op{{o.id}}-pointer'
|
||||
class='pointer {{o.status}}'>
|
||||
class='pointer'
|
||||
data-opravastatus="{{o.status}}"
|
||||
>
|
||||
</div>
|
||||
<div name='op{{o.id}}' id='op{{o.id}}'
|
||||
class='box {{o.status}}'
|
||||
class='box'
|
||||
data-opravastatus="{{o.status}}"
|
||||
onmouseover='box_onmouseover(this)'
|
||||
onmouseout='box_onmouseout(this)'>
|
||||
onmouseout='box_onmouseout(this)'
|
||||
>
|
||||
|
||||
<div class='corr-body' id='op{{o.id}}-body'>
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ Zobrazit:
|
|||
}
|
||||
for (var i=0;i<ssheet.cssRules.length;i++){
|
||||
var rule = ssheet.cssRules[i];
|
||||
if (rule.selectorText === '.'+aclass){
|
||||
if (rule.selectorText === '[data-opravastatus="'+aclass+'"]'){
|
||||
if (rule.style.display === ""){
|
||||
rule.style.display = "none";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue