Fix compilation creation

This commit is contained in:
Georgy Litvinov 2021-03-26 14:11:30 +01:00
parent c2429a6768
commit 4ab94d59af

View file

@ -139,7 +139,7 @@
}
function createNewCompilation() {
var excerpts = $('.virtualArticlePart').toArray();
var excerpts = $('.compilationDraftExcerpt').toArray();
if (excerpts.length == 0){
alert("Отрывков не найдено.");
return;
@ -150,7 +150,7 @@
return;
}
var iframe = document.createElement("iframe");
var excerptsCounter = $('.virtualArticlePart').length;
var excerptsCounter = $('.compilationDraftExcerpt').length;
iframe.setAttribute("src", "${urls.base}/editRequestDispatch?typeOfNew=https%3A%2F%2Flitvinovg.pro%2Ftext_structures%23compilation&editForm=edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.CompilationGenerator&excerptsCount=" + excerptsCounter);
iframe.style.width = "1px";
iframe.style.height = "1px";
@ -171,7 +171,7 @@
iframeDoc.getElementById('newCompilationLabel').value = compilationName;
var excerpts = $('.virtualArticlePart').toArray();
var excerpts = $('.compilationDraftExcerpt').toArray();
for (i = 0;i < excerpts.length;i++){
var excerptUri = excerpts[i].getAttribute('parturi');
var excerptName = $(excerpts[i]).children('button').html();