#105 danger message type

This commit is contained in:
Семенова Мария 2019-04-18 19:03:04 +04:00
parent a2dca6b7c6
commit 6c6a748978
2 changed files with 6 additions and 3 deletions

View File

@ -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();

View File

@ -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);