use of org.olat.portfolio.ui.structel.EPMapCreatedEvent in project OpenOLAT by OpenOLAT.
the class EPMapRunController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
super.event(ureq, source, event);
if (source == createMapBox) {
popDownCreateMapBox();
} else if (source == createMapCtrl) {
if (event instanceof EPMapCreatedEvent) {
PortfolioStructureMap newMap = ((EPMapCreatedEvent) event).getPortfolioStructureMap();
multiMapCtrl.activateMap(ureq, newMap);
}
createMapBox.deactivate();
popDownCreateMapBox();
toogleHeader(false);
} else if (source == searchTemplateCtrl) {
if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
RepositoryEntry repoEntry = searchTemplateCtrl.getSelectedEntry();
PortfolioStructureMap newMap = createMapFromTemplate(repoEntry);
multiMapCtrl.activateMap(ureq, newMap);
}
createMapBox.deactivate();
popDownCreateMapBox();
} else if (source == multiMapCtrl) {
if (event instanceof EPMapEvent) {
String cmd = event.getCommand();
if (EPStructureEvent.SELECT.equals(cmd)) {
toogleHeader(false);
} else if (EPStructureEvent.CLOSE.equals(cmd)) {
toogleHeader(true);
}
}
} else if (source == mapCreateCalloutCtrl && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
removeAsListenerAndDispose(mapCreateCalloutCtrl);
mapCreateCalloutCtrl = null;
}
}
use of org.olat.portfolio.ui.structel.EPMapCreatedEvent in project openolat by klemens.
the class EPMapRunController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
super.event(ureq, source, event);
if (source == createMapBox) {
popDownCreateMapBox();
} else if (source == createMapCtrl) {
if (event instanceof EPMapCreatedEvent) {
PortfolioStructureMap newMap = ((EPMapCreatedEvent) event).getPortfolioStructureMap();
multiMapCtrl.activateMap(ureq, newMap);
}
createMapBox.deactivate();
popDownCreateMapBox();
toogleHeader(false);
} else if (source == searchTemplateCtrl) {
if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
RepositoryEntry repoEntry = searchTemplateCtrl.getSelectedEntry();
PortfolioStructureMap newMap = createMapFromTemplate(repoEntry);
multiMapCtrl.activateMap(ureq, newMap);
}
createMapBox.deactivate();
popDownCreateMapBox();
} else if (source == multiMapCtrl) {
if (event instanceof EPMapEvent) {
String cmd = event.getCommand();
if (EPStructureEvent.SELECT.equals(cmd)) {
toogleHeader(false);
} else if (EPStructureEvent.CLOSE.equals(cmd)) {
toogleHeader(true);
}
}
} else if (source == mapCreateCalloutCtrl && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
removeAsListenerAndDispose(mapCreateCalloutCtrl);
mapCreateCalloutCtrl = null;
}
}
Aggregations