Search in sources :

Example 66 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.

the class TaxonomyLevelTypesEditController method doOpenTools.

private void doOpenTools(UserRequest ureq, TaxonomyLevelTypeRow row, FormLink link) {
    removeAsListenerAndDispose(toolsCtrl);
    removeAsListenerAndDispose(toolsCalloutCtrl);
    TaxonomyLevelType type = taxonomyService.getTaxonomyLevelType(row);
    if (type == null) {
        tableEl.reloadData();
        showWarning("warning.taxonomy.level.type.deleted");
    } else {
        toolsCtrl = new ToolsController(ureq, getWindowControl(), row, type);
        listenTo(toolsCtrl);
        toolsCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), toolsCtrl.getInitialComponent(), link.getFormDispatchId(), "", true, "");
        listenTo(toolsCalloutCtrl);
        toolsCalloutCtrl.activate();
    }
}
Also used : TaxonomyLevelType(org.olat.modules.taxonomy.TaxonomyLevelType) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 67 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.

the class TaxonomyLevelOverviewController method doOpenActions.

private void doOpenActions(UserRequest ureq) {
    actionsCtrl = new ActionsController(ureq, getWindowControl());
    listenTo(actionsCtrl);
    actionsCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), actionsCtrl.getInitialComponent(), actionButton.getDispatchID(), "", true, "");
    listenTo(actionsCalloutCtrl);
    actionsCalloutCtrl.activate();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 68 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.

the class EPAddArtefactController method initAddLinkPopup.

private void initAddLinkPopup(UserRequest ureq) {
    if (addPage == null)
        initAddPageVC();
    String title = translate("add.artefact");
    removeAsListenerAndDispose(calloutCtr);
    calloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), addPage, addBtn, title, true, null);
    listenTo(calloutCtr);
    calloutCtr.activate();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Example 69 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.

the class UsrPropCfgTableController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    UserPropertyHandler handler = (UserPropertyHandler) source.getUserObject();
    if (source instanceof FormToggle) {
        FormToggle toggle = (FormToggle) source;
        if (toggle.isOn()) {
            usrPropCfgMng.getUserPropertiesConfigObject().setHandlerAsActive(handler, true);
            usrPropCfgMng.saveUserPropertiesConfig();
        } else {
            deactPropertyYesNoCtrl = activateYesNoDialog(ureq, translate("upc.deact_confirmationtitle"), translate("upc.deact_confirmationtext"), deactPropertyYesNoCtrl);
            deactPropertyYesNoCtrl.setUserObject(handler);
        }
    } else if (source instanceof SingleSelection) {
        SingleSelection groupSel = (SingleSelection) source;
        handler.setGroup(groupSel.getSelectedKey());
        usrPropCfgMng.saveUserPropertiesConfig();
    } else if (source instanceof FormLink) {
        String itemname = source.getName();
        if (itemname.startsWith(FT_NAME_PREFIX_TRANSL)) {
            // open the singlekeyTranslator-controller callout
            String key2Translate1 = handler.i18nFormElementLabelKey();
            String key2Translate2 = handler.i18nColumnDescriptorLabelKey();
            String[] keys2Translate = { key2Translate1, key2Translate2 };
            singleKeyTrnsCtrl = new SingleKeyTranslatorController(ureq, getWindowControl(), keys2Translate, UserPropertyHandler.class);
            listenTo(singleKeyTrnsCtrl);
            removeAsListenerAndDispose(translatorCallout);
            translatorCallout = new CloseableCalloutWindowController(ureq, getWindowControl(), singleKeyTrnsCtrl.getInitialComponent(), (FormLink) source, "Translate:: " + key2Translate1, false, null);
            listenTo(translatorCallout);
            translatorCallout.activate();
        } else if (itemname.startsWith(FT_NAME_PREFIX_HDNL)) {
            handlerConfigCtrl = handlerConfigCtrlFactory.getConfigController(ureq, getWindowControl(), handler);
            listenTo(handlerConfigCtrl);
            if (handlerConfigCtrl.getInitialComponent() != null) {
                handlerPopupCtr = new CloseableModalController(getWindowControl(), "Save", handlerConfigCtrl.getInitialComponent(), true, translate("upc.handlerconfigtitle"), false);
                handlerPopupCtr.activate();
            }
        }
    }
}
Also used : SingleKeyTranslatorController(org.olat.core.util.i18n.ui.SingleKeyTranslatorController) SingleSelection(org.olat.core.gui.components.form.flexible.elements.SingleSelection) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) FormToggle(org.olat.core.gui.components.form.flexible.elements.FormToggle) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler)

Example 70 with CloseableCalloutWindowController

use of org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController in project OpenOLAT by OpenOLAT.

the class EPMultipleArtefactPreviewController method popupArtAttribBox.

/**
 * @param ureq
 */
private void popupArtAttribBox(UserRequest ureq) {
    String title = translate("display.option.title");
    if (artAttribCtlr == null) {
        artAttribCtlr = new EPArtefactAttributeSettingController(ureq, getWindowControl(), getArtefactAttributeDisplayConfig(ureq.getIdentity()));
        listenTo(artAttribCtlr);
    }
    removeAsListenerAndDispose(artAttribCalloutCtr);
    artAttribCalloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), artAttribCtlr.getInitialComponent(), artAttribBtn, title, true, null);
    listenTo(artAttribCalloutCtr);
    artAttribCalloutCtr.activate();
}
Also used : CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)

Aggregations

CloseableCalloutWindowController (org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)122 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)12 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)8 ArrayList (java.util.ArrayList)6 List (java.util.List)6 Component (org.olat.core.gui.components.Component)6 Link (org.olat.core.gui.components.link.Link)6 Identity (org.olat.core.id.Identity)6 RepositoryEntry (org.olat.repository.RepositoryEntry)6 RepositoryEntrySmallDetailsController (org.olat.repository.ui.author.RepositoryEntrySmallDetailsController)6 UserSearchController (org.olat.admin.user.UserSearchController)4 CalloutSettings (org.olat.core.gui.control.generic.closablewrapper.CalloutSettings)4 NamingException (javax.naming.NamingException)2 LdapContext (javax.naming.ldap.LdapContext)2 KalendarRenderWrapper (org.olat.commons.calendar.ui.components.KalendarRenderWrapper)2 UserRequest (org.olat.core.gui.UserRequest)2 Choice (org.olat.core.gui.components.choice.Choice)2 FormToggle (org.olat.core.gui.components.form.flexible.elements.FormToggle)2 SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)2 JSAndCSSComponent (org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent)2