|
|
|
@ -260,7 +260,33 @@
|
|
|
|
|
class="btn btn-primary"
|
|
|
|
|
value="Добавить источник"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="col-12 form-group">
|
|
|
|
|
<label for="formatStandard">Стандарт форматирования:</label>
|
|
|
|
|
|
|
|
|
|
<select class="form-control" th:field="*{formatStandard}"
|
|
|
|
|
id="formatStandard">
|
|
|
|
|
<option th:each="standard : ${allFormatStandards}"
|
|
|
|
|
th:value="${standard}"
|
|
|
|
|
th:text="${standard.standardName}">standard
|
|
|
|
|
</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12 form-group">
|
|
|
|
|
<button id="formatBtn" class="btn btn-primary text-uppercase"
|
|
|
|
|
onclick="getFormattedReferences()"
|
|
|
|
|
type="button">
|
|
|
|
|
Форматировать
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<textarea class="form-control"
|
|
|
|
|
id="formattedReferencesArea"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -474,6 +500,25 @@
|
|
|
|
|
$('#pdfBtn').prop('disabled', false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getFormattedReferences() {
|
|
|
|
|
|
|
|
|
|
var formData = new FormData(document.forms.paperform);
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
|
xhr.open("POST", urlReferencesFormatting);
|
|
|
|
|
console.log(formData);
|
|
|
|
|
xhr.send(formData);
|
|
|
|
|
|
|
|
|
|
xhr.onload = function () {
|
|
|
|
|
if (this.status == 200) {
|
|
|
|
|
console.debug(this.response);
|
|
|
|
|
$('#formattedReferencesArea').val(this.response);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
showFeedbackMessage("Ошибка при форматировании списка литературы", MessageTypesEnum.DANGER);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|