#105 danger message type

merge-requests/60/head
Семенова Мария 5 years ago
parent a2dca6b7c6
commit 6c6a748978

@ -125,7 +125,10 @@ public class FileService {
} }
public void createLatexAttachs(PaperDto paper) throws IOException { public void createLatexAttachs(PaperDto paper) throws IOException {
for (FileDataDto fileDataDto : paper.getFiles().stream().filter(f -> f.isLatexAttach() && !f.isDeleted()).collect(Collectors.toList())) { for (FileDataDto fileDataDto : paper.getFiles()
.stream()
.filter(f -> f.isLatexAttach() && !f.isDeleted())
.collect(Collectors.toList())) {
if (fileDataDto.getId() == null) { if (fileDataDto.getId() == null) {
File oldFile = getTmpFilePath(fileDataDto.getTmpFileName()).toFile(); File oldFile = getTmpFilePath(fileDataDto.getTmpFileName()).toFile();
File renamed = getTmpFilePath(fileDataDto.getName()).toFile(); File renamed = getTmpFilePath(fileDataDto.getName()).toFile();

@ -133,7 +133,7 @@
<div class="tab-pane fade" id="nav-latex" role="tabpanel" <div class="tab-pane fade" id="nav-latex" role="tabpanel"
aria-labelledby="nav-profile-tab"> aria-labelledby="nav-profile-tab">
<div class="form-group"> <div class="form-group">
<label for="latex-text">Текст:</label> <label for="latex-text">Latex текст:</label>
<textarea class="form-control" id="latex-text" type="text" rows="10" <textarea class="form-control" id="latex-text" type="text" rows="10"
placeholder="Latex.." placeholder="Latex.."
th:field="*{latexText}"/> th:field="*{latexText}"/>
@ -363,7 +363,7 @@
a.click(); a.click();
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
} else { } else {
showFeedbackMessage("Ошибка при создании PDF"); showFeedbackMessage("Ошибка при создании PDF", MessageTypesEnum.DANGER);
} }
$('#pdfLoadingIcon').hide(); $('#pdfLoadingIcon').hide();
$('#pdfBtn').prop('disabled', false); $('#pdfBtn').prop('disabled', false);

Loading…
Cancel
Save