Search in sources :

Example 1 with EPMapCreatedEvent

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;
    }
}
Also used : PortfolioStructureMap(org.olat.portfolio.model.structel.PortfolioStructureMap) RepositoryEntry(org.olat.repository.RepositoryEntry) EPMapEvent(org.olat.portfolio.ui.structel.EPMapEvent) EPMapCreatedEvent(org.olat.portfolio.ui.structel.EPMapCreatedEvent)

Example 2 with EPMapCreatedEvent

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;
    }
}
Also used : PortfolioStructureMap(org.olat.portfolio.model.structel.PortfolioStructureMap) RepositoryEntry(org.olat.repository.RepositoryEntry) EPMapEvent(org.olat.portfolio.ui.structel.EPMapEvent) EPMapCreatedEvent(org.olat.portfolio.ui.structel.EPMapCreatedEvent)

Aggregations

PortfolioStructureMap (org.olat.portfolio.model.structel.PortfolioStructureMap)2 EPMapCreatedEvent (org.olat.portfolio.ui.structel.EPMapCreatedEvent)2 EPMapEvent (org.olat.portfolio.ui.structel.EPMapEvent)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2