Do not create compilation with no excerpts

This commit is contained in:
Georgy Litvinov 2021-02-25 21:48:19 +01:00
parent 1590d58830
commit 75841b9fb2

View file

@ -135,6 +135,11 @@ $('input[type=checkbox]').removeAttr('checked');
}
}
function createNewCompilation() {
var excerpts = $('.virtualArticlePart').toArray();
if (excerpts.length == 0){
alert("Отрывков не найдено.");
return;
}
var compilationName = window.prompt("Введите название подборки.");
if (!compilationName){
alert("Для создания подоборки необходимо ввести её название.");