summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
diff options
context:
space:
mode:
authorJonathan Bauer2016-10-20 16:37:14 +0200
committerJonathan Bauer2016-10-20 16:37:14 +0200
commite9d679e212e9d0d33c640199ad304125ccf4efbf (patch)
tree97343d076ede3c5c9f69c19b3c6fba9d0a8c3edd /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
parent[client] return to login/sat select window on thrift errors (diff)
downloadtutor-module-e9d679e212e9d0d33c640199ad304125ccf4efbf.tar.gz
tutor-module-e9d679e212e9d0d33c640199ad304125ccf4efbf.tar.xz
tutor-module-e9d679e212e9d0d33c640199ad304125ccf4efbf.zip
[client] only allow double clicks on lectures if the user can list images and disable for edit button in that case
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
index 01fb26a3..7c98900b 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LectureListWindow.java
@@ -260,6 +260,10 @@ public class LectureListWindow extends LectureListWindowLayout {
@Override
public void mouseClicked(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) {
+ if (!Session.canListImages()) {
+ Gui.showMessageBox("Ihnen fehlen die benötigten Berechtigungen.", MessageType.ERROR, LOGGER, null);
+ return;
+ }
openLectureDetails(tblLectures.getSelectedItem());
}
processClick(e);
@@ -354,7 +358,7 @@ public class LectureListWindow extends LectureListWindowLayout {
private void updateAvailableOptions(LectureSummary lecture) {
boolean admin = LecturePerms.canAdmin(lecture);
boolean singleSelection = !(tblLectures.getSelectedRows().length > 1);
-
+ btnEditLecture.setEnabled(Session.canListImages() && singleSelection);
btnDeleteLecture.setEnabled(admin || !singleSelection);
popupItemDelete.setEnabled(admin || !singleSelection);
popupItemLinked.setEnabled(Session.canListImages() && singleSelection);