insertNodeController = new InsertNodeController(ureq, getWindowControl(), course, cnAlias);
listenTo(insertNodeController);
cmc = new CloseableModalController(getWindowControl(), translate("close"), insertNodeController.getInitialComponent(), true, translate(NLS_INSERTNODE_TITLE));
cmc.activate();
} else if (event.getCommand().equals(CMD_DELNODE)) {
TreeNode tn = menuTree.getSelectedNode();
if (tn == null) {
showError(NLS_DELETENODE_ERROR_SELECTFIRST);
return;
}
if (tn.getParent() == null) {
showError(NLS_DELETENODE_ERROR_ROOTNODE);
return;
}
// deletion is possible, start asking if really to delete.
tabbedNodeConfig.setVisible(false);
deleteDialogController = activateYesNoDialog(ureq, translate("deletenode.header", tn.getTitle()), translate("deletenode.confirm"), deleteDialogController);
} else if (event.getCommand().equals(CMD_MOVENODE) || event.getCommand().equals(CMD_COPYNODE)) {
TreeNode tn = menuTree.getSelectedNode();
if (tn == null) {
showError(NLS_MOVECOPYNODE_ERROR_SELECTFIRST);
return;
}
if (tn.getParent() == null) {
showError(NLS_MOVECOPYNODE_ERROR_ROOTNODE);
return;
}
CourseEditorTreeNode cetn = cetm.getCourseEditorNodeById(tn.getIdent());
moveCopyController = new MoveCopySubtreeController(ureq, getWindowControl(), course, cetn, event.getCommand().equals(CMD_COPYNODE));
this.listenTo(moveCopyController);
cmc = new CloseableModalController(getWindowControl(), translate("close"), moveCopyController.getInitialComponent(), true, translate(NLS_INSERTNODE_TITLE));
cmc.activate();
}