use of org.olat.modules.portfolio.ui.event.NewBinderEvent in project OpenOLAT by OpenOLAT.
the class BinderListController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (newBinderCtrl == source) {
if (event == Event.DONE_EVENT) {
loadModel();
doOpenBinder(ureq, newBinderCtrl.getBinder()).activate(ureq, null, null);
}
cmc.deactivate();
cleanUp();
} else if (chooseNewBinderTypeCtrl == source) {
newBinderCalloutCtrl.deactivate();
cleanUp();
if (event instanceof NewBinderEvent) {
String cmd = event.getCommand();
if (NewBinderEvent.NEW_EMPTY.equals(cmd)) {
doNewBinder(ureq);
} else if (NewBinderEvent.NEW_EMPTY_FROM_TEMPLATE.equals(cmd)) {
doNewBinderFromTemplate(ureq);
} else if (NewBinderEvent.NEW_EMPTY_FROM_COURSE.equals(cmd)) {
doNewBinderFromCourse(ureq);
}
}
} else if (searchTemplateCtrl == source) {
if (RepositoryTableModel.TABLE_ACTION_SELECT_LINK.equals(event.getCommand())) {
RepositoryEntry repoEntry = searchTemplateCtrl.getSelectedEntry();
doCreateBinderFromTemplate(ureq, repoEntry);
}
cmc.deactivate();
cleanUp();
} else if (searchCourseTemplateCtrl == source) {
if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
CourseTemplateRow templateRow = searchCourseTemplateCtrl.getSelectedEntry();
doCreateBinderFromCourseTemplate(ureq, templateRow);
}
cmc.deactivate();
cleanUp();
} else if (newBinderCalloutCtrl == source) {
cleanUp();
} else if (binderCtrl == source) {
if (event instanceof DeleteBinderEvent) {
stackPanel.popUpToController(this);
loadModel();
}
} else if (cmc == source) {
cleanUp();
}
super.event(ureq, source, event);
}
use of org.olat.modules.portfolio.ui.event.NewBinderEvent in project openolat by klemens.
the class BinderListController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (newBinderCtrl == source) {
if (event == Event.DONE_EVENT) {
loadModel();
doOpenBinder(ureq, newBinderCtrl.getBinder()).activate(ureq, null, null);
}
cmc.deactivate();
cleanUp();
} else if (chooseNewBinderTypeCtrl == source) {
newBinderCalloutCtrl.deactivate();
cleanUp();
if (event instanceof NewBinderEvent) {
String cmd = event.getCommand();
if (NewBinderEvent.NEW_EMPTY.equals(cmd)) {
doNewBinder(ureq);
} else if (NewBinderEvent.NEW_EMPTY_FROM_TEMPLATE.equals(cmd)) {
doNewBinderFromTemplate(ureq);
} else if (NewBinderEvent.NEW_EMPTY_FROM_COURSE.equals(cmd)) {
doNewBinderFromCourse(ureq);
}
}
} else if (searchTemplateCtrl == source) {
if (RepositoryTableModel.TABLE_ACTION_SELECT_LINK.equals(event.getCommand())) {
RepositoryEntry repoEntry = searchTemplateCtrl.getSelectedEntry();
doCreateBinderFromTemplate(ureq, repoEntry);
}
cmc.deactivate();
cleanUp();
} else if (searchCourseTemplateCtrl == source) {
if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
CourseTemplateRow templateRow = searchCourseTemplateCtrl.getSelectedEntry();
doCreateBinderFromCourseTemplate(ureq, templateRow);
}
cmc.deactivate();
cleanUp();
} else if (newBinderCalloutCtrl == source) {
cleanUp();
} else if (binderCtrl == source) {
if (event instanceof DeleteBinderEvent) {
stackPanel.popUpToController(this);
loadModel();
}
} else if (cmc == source) {
cleanUp();
}
super.event(ureq, source, event);
}
Aggregations