Search in sources :

Example 6 with PopEvent

use of org.olat.core.gui.components.stack.PopEvent in project openolat by klemens.

the class LecturesToolController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (event instanceof SegmentViewEvent) {
        SegmentViewEvent sve = (SegmentViewEvent) event;
        String segmentCName = sve.getComponentName();
        Component clickedLink = mainVC.getComponent(segmentCName);
        if (clickedLink == teacherLink) {
            doOpenTeacherView(ureq);
        } else if (clickedLink == participantLink) {
            doOpenParticipantView(ureq);
        }
    } else if (stackPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent popEvent = (PopEvent) event;
            if (popEvent.getController() instanceof TeacherRollCallController) {
                addToHistory(ureq, teacherOverviewCtrl);
            } else if (popEvent.getController() instanceof ParticipantLectureBlocksController) {
                addToHistory(ureq, participantOverviewCtrl);
            }
        }
    }
}
Also used : SegmentViewEvent(org.olat.core.gui.components.segmentedview.SegmentViewEvent) PopEvent(org.olat.core.gui.components.stack.PopEvent) Component(org.olat.core.gui.components.Component) SegmentViewComponent(org.olat.core.gui.components.segmentedview.SegmentViewComponent)

Example 7 with PopEvent

use of org.olat.core.gui.components.stack.PopEvent in project openolat by klemens.

the class BusinessGroupMainRunController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    // events from menutree
    if (source == bgTree) {
        // administration
        if (!groupRunDisabled && event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
            TreeNode selTreeNode = bgTree.getSelectedNode();
            String cmd = (String) selTreeNode.getUserObject();
            handleTreeActions(ureq, cmd);
        } else if (groupRunDisabled) {
            handleTreeActions(ureq, ACTIVITY_MENUSELECT_OVERVIEW);
            showError("grouprun.disabled");
        }
    } else if (source == toolbarPanel) {
        if (event == Event.CLOSE_EVENT) {
            doClose(ureq);
        } else if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            Controller popedCtrl = pe.getController();
            if (popedCtrl == collabToolCtr) {
                handleTreeActions(ureq, ACTIVITY_MENUSELECT_OVERVIEW);
                bgTree.setSelectedNode(bgTree.getTreeModel().getRootNode());
            }
        }
    }
}
Also used : GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) PopEvent(org.olat.core.gui.components.stack.PopEvent) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ContactFormController(org.olat.modules.co.ContactFormController) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) BusinessGroupEditController(org.olat.group.ui.edit.BusinessGroupEditController) AccessListController(org.olat.resource.accesscontrol.ui.AccessListController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) TableController(org.olat.core.gui.components.table.TableController)

Example 8 with PopEvent

use of org.olat.core.gui.components.stack.PopEvent in project openolat by klemens.

the class EvaluationFormRuntimeController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (toolbarPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            Controller popedCtrl = pe.getController();
            if (popedCtrl instanceof EvaluationFormEditorController) {
                EvaluationFormEditorController formEditorCtrl = (EvaluationFormEditorController) popedCtrl;
                if (formEditorCtrl.hasChanges()) {
                    doReloadRuntimeController(ureq);
                }
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : PopEvent(org.olat.core.gui.components.stack.PopEvent) RepositoryEntryRuntimeController(org.olat.repository.ui.RepositoryEntryRuntimeController) Controller(org.olat.core.gui.control.Controller)

Example 9 with PopEvent

use of org.olat.core.gui.components.stack.PopEvent in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    // events from menutree
    if (source == bgTree) {
        // administration
        if (!groupRunDisabled && event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
            TreeNode selTreeNode = bgTree.getSelectedNode();
            String cmd = (String) selTreeNode.getUserObject();
            handleTreeActions(ureq, cmd);
        } else if (groupRunDisabled) {
            handleTreeActions(ureq, ACTIVITY_MENUSELECT_OVERVIEW);
            showError("grouprun.disabled");
        }
    } else if (source == toolbarPanel) {
        if (event == Event.CLOSE_EVENT) {
            doClose(ureq);
        } else if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            Controller popedCtrl = pe.getController();
            if (popedCtrl == collabToolCtr) {
                handleTreeActions(ureq, ACTIVITY_MENUSELECT_OVERVIEW);
                bgTree.setSelectedNode(bgTree.getTreeModel().getRootNode());
            }
        }
    }
}
Also used : GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) PopEvent(org.olat.core.gui.components.stack.PopEvent) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ContactFormController(org.olat.modules.co.ContactFormController) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) BusinessGroupEditController(org.olat.group.ui.edit.BusinessGroupEditController) AccessListController(org.olat.resource.accesscontrol.ui.AccessListController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) TableController(org.olat.core.gui.components.table.TableController)

Example 10 with PopEvent

use of org.olat.core.gui.components.stack.PopEvent in project OpenOLAT by OpenOLAT.

the class EvaluationFormRuntimeController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (toolbarPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            Controller popedCtrl = pe.getController();
            if (popedCtrl instanceof EvaluationFormEditorController) {
                EvaluationFormEditorController formEditorCtrl = (EvaluationFormEditorController) popedCtrl;
                if (formEditorCtrl.hasChanges()) {
                    doReloadRuntimeController(ureq);
                }
            }
        }
    }
    super.event(ureq, source, event);
}
Also used : PopEvent(org.olat.core.gui.components.stack.PopEvent) RepositoryEntryRuntimeController(org.olat.repository.ui.RepositoryEntryRuntimeController) Controller(org.olat.core.gui.control.Controller)

Aggregations

PopEvent (org.olat.core.gui.components.stack.PopEvent)16 Controller (org.olat.core.gui.control.Controller)6 TreeNode (org.olat.core.gui.components.tree.TreeNode)4 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 Component (org.olat.core.gui.components.Component)2 Link (org.olat.core.gui.components.link.Link)2 SegmentViewComponent (org.olat.core.gui.components.segmentedview.SegmentViewComponent)2 SegmentViewEvent (org.olat.core.gui.components.segmentedview.SegmentViewEvent)2 VetoPopEvent (org.olat.core.gui.components.stack.VetoPopEvent)2 TableController (org.olat.core.gui.components.table.TableController)2 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)2 TreeEvent (org.olat.core.gui.components.tree.TreeEvent)2 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)2 CloseableCalloutWindowController (org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 DialogBoxController (org.olat.core.gui.control.generic.modal.DialogBoxController)2 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)2 ICourse (org.olat.course.ICourse)2 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)2 CourseNode (org.olat.course.nodes.CourseNode)2