use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class ViteroBookingsEditController method openGroup.
protected void openGroup(UserRequest ureq, ViteroBooking booking) {
try {
if (viteroManager.isUserOf(booking, getIdentity())) {
String url = viteroManager.getURLToGroup(ureq.getIdentity(), booking);
if (url == null) {
showError("error.sessionCodeNull");
} else {
viteroGroupVC = createVelocityContainer("opengroup");
viteroGroupVC.contextPut("groupUrl", url);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), viteroGroupVC);
listenTo(cmc);
cmc.activate();
}
} else {
String title = translate("booking.group");
String text = translate("booking.group.warning");
List<String> buttonLabels = Collections.singletonList(translate("ok"));
warningGroupCtr = activateGenericDialog(ureq, title, text, buttonLabels, warningGroupCtr);
}
} catch (VmsNotAvailableException e) {
showError(VmsNotAvailableException.I18N_KEY);
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class ViteroBookingsController method openGroup.
protected void openGroup(UserRequest ureq, ViteroBooking booking) {
try {
String url = viteroManager.getURLToGroup(ureq.getIdentity(), booking);
viteroGroupVC = createVelocityContainer("opengroup");
viteroGroupVC.contextPut("groupUrl", url);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), viteroGroupVC);
listenTo(cmc);
cmc.activate();
} catch (VmsNotAvailableException e) {
showError(VmsNotAvailableException.I18N_KEY);
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class OrdersController method doSelectOrder.
private void doSelectOrder(UserRequest ureq, OrderTableItem order) {
removeAsListenerAndDispose(detailController);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(Order.class, order.getOrderKey());
WindowControl bwControl = addToHistory(ureq, ores, null);
detailController = new OrderDetailController(ureq, bwControl, order.getOrderKey());
detailController.hideBackLink();
listenTo(detailController);
if (stackPanel != null) {
stackPanel.pushController(order.getOrderNr(), detailController);
} else {
cmc = new CloseableModalController(getWindowControl(), translate("close"), detailController.getInitialComponent(), true, translate("order.booking"));
cmc.activate();
listenTo(cmc);
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class BCCourseNodeEditForm method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (folderTargetChoose.isSelected(0)) {
sharedFolderWarning.setVisible(false);
} else {
if (isSharedfolderNotPresent()) {
sharedFolderWarning.setVisible(true);
} else {
sharedFolderWarning.setVisible(false);
}
if (node.isSharedFolder()) {
sharedFolderInfo.setVisible(course.getCourseConfig().isSharedFolderReadOnlyMount());
} else {
sharedFolderInfo.setVisible(false);
}
}
if (source == folderTargetChoose) {
subPath.setVisible(folderTargetChoose.isSelected(1));
chooseFolder.setVisible(folderTargetChoose.isSelected(1));
createFolder.setVisible(folderTargetChoose.isSelected(1));
if (folderTargetChoose.isSelected(1)) {
node.getModuleConfiguration().setBooleanEntry(BCCourseNodeEditController.CONFIG_AUTO_FOLDER, false);
String path = node.getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH);
if (StringHelper.containsNonWhitespace(path)) {
subPath.setValue(path);
} else {
subPath.setValue(translate("subPathLab.dummy"));
}
} else {
node.getModuleConfiguration().setBooleanEntry(BCCourseNodeEditController.CONFIG_AUTO_FOLDER, true);
node.getModuleConfiguration().setStringValue(BCCourseNodeEditController.CONFIG_SUBPATH, "");
}
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
createFolder.setVisible(folderTargetChoose.isSelected(1));
} else if (source == createFolder) {
createFolderForm = new BCCourseNodeEditCreateFolderForm(ureq, getWindowControl(), course, node);
listenTo(createFolderForm);
String title = translate("chooseFolder");
cmc = new CloseableModalController(getWindowControl(), translate("close"), createFolderForm.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
} else if (source == chooseFolder) {
VFSContainer namedContainer = course.getCourseFolderContainer();
chooseForm = new BCCourseNodeEditChooseFolderForm(ureq, getWindowControl(), namedContainer);
listenTo(chooseForm);
String title = translate("createFolder");
cmc = new CloseableModalController(getWindowControl(), translate("close"), chooseForm.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class CPDisplayController method selectPagesToPrint.
private void selectPagesToPrint(UserRequest ureq) {
removeAsListenerAndDispose(printController);
removeAsListenerAndDispose(printPopup);
printController = new CPSelectPrintPagesController(ureq, getWindowControl(), ctm);
listenTo(printController);
printPopup = new CloseableModalController(getWindowControl(), "cancel", printController.getInitialComponent(), true, translate("print.node.list.title"));
listenTo(printPopup);
printPopup.activate();
}
Aggregations