fix delete button

This commit is contained in:
Anton Romanov 2018-11-18 14:29:41 +04:00
parent 9a0fa5a170
commit 6adc96761b

View File

@ -6,15 +6,14 @@ function showPapers(papersElement, paperRowClass) {
getFromRest(urlPapers, function (paperList) { getFromRest(urlPapers, function (paperList) {
paperList.forEach(function (paper, index) { paperList.forEach(function (paper, index) {
$(papersElement).parent().append("<div class='row text-left paper-row'>" + $(papersElement).parent().append("<div class='row text-left paper-row'>" +
" <div class='col col-10'>" + " <div class='col'>" +
" <span class='fa-stack fa-1x'>\n" + " <span class='fa-stack fa-1x'>\n" +
" <i class='fa fa-circle fa-stack-2x " + getPaperStatusClass(paper.status) + "'></i>" + " <i class='fa fa-circle fa-stack-2x " + getPaperStatusClass(paper.status) + "'></i>" +
" <i class='fa fa-file-text-o fa-stack-1x fa-inverse'></i>" + " <i class='fa fa-file-text-o fa-stack-1x fa-inverse'></i>" +
" </span>" + " </span>" +
" <a href='paper?id=" + paper.id + "" + " <a href='paper?id=" + paper.id + "" +
"'><span>" + (index + 1) + ". " + paper.title + "</span></a></div>" + "'><span>" + (index + 1) + ". " + paper.title + "</span></a>" +
"<div class='col col-1'>" + "<span class='remove-paper d-none pull-right' onclick=\"deletePaper(" + paper.id + ",'" + papersElement + "', '" + paperRowClass + "')\">" +
"<span class='remove-paper d-none' onclick=\"deletePaper(" + paper.id + ",'" + papersElement + "', '" + paperRowClass + "')\">" +
"<i class=\"fa fa-trash\" aria-hidden=\"true\"></i></span>" + "<i class=\"fa fa-trash\" aria-hidden=\"true\"></i></span>" +
"</div></div>"); "</div></div>");
}); });