From 0baa4e2641cf699fc8679c3a90ecb0e70852667d Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 15 Aug 2016 15:11:10 +0200 Subject: [client] ImageUploadWizard: hide the "create lecture for that VM" button until the download is complete instead of just disabling it --- .../dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java | 5 ++--- .../org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java index ecad4d36..c53fd907 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ImageUploadSummaryPageLayout.java @@ -16,7 +16,7 @@ public class ImageUploadSummaryPageLayout extends WizardPage { protected final JCheckBox chkCreateLecture; protected final JLabel lblHelpText; - public ImageUploadSummaryPageLayout(Wizard wizard, boolean allowCreateLecture) { + public ImageUploadSummaryPageLayout(Wizard wizard) { super(wizard, "Fertig!"); setDescription("Assistent abgeschlossen"); GridManager grid = new GridManager(this, 1); @@ -37,8 +37,7 @@ public class ImageUploadSummaryPageLayout extends WizardPage { grid.nextRow(); chkCreateLecture = new JCheckBox("Veranstaltung zu dieser VM erstellen"); - chkCreateLecture.setVisible(allowCreateLecture); - chkCreateLecture.setEnabled(false); + chkCreateLecture.setVisible(false); grid.add(chkCreateLecture); grid.nextRow(); diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java index b5db050b..6370e204 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/ImageUploadSummaryPage.java @@ -26,6 +26,7 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { private boolean pageIsVisible = false; private boolean uploadListenerAdded = false; + private boolean allowCreateLecture = false; private final UploadWizardState state; private final TransferEventListener uploadListener = new TransferEventListener() { @@ -116,7 +117,7 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { setPageComplete(true); } if (state.upload.getUploadTask() != null && state.upload.getUploadTask().isComplete()) { - chkCreateLecture.setEnabled(true); + chkCreateLecture.setVisible(allowCreateLecture); } } @@ -124,8 +125,9 @@ public class ImageUploadSummaryPage extends ImageUploadSummaryPageLayout { } public ImageUploadSummaryPage(Wizard wizard, UploadWizardState state, boolean allowCreateLecture) { - super(wizard, allowCreateLecture); + super(wizard); this.state = state; + this.allowCreateLecture = allowCreateLecture; setPageComplete(false); } -- cgit v1.2.3-55-g7522 From 18ea7115aa5591cbe85f50d257ec1701dc4d4de0 Mon Sep 17 00:00:00 2001 From: Victor Mocanu Date: Tue, 16 Aug 2016 15:31:36 +0200 Subject: [server] Clean up unused imports --- .../src/main/java/org/openslx/bwlp/sat/web/WebRpc.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebRpc.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebRpc.java index 12a856d5..207c4397 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebRpc.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebRpc.java @@ -8,25 +8,21 @@ import java.nio.charset.StandardCharsets; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; -import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import javax.security.auth.login.LoginException; import org.apache.commons.io.output.ByteArrayOutputStream; -import org.omg.CosNaming.NamingContextPackage.NotFound; import org.openslx.bwlp.sat.database.mappers.DbConfiguration; import org.openslx.bwlp.sat.mail.MailTemplate; -import org.openslx.bwlp.sat.mail.SmtpMailer; import org.openslx.bwlp.sat.mail.MailTemplatePlain.Template; +import org.openslx.bwlp.sat.mail.SmtpMailer; import org.openslx.bwlp.sat.mail.SmtpMailer.EncryptionMode; import org.openslx.bwlp.sat.maintenance.DeleteOldImages; import org.openslx.bwlp.sat.maintenance.ImageValidCheck; import org.openslx.util.Util; -import com.btr.proxy.util.Logger; - import fi.iki.elonen.NanoHTTPD; import fi.iki.elonen.NanoHTTPD.Response; -- cgit v1.2.3-55-g7522