use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class GTASampleSolutionsEditController method doCreateSolution.
private void doCreateSolution(UserRequest ureq) {
newSolutionCtrl = new NewSolutionController(ureq, getWindowControl(), solutionContainer);
listenTo(newSolutionCtrl);
cmc = new CloseableModalController(getWindowControl(), "close", newSolutionCtrl.getInitialComponent());
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class GTASampleSolutionsEditController method doAddSolution.
private void doAddSolution(UserRequest ureq) {
addSolutionCtrl = new EditSolutionController(ureq, getWindowControl(), solutionDir, solutionContainer);
listenTo(addSolutionCtrl);
String title = translate("add.solution");
cmc = new CloseableModalController(getWindowControl(), null, addSolutionCtrl.getInitialComponent(), true, title, false);
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class MembersSelectorFormFragment method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == chooseGroupCoachesLink) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(groupChooseCoaches);
groupChooseCoaches = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupCoachSelectionList));
listenTo(groupChooseCoaches);
String title = chooseGroupCoachesLink.getLinkTitleText();
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseCoaches.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseGroupParticipantsLink) {
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(groupChooseParticipants);
groupChooseParticipants = new GroupSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyGroupParticipantsSelectionList));
listenTo(groupChooseParticipants);
String title = chooseGroupParticipantsLink.getLabelText();
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseParticipants.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseAreasCoachesLink) {
// already areas -> choose areas
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaChooseCoaches);
areaChooseCoaches = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaCoachSelectionList));
listenTo(areaChooseCoaches);
String title = chooseAreasCoachesLink.getLinkTitleText();
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseCoaches.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
} else if (source == chooseAreasParticipantsLink) {
// already areas -> choose areas
removeAsListenerAndDispose(cmc);
removeAsListenerAndDispose(areaChooseParticipants);
areaChooseParticipants = new AreaSelectionController(ureq, getWindowControl(), true, cev.getCourseGroupManager(), getKeys(easyAreaParticipantsSelectionList));
listenTo(areaChooseParticipants);
String title = chooseAreasParticipantsLink.getLabelText();
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseParticipants.getInitialComponent(), true, title);
listenTo(cmc);
cmc.activate();
setFormCanSubmit(false);
}
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class UnkownItemEditorController method doConfirmConversion.
private void doConfirmConversion(UserRequest ureq) {
Report report = new AlienItemAnalyzer(item).analyze();
confirmationCtrl = new UnkownItemConversionConfirmationController(ureq, getWindowControl(), report);
listenTo(confirmationCtrl);
cmc = new CloseableModalController(getWindowControl(), translate("close"), confirmationCtrl.getInitialComponent(), true, translate("convert.alien"));
listenTo(cmc);
cmc.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableModalController in project OpenOLAT by OpenOLAT.
the class ScormResultDetailsController method event.
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if (source == summaryTableCtr) {
TableEvent tEvent = (TableEvent) event;
if (tEvent.getActionId().equals("sel")) {
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setPreferencesOffered(true, "scormAssessmentDetails");
removeAsListenerAndDispose(cmiTableCtr);
cmiTableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator());
listenTo(cmiTableCtr);
cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.itemId", 0, null, ureq.getLocale()));
cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.translatedKey", 1, null, ureq.getLocale()));
cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.key", 2, null, ureq.getLocale()));
cmiTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("cmis.column.header.value", 3, null, ureq.getLocale()));
// <BPS-252> BPS-252_3
int rowId = tEvent.getRowId();
List<CmiData> data = ((SummaryTableDataModelMultiResults) summaryTableCtr.getTableDataModel()).getObject(rowId);
cmiTableCtr.setTableDataModel(new CmiTableDataModel(getTranslator(), data));
// </BPS-252> BPS-252_3
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), cmiTableCtr.getInitialComponent());
listenTo(cmc);
cmc.activate();
}
} else if (source == resetConfirmationBox) {
if (DialogBoxUIFactory.isOkEvent(event)) {
// delete scorm
String username = assessedUserCourseEnv.getIdentityEnvironment().getIdentity().getName();
CourseEnvironment courseEnv = assessedUserCourseEnv.getCourseEnvironment();
ScormAssessmentManager.getInstance().deleteResults(username, courseEnv, node);
fireEvent(ureq, Event.DONE_EVENT);
}
}
}
Aggregations