Revize fcb9c374
Přidáno uživatelem Tomáš Pašek před téměř 4 roky(ů)
application/view/searchContent.php | ||
---|---|---|
607 | 607 |
} |
608 | 608 |
|
609 | 609 |
function publishItem(id, index){ |
610 |
console.log(index); |
|
610 | 611 |
let item = data[index]; |
611 | 612 |
const finishedChecked = document.getElementById("check-"+id).checked; |
612 | 613 |
|
... | ... | |
646 | 647 |
data.forEach((item,id) => { |
647 | 648 |
result += "<tr>"; |
648 | 649 |
<?php if(isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] == true) {?> |
649 |
result += "<td><input type='checkbox' id='check-"+item.id+"' onchange='publishItem("+ id+ ")' "+ ((item.finished === true) ? 'checked' : '') +" /></td>"; |
|
650 |
result += "<td><input type='checkbox' id='check-"+item.id+"' onchange='publishItem("+item.id+", "+ id+ ")' "+ ((item.finished === true) ? 'checked' : '') +" /></td>";
|
|
650 | 651 |
<?php }?> |
651 | 652 |
result += "<td>" + item.lemma.lemma + "</td>"; |
652 | 653 |
result += "<td>" + item.word + "</td>"; |
Také k dispozici: Unified diff
oprava zobrazení tabulky