From 3a7304b69366eb8eabdeee6b8fce2784d845fc1f Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 31 Aug 2015 15:28:26 +0200 Subject: [client] ask user confirmation before deleting a lecture in LectureListWindow --- .../main/java/org/openslx/dozmod/thrift/ThriftActions.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dozentenmodul/src/main/java/org/openslx') diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java index 6f48c706..36dce613 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java @@ -940,14 +940,27 @@ public class ThriftActions { * Methods to delete lectures * ********************************************************************************/ + /** + * Callback interface reporting the status of the deletion back to the gui + */ public interface DeleteLectureCallback { void deleted(boolean success); } + /** + * NON-BLOCKING + * Deletes the lecture with the given lectureId + * + * @param frame + * @param lectureId + * @param callback + */ public static void deleteLecture(final Frame frame, final String lectureId, final DeleteLectureCallback callback) { if (lectureId == null) return; + if (!userConfirmed(frame, "Wollen Sie diese Veranstaltung wirklick löschen?")) + return; QuickTimer.scheduleOnce(new Task() { boolean success = false; -- cgit v1.2.3-55-g7522