Revize 6f8c9e05
Přidáno uživatelem Ondřej Drtina před téměř 4 roky(ů)
application/view/searchContent.php | ||
---|---|---|
548 | 548 |
result += "<td class=\"action-td\">" + |
549 | 549 |
"<button class=\"btn\" title=\"Detail\" data-toggle=\"modal\" data-target=\"#detail-modal\" data-pseudo-id='" + id + "'><i class=\"fa fa-search\"></i></button>" + |
550 | 550 |
"</td>"; |
551 |
result += "<td class=\"action-td\">" + |
|
552 |
"<button class=\"btn\" title=\"Odstranit\" data-toggle=\"modal\" data-target=\"#remove-modal\" data-pseudo-id='" + id + "'><i class=\"fa fa-trash\"></i></button>" + |
|
553 |
"</td>"; //added button for removing entry |
|
551 | 554 |
result += "</tr>"; |
552 | 555 |
}); |
553 | 556 |
document.getElementById("search-table").innerHTML = result; |
... | ... | |
559 | 562 |
<h3 id="no-data-label" class="mx-auto text-center font-italic">Žádná data nebyla nalezena</h3> |
560 | 563 |
|
561 | 564 |
<script> |
565 |
function removeSelectedItem(){ |
|
566 |
const data = new FormData(); //to pass ids, which we want to delete from DB |
|
567 |
data.append("id", ""+4); //id to delete from table dd_wordform |
|
568 |
data.append("wordform_id", ""+4); //id to delete from M:N table dd_manuscript (prolly the same as above...) |
|
569 |
|
|
570 |
let xhr = new XMLHttpRequest(); |
|
571 |
xhr.open("POST", "./controller/RemoveController.php"); |
|
572 |
xhr.onload = function(){ |
|
573 |
alert("loaded"); |
|
574 |
}; |
|
575 |
xhr.send(data); |
|
576 |
alert("removing item: 4"); |
|
577 |
} |
|
578 |
|
|
562 | 579 |
function checkValidItemsPerPage(){ |
563 | 580 |
var visibleItemCount = document.getElementById("itemsPerPage"); |
564 | 581 |
if(!isNaN(visibleItemCount.value) && visibleItemCount.value % 1 === 0 && parseInt(visibleItemCount.value) >= 1 && parseInt(visibleItemCount.value) <= 500){ |
Také k dispozici: Unified diff
commit před mergem s Milan. větví.