use of org.olat.core.gui.components.stack.PopEvent in project OpenOLAT by OpenOLAT.
the class DocumentPoolMainController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (taxonomyTree == source) {
if (event instanceof TreeEvent) {
TreeEvent te = (TreeEvent) event;
if (MenuTree.COMMAND_TREENODE_CLICKED.equals(te.getCommand())) {
TaxonomyTreeNode node = (TaxonomyTreeNode) taxonomyTree.getTreeModel().getNodeById(te.getNodeId());
doSelect(ureq, node);
}
}
} else if (content == source) {
if (event instanceof PopEvent) {
PopEvent popEvent = (PopEvent) event;
if (popEvent.getController() instanceof DocumentPoolLevelController) {
DocumentPoolLevelController taxonomyLevelCtrl = (DocumentPoolLevelController) popEvent.getController();
TaxonomyLevel level = taxonomyLevelCtrl.getTaxonomyLevel();
TaxonomyTreeNode node = (TaxonomyTreeNode) TreeHelper.findNodeByUserObject(level, taxonomyTree.getTreeModel().getRootNode());
TaxonomyTreeNode parentNode = (TaxonomyTreeNode) node.getParent();
if (parentNode == null) {
doSelectTaxonomy(ureq);
taxonomyTree.setSelectedNode(taxonomyTree.getTreeModel().getRootNode());
} else {
doSelect(ureq, parentNode);
taxonomyTree.setSelectedNode(parentNode);
}
} else if (popEvent.getUserObject() instanceof TaxonomyTreeNode) {
TaxonomyTreeNode node = (TaxonomyTreeNode) popEvent.getUserObject();
doSelect(ureq, node);
taxonomyTree.setSelectedNode(node);
} else if (popEvent.getController() instanceof DocumentDirectoryController) {
// pop the templates
taxonomyTree.setSelectedNode(taxonomyTree.getTreeModel().getRootNode());
}
}
}
}
use of org.olat.core.gui.components.stack.PopEvent in project OpenOLAT by OpenOLAT.
the class AbstractTeacherOverviewController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == startButton) {
LectureBlock block = (LectureBlock) startButton.getUserObject();
doStartRollCall(ureq, block);
} else if (source == startWizardButton) {
LectureBlock block = (LectureBlock) startWizardButton.getUserObject();
doStartWizardRollCall(ureq, block);
} else if (source == stackPanel) {
if (event instanceof PopEvent) {
PopEvent popEvent = (PopEvent) event;
if (popEvent.getController() instanceof TeacherRollCallController && dirtyTables) {
loadModel(currentSearchParams);
}
}
} else if (source == allTeachersSwitch) {
Boolean val = (Boolean) allTeachersSwitch.getUserObject();
doToggleAllTeachersSwitch(ureq, val);
}
}
use of org.olat.core.gui.components.stack.PopEvent in project OpenOLAT by OpenOLAT.
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);
}
}
use of org.olat.core.gui.components.stack.PopEvent in project openolat by klemens.
the class AbstractTeacherOverviewController method event.
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == startButton) {
LectureBlock block = (LectureBlock) startButton.getUserObject();
doStartRollCall(ureq, block);
} else if (source == startWizardButton) {
LectureBlock block = (LectureBlock) startWizardButton.getUserObject();
doStartWizardRollCall(ureq, block);
} else if (source == stackPanel) {
if (event instanceof PopEvent) {
PopEvent popEvent = (PopEvent) event;
if (popEvent.getController() instanceof TeacherRollCallController && dirtyTables) {
loadModel(currentSearchParams);
}
}
} else if (source == allTeachersSwitch) {
Boolean val = (Boolean) allTeachersSwitch.getUserObject();
doToggleAllTeachersSwitch(ureq, val);
}
}
use of org.olat.core.gui.components.stack.PopEvent in project openolat by klemens.
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);
}
Aggregations