Skip to content

Commit

Permalink
check for open documents before duplicating as a PDF. close #2234
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 13, 2023
1 parent cfca5c0 commit 34726bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Binary file modified j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5075,6 +5075,23 @@ private void mnuDuplicateDocumentAsPdfActionPerformed(java.awt.event.ActionEvent
try {

ArrayList<ArchiveFileDocumentsBean> selected = this.caseFolderPanel1.getSelectedDocuments();
if (selected.isEmpty()) {
return;
}

ArrayList<String> open = this.getDocumentsOpenForWrite(selected);
if (!open.isEmpty()) {
String question = "<html>Soll die Aktion auf geöffnete Dokumente ausgeführt werden? Es besteht das Risiko fehlender / inkonsistenter Inhalte.<br/><ul>";
for (String o : open) {
question = question + "<li>" + o + "</li>";
}
question = question + "</ul></html>";
int response = JOptionPane.showConfirmDialog(this, question, "Aktion auf offene Dokumente ausführen", JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.NO_OPTION) {
return;
}
}


for (ArchiveFileDocumentsBean doc : selected) {
this.convertDocumentToPdf(doc);
Expand Down
Binary file modified j-lawyer-server/j-lawyer-server-ejb/lib/j-lawyer-cloud.jar
Binary file not shown.

0 comments on commit 34726bb

Please sign in to comment.