Revize fb86dc6a
Přidáno uživatelem Jan Čarnogurský před více než 4 roky(ů)
src/main/java/vldc/aswi/utils/ExporterPDF.java | ||
---|---|---|
6 | 6 |
import com.lowagie.text.alignment.HorizontalAlignment; |
7 | 7 |
import com.lowagie.text.alignment.VerticalAlignment; |
8 | 8 |
import com.lowagie.text.pdf.PdfWriter; |
9 |
import com.sun.media.jfxmedia.logging.Logger; |
|
10 | 9 |
import org.apache.pdfbox.pdmodel.PDPage; |
11 | 10 |
import org.apache.pdfbox.pdmodel.font.PDType1Font; |
12 | 11 |
import vldc.aswi.model.table.contingencyTable.ContingencyTableRow; |
... | ... | |
70 | 69 |
doc.close(); |
71 | 70 |
} catch (Exception e) { |
72 | 71 |
|
73 |
Logger.logMsg(Logger.WARNING, "Error while exporting contingency table to PDF."); |
|
74 |
Logger.logMsg(Logger.WARNING, e.getStackTrace().toString()); |
|
75 | 72 |
} |
76 | 73 |
} |
77 | 74 |
|
src/main/webapp/WEB-INF/templates/assembly.html | ||
---|---|---|
8 | 8 |
|
9 | 9 |
<div layout:fragment="content"> |
10 | 10 |
|
11 |
<meta th:name="${_csrf.parameterName}" th:content="${_csrf.token}"/> |
|
12 |
|
|
11 | 13 |
<div class="container"> |
12 | 14 |
<h1> |
13 | 15 |
Sestava - |
... | ... | |
17 | 19 |
<a href="/" class="btn btn-success mb-2">Zpět</a> |
18 | 20 |
</div> |
19 | 21 |
|
20 |
<form th:object="${configuration}" method="post" th:action="@{${formAction}}"> |
|
22 |
<form th:object="${configuration}" method="post" th:action="@{${formAction}}" id="assembly-form">
|
|
21 | 23 |
<input type="hidden" th:field="*{assembly.id}" th:value="${configuration.assembly?.getId()}"/> |
22 | 24 |
<input type="hidden" name="isNotRemoveEmpty"/> |
23 | 25 |
<div class="container box"> |
src/main/webapp/js/assemblyScripts.js | ||
---|---|---|
279 | 279 |
|
280 | 280 |
document.querySelectorAll('.show-spinner').forEach(button => { |
281 | 281 |
button.addEventListener('click', showSpinner); |
282 |
}) |
|
282 |
}); |
|
283 |
|
|
284 |
// check for form response to hide spinner |
|
285 |
$('#assembly-form').on('submit',function(e){ |
|
286 |
|
|
287 |
// csfr protection |
|
288 |
var token = $("meta[name='_csrf']").attr("content"); |
|
289 |
|
|
290 |
$.ajax({ |
|
291 |
url: $('#form').attr('action'), |
|
292 |
headers: {"X-CSRF-TOKEN": token}, |
|
293 |
type: 'POST', |
|
294 |
contentType: "application/json; charset=utf-8", |
|
295 |
data : $('#assembly-form').serialize(), |
|
296 |
complete: function () { |
|
297 |
hideSpinner(); |
|
298 |
} |
|
299 |
}); |
|
300 |
}); |
|
283 | 301 |
} |
284 | 302 |
|
285 | 303 |
/** |
Také k dispozici: Unified diff
re #8175 - hide spinner after pdf/excel generation