summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java
diff options
context:
space:
mode:
authorVictor Mocanu2016-10-31 12:33:15 +0100
committerVictor Mocanu2016-10-31 12:33:15 +0100
commit81c52e55a21e37a29b386335d904ef241f34da5f (patch)
tree787f6d2ecb13af07a6c0988ed29faa4eeb6ef077 /dozentenmodul/src/main/java
parent[client] added simple vmx editor (diff)
parent[client] disable "extend image expiry date" again until the server supports i... (diff)
downloadtutor-module-81c52e55a21e37a29b386335d904ef241f34da5f.tar.gz
tutor-module-81c52e55a21e37a29b386335d904ef241f34da5f.tar.xz
tutor-module-81c52e55a21e37a29b386335d904ef241f34da5f.zip
Merge branch 'v1.1' of git.openslx.org:openslx-ng/tutor-module into v1.1
Diffstat (limited to 'dozentenmodul/src/main/java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index 974cc997..2f2b381f 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -264,7 +264,6 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
if (Session.canExtendImageExpiry()) {
pop.addSeparator();
pop.addMenuItem(mnuExtendExpiryDate);
- mnuExtendExpiryDate.setEnabled(true);
}
// keyboard shortcut
@@ -314,13 +313,15 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
}
if (e.isPopupTrigger()) {
boolean multiSelection = tblVersions.getSelectedRowCount() != 1;
- mnuNewLecture.setEnabled(!multiSelection && tblVersions.getSelectedItem().isValid
+ ImageVersionDetails selectedVersion = tblVersions.getSelectedItem();
+ mnuNewLecture.setEnabled(!multiSelection && selectedVersion.isValid
&& ImagePerms.canLink(image));
- mnuDownload.setEnabled(!multiSelection && tblVersions.getSelectedItem().isValid
+ mnuDownload.setEnabled(!multiSelection && selectedVersion.isValid
&& ImagePerms.canDownload(image));
- mnuVmConfig.setEnabled(!multiSelection && tblVersions.getSelectedItem().isValid
+ mnuVmConfig.setEnabled(!multiSelection && selectedVersion.isValid
&& ImagePerms.canEdit(image) && (image.shareMode == ShareMode.LOCAL || image.shareMode == ShareMode.PUBLISH));
mnuDelete.setEnabled(ImagePerms.canEdit(image));
+ mnuExtendExpiryDate.setEnabled(!multiSelection && selectedVersion.isValid);
pop.show(e.getComponent(), e.getX(), e.getY());
}
}