use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.
the class CorrectionAssessmentItemListController method doOpenTools.
private void doOpenTools(UserRequest ureq, CorrectionAssessmentItemRow row, FormLink link) {
removeAsListenerAndDispose(toolsCtrl);
removeAsListenerAndDispose(toolsCalloutCtrl);
toolsCtrl = new ToolsController(ureq, getWindowControl(), row);
listenTo(toolsCtrl);
toolsCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), toolsCtrl.getInitialComponent(), link.getFormDispatchId(), "", true, "");
listenTo(toolsCalloutCtrl);
toolsCalloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.
the class CorrectionIdentityInteractionsController method doOverrideScore.
private void doOverrideScore(UserRequest ureq) {
if (overrideScoreCtrl != null)
return;
overrideScoreCtrl = new OverrideScoreController(ureq, getWindowControl());
listenTo(overrideScoreCtrl);
overrideScoreCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), overrideScoreCtrl.getInitialComponent(), overrideScoreButton.getFormDispatchId(), "", true, "o_assessmentitem_scoring_override_window");
listenTo(overrideScoreCalloutCtrl);
overrideScoreCalloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.
the class FlexiTableElementImpl method customizeCallout.
protected void customizeCallout(UserRequest ureq) {
Choice choice = getColumnListAndTheirVisibility();
callout = new CloseableCalloutWindowController(ureq, wControl, choice, customButton, "Customize", true, "o_sel_flexi_custom_callout");
callout.activate();
callout.addControllerListener(this);
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.
the class GroupAssessmentController method doEditComment.
private void doEditComment(UserRequest ureq, AssessmentRow row) {
removeAsListenerAndDispose(commentCalloutCtrl);
OLATResource courseOres = courseEntry.getOlatResource();
editCommentCtrl = new EditCommentController(ureq, getWindowControl(), courseOres, gtaNode, row);
listenTo(editCommentCtrl);
commentCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), editCommentCtrl.getInitialComponent(), row.getCommentEditLink().getFormDispatchId(), "", true, "");
listenTo(commentCalloutCtrl);
commentCalloutCtrl.activate();
}
use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project openolat by klemens.
the class LDAPAdminController 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
protected void event(UserRequest ureq, Component source, Event event) {
if (source == syncStartLink) {
// Start sync job
// Disable start link during sync
syncStartLink.setEnabled(false);
LDAPEvent ldapEvent = new LDAPEvent(LDAPEvent.DO_SYNCHING);
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(ldapEvent, LDAPLoginManager.ldapSyncLockOres);
showInfo("admin.synchronize.started");
} else if (source == syncOneUserLink) {
userSearchCtrl = new UserSearchController(ureq, getWindowControl(), false);
listenTo(userSearchCtrl);
calloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), userSearchCtrl.getInitialComponent(), syncOneUserLink, null, true, null);
calloutCtr.addDisposableChildController(userSearchCtrl);
calloutCtr.activate();
listenTo(calloutCtr);
} else if (source == deletStartLink) {
// cancel if some one else is making sync or delete job
if (!ldapLoginManager.acquireSyncLock()) {
showError("delete.error.lock");
} else {
deletStartLink.setEnabled(false);
// check and get LDAP connection
LdapContext ctx = ldapLoginManager.bindSystem();
if (ctx == null) {
showError("delete.error.connection");
return;
}
// get deleted users
identitiesToDelete = ldapLoginManager.getIdentitysDeletedInLdap(ctx);
try {
ctx.close();
} catch (NamingException e) {
showError("delete.error.connection.close");
logError("Could not close LDAP connection on manual delete sync", e);
}
if (identitiesToDelete != null && identitiesToDelete.size() != 0) {
hasIdentitiesToDelete = true;
/*
* start step which spawns the whole wizard
*/
Step start = new DeletStep00(ureq, hasIdentitiesToDelete, identitiesToDelete);
/*
* wizard finish callback called after "finish" is called
*/
StepRunnerCallback finishCallback = new StepRunnerCallback() {
public Step execute(UserRequest uureq, WindowControl control, StepsRunContext runContext) {
hasIdentitiesToDeleteAfterRun = ((Boolean) runContext.get("hasIdentitiesToDelete")).booleanValue();
if (hasIdentitiesToDeleteAfterRun) {
@SuppressWarnings("unchecked") List<Identity> idToDelete = (List<Identity>) runContext.get("identitiesToDelete");
amountUsersToDelete = idToDelete.size();
// Delete all identities now and tell everybody that
// we are finished
ldapLoginManager.deletIdentities(idToDelete);
return StepsMainRunController.DONE_MODIFIED;
} else {
return StepsMainRunController.DONE_UNCHANGED;
}
// otherwise return without deleting anything
}
};
deleteStepController = new StepsMainRunController(ureq, getWindowControl(), start, finishCallback, null, translate("admin.deleteUser.title"), "o_sel_ldap_delete_user_wizard");
listenTo(deleteStepController);
getWindowControl().pushAsModalDialog(deleteStepController.getInitialComponent());
} else {
hasIdentitiesToDelete = false;
showInfo("delete.step.noUsers");
deletStartLink.setEnabled(true);
ldapLoginManager.freeSyncLock();
}
}
} else if (source == removeFallBackAuthsLink) {
removeFallBackAuthsLink.setEnabled(false);
ldapLoginManager.removeFallBackAuthentications();
showInfo("opsuccess");
}
}
Aggregations