Search in sources :

Example 1 with PopEvent

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

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 2 with PopEvent

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

the class CourseRuntimeController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (layoutLink == source) {
        doLayout(ureq);
    } else if (optionsLink == source) {
        doOptions(ureq);
    } else if (assessmentModeLink == source) {
        doAssessmentMode(ureq);
    } else if (certificatesOptionsLink == source) {
        doCertificatesOptions(ureq);
    } else if (lifeCycleChangeLink == source) {
        doLifeCycleChange(ureq);
    } else if (reminderLink == source) {
        doReminders(ureq);
    } else if (lecturesAdminLink == source) {
        doLecturesAdmin(ureq);
    } else if (lecturesLink == source) {
        doLectures(ureq);
    } else if (archiverLink == source) {
        doArchive(ureq);
    } else if (folderLink == source) {
        doCourseFolder(ureq);
    } else if (areaLink == source) {
        doCourseAreas(ureq);
    } else if (dbLink == source) {
        doDatabases(ureq);
    } else if (courseStatisticLink == source) {
        doCourseStatistics(ureq);
    } else if (testStatisticLink == source) {
        doAssessmentTestStatistics(ureq);
    } else if (surveyStatisticLink == source) {
        doAssessmentSurveyStatistics(ureq);
    } else if (assessmentLink == source) {
        doAssessmentTool(ureq);
    } else if (calendarLink == source) {
        launchCalendar(ureq);
    } else if (chatLink == source) {
        launchChat(ureq);
    } else if (searchLink == source) {
        launchCourseSearch(ureq);
    } else if (efficiencyStatementsLink == source) {
        doEfficiencyStatements(ureq);
    } else if (noteLink == source) {
        launchPersonalNotes(ureq);
    } else if (openGlossaryLink == source) {
        launchGlossary(ureq);
    } else if (leaveLink == source) {
        doConfirmLeave(ureq);
    } else if (source instanceof Link && "group".equals(((Link) source).getCommand())) {
        BusinessGroupRef ref = (BusinessGroupRef) ((Link) source).getUserObject();
        launchGroup(ureq, ref.getKey());
    } else if (source == toolbarPanel) {
        if (event instanceof VetoPopEvent) {
            delayedClose = Delayed.pop;
        } else if (event instanceof PopEvent) {
            processPopEvent(ureq, (PopEvent) event);
        }
    } else if (enableGlossaryLink == source) {
        toggleGlossary(ureq);
    }
    // Update window title
    if (source instanceof Link) {
        Link link = (Link) source;
        ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
        String newTitle = course.getCourseTitle() + " - " + link.getI18n();
        getWindowControl().getWindowBackOffice().getWindow().setTitle(getTranslator(), newTitle);
    }
    super.event(ureq, source, event);
}
Also used : BusinessGroupRef(org.olat.group.BusinessGroupRef) VetoPopEvent(org.olat.core.gui.components.stack.VetoPopEvent) PopEvent(org.olat.core.gui.components.stack.PopEvent) ICourse(org.olat.course.ICourse) VetoPopEvent(org.olat.core.gui.components.stack.VetoPopEvent) Link(org.olat.core.gui.components.link.Link)

Example 3 with PopEvent

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

the class AssessmentCourseTreeController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == menuTree) {
        if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
            TreeNode selectedTreeNode = menuTree.getSelectedNode();
            Object uo = selectedTreeNode.getUserObject();
            if (uo instanceof CourseNode) {
                processSelectCourseNodeWithMemory(ureq, selectedTreeNode, (CourseNode) uo);
            }
        }
    } else if (stackPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            if ("users".equals(pe.getUserObject())) {
                fixHistory(ureq, "Users", "users");
            } else if ("groups".equals(pe.getUserObject())) {
                if (selectedNodeChanged != null) {
                    CourseNode cn = (CourseNode) selectedNodeChanged.getUserObject();
                    menuTree.setSelectedNode(selectedNodeChanged);
                    processSelectCourseNodeWithMemory(ureq, selectedNodeChanged, cn);
                    selectedNodeChanged = null;
                } else {
                    fixHistory(ureq, "BusinessGroups", "groups");
                }
            }
        }
    }
}
Also used : TreeNode(org.olat.core.gui.components.tree.TreeNode) PopEvent(org.olat.core.gui.components.stack.PopEvent) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) CourseNode(org.olat.course.nodes.CourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode)

Example 4 with PopEvent

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

the class QuestionListController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == stackPanel) {
        if (itemCollectionDirty && event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            Controller mainCtrl = pe.getController();
            if (mainCtrl != null && mainCtrl.isControllerListeningTo(this)) {
                reloadData();
                updateStatusFilter();
                fireEvent(ureq, new QPoolEvent(QPoolEvent.ITEMS_RELOADED));
                itemCollectionDirty = false;
            }
        }
    } else {
        super.event(ureq, source, event);
    }
}
Also used : QPoolEvent(org.olat.modules.qpool.ui.events.QPoolEvent) PopEvent(org.olat.core.gui.components.stack.PopEvent) CreateEntryController(org.olat.repository.ui.author.CreateEntryController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) SelectBusinessGroupController(org.olat.group.ui.main.SelectBusinessGroupController) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController) DialogBoxController(org.olat.core.gui.control.generic.modal.DialogBoxController) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) StepsMainRunController(org.olat.core.gui.control.generic.wizard.StepsMainRunController) MetadataBulkChangeController(org.olat.modules.qpool.ui.metadata.MetadataBulkChangeController) Controller(org.olat.core.gui.control.Controller)

Example 5 with PopEvent

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

the class AssessmentCourseTreeController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (source == menuTree) {
        if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
            TreeNode selectedTreeNode = menuTree.getSelectedNode();
            Object uo = selectedTreeNode.getUserObject();
            if (uo instanceof CourseNode) {
                processSelectCourseNodeWithMemory(ureq, selectedTreeNode, (CourseNode) uo);
            }
        }
    } else if (stackPanel == source) {
        if (event instanceof PopEvent) {
            PopEvent pe = (PopEvent) event;
            if ("users".equals(pe.getUserObject())) {
                fixHistory(ureq, "Users", "users");
            } else if ("groups".equals(pe.getUserObject())) {
                if (selectedNodeChanged != null) {
                    CourseNode cn = (CourseNode) selectedNodeChanged.getUserObject();
                    menuTree.setSelectedNode(selectedNodeChanged);
                    processSelectCourseNodeWithMemory(ureq, selectedNodeChanged, cn);
                    selectedNodeChanged = null;
                } else {
                    fixHistory(ureq, "BusinessGroups", "groups");
                }
            }
        }
    }
}
Also used : TreeNode(org.olat.core.gui.components.tree.TreeNode) PopEvent(org.olat.core.gui.components.stack.PopEvent) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) CourseNode(org.olat.course.nodes.CourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode)

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