Search in sources :

Example 1 with FloatingResizableDialogController

use of org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController in project OpenOLAT by OpenOLAT.

the class InstantMessagingMainController method doOpenRoster.

private void doOpenRoster(UserRequest ureq) {
    removeAsListenerAndDispose(rosterCtr);
    removeAsListenerAndDispose(rosterPanelCtr);
    rosterCtr = new IMBuddyListController(ureq, getWindowControl());
    listenTo(rosterCtr);
    rosterPanelCtr = new FloatingResizableDialogController(ureq, getWindowControl(), rosterCtr.getInitialComponent(), translate("im.buddies"), 300, 500, onlineOfflineCount.getOffsetX() - 80, onlineOfflineCount.getOffsetY() + 25, null, null, true, true, true, "im_roster");
    listenTo(rosterPanelCtr);
    rosterPanel.setContent(rosterPanelCtr.getInitialComponent());
    onlineOfflineCount.setDirty(false);
}
Also used : FloatingResizableDialogController(org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController)

Example 2 with FloatingResizableDialogController

use of org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController in project openolat by klemens.

the class DevelopmentController 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)
 */
public void event(UserRequest ureq, Component source, Event event) {
    if (source == devToolLink) {
        removeAsListenerAndDispose(floatCtr);
        floatCtr = new FloatingResizableDialogController(ureq, getWindowControl(), myContent, "Brasato Development Tool", 1000, 200, 10, 60, true, true);
        listenTo(floatCtr);
        mainpanel.setContent(floatCtr.getInitialComponent());
    } else if (source == web10Link) {
        // choose regular mode
        winMgrImpl.setShowDebugInfo(false);
        winMgrImpl.setAjaxEnabled(false);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = web10Link;
        updateUI();
    } else if (source == web20Link) {
        // enable ajax / generic-dom-replacement GDR mode
        winMgrImpl.setShowDebugInfo(false);
        winMgrImpl.setAjaxEnabled(true);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = web20Link;
        updateUI();
    } else if (source == debugLink) {
        // debug mode requires web 1.0 mode at the moment
        winMgrImpl.setShowDebugInfo(true);
        winMgrImpl.setAjaxEnabled(false);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = debugLink;
        updateUI();
    } else if (source == showComponentTree) {
        if (treeShown) {
            // hide component tree
            myContent.contextPut("compdump", "");
            winMgrImpl.setIdDivsForced(false);
        } else {
            winMgrImpl.setIdDivsForced(true);
            updateComponentTree();
        }
        treeShown = !treeShown;
    } else if (source == toggleAutorefresh) {
        autorefresh = !autorefresh;
        if (autorefresh) {
            myContent.contextPut("autorefresh", "true");
        } else {
            myContent.contextPut("autorefresh", "false");
        }
    } else if (event == ComponentUtil.VALIDATE_EVENT) {
        // todo update mode
        if (treeShown) {
            updateComponentTree();
        }
    }
}
Also used : FloatingResizableDialogController(org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController)

Example 3 with FloatingResizableDialogController

use of org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController in project openolat by klemens.

the class GuiDemoFloatingPanelController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == open) {
        UserSearchController userSearch = new UserSearchController(ureq, getWindowControl(), true);
        dialog = new FloatingResizableDialogController(ureq, getWindowControl(), userSearch.getInitialComponent(), "Your title", 350, 350, 400, 200, null, "", true, false);
        dialog.addControllerListener(this);
        panelVc.put("panel", dialog.getInitialComponent());
        panel.setContent(panelVc);
    } else if (source == open2) {
        dialog = new FloatingResizableDialogController(ureq, getWindowControl(), localContent, "Your title", 350, 350, 400, 200, createVelocityContainer("localContent2"), "", true, false);
        dialog.addControllerListener(this);
        panelVc.put("panel", dialog.getInitialComponent());
        contentLink = LinkFactory.createLink("link4", localContent, this);
        panel.setContent(panelVc);
    } else if (source == contentLink) {
        getWindowControl().setInfo("Congratulations! You won a trip to Lorem Ipsum.");
    }
}
Also used : FloatingResizableDialogController(org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController) UserSearchController(org.olat.admin.user.UserSearchController)

Example 4 with FloatingResizableDialogController

use of org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController in project OpenOLAT by OpenOLAT.

the class GuiDemoFloatingPanelController method event.

@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == open) {
        UserSearchController userSearch = new UserSearchController(ureq, getWindowControl(), true);
        dialog = new FloatingResizableDialogController(ureq, getWindowControl(), userSearch.getInitialComponent(), "Your title", 350, 350, 400, 200, null, "", true, false);
        dialog.addControllerListener(this);
        panelVc.put("panel", dialog.getInitialComponent());
        panel.setContent(panelVc);
    } else if (source == open2) {
        dialog = new FloatingResizableDialogController(ureq, getWindowControl(), localContent, "Your title", 350, 350, 400, 200, createVelocityContainer("localContent2"), "", true, false);
        dialog.addControllerListener(this);
        panelVc.put("panel", dialog.getInitialComponent());
        contentLink = LinkFactory.createLink("link4", localContent, this);
        panel.setContent(panelVc);
    } else if (source == contentLink) {
        getWindowControl().setInfo("Congratulations! You won a trip to Lorem Ipsum.");
    }
}
Also used : FloatingResizableDialogController(org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController) UserSearchController(org.olat.admin.user.UserSearchController)

Example 5 with FloatingResizableDialogController

use of org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController in project OpenOLAT by OpenOLAT.

the class DevelopmentController 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)
 */
public void event(UserRequest ureq, Component source, Event event) {
    if (source == devToolLink) {
        removeAsListenerAndDispose(floatCtr);
        floatCtr = new FloatingResizableDialogController(ureq, getWindowControl(), myContent, "Brasato Development Tool", 1000, 200, 10, 60, true, true);
        listenTo(floatCtr);
        mainpanel.setContent(floatCtr.getInitialComponent());
    } else if (source == web10Link) {
        // choose regular mode
        winMgrImpl.setShowDebugInfo(false);
        winMgrImpl.setAjaxEnabled(false);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = web10Link;
        updateUI();
    } else if (source == web20Link) {
        // enable ajax / generic-dom-replacement GDR mode
        winMgrImpl.setShowDebugInfo(false);
        winMgrImpl.setAjaxEnabled(true);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = web20Link;
        updateUI();
    } else if (source == debugLink) {
        // debug mode requires web 1.0 mode at the moment
        winMgrImpl.setShowDebugInfo(true);
        winMgrImpl.setAjaxEnabled(false);
        winMgrImpl.setIdDivsForced(false);
        chosenMode = debugLink;
        updateUI();
    } else if (source == showComponentTree) {
        if (treeShown) {
            // hide component tree
            myContent.contextPut("compdump", "");
            winMgrImpl.setIdDivsForced(false);
        } else {
            winMgrImpl.setIdDivsForced(true);
            updateComponentTree();
        }
        treeShown = !treeShown;
    } else if (source == toggleAutorefresh) {
        autorefresh = !autorefresh;
        if (autorefresh) {
            myContent.contextPut("autorefresh", "true");
        } else {
            myContent.contextPut("autorefresh", "false");
        }
    } else if (event == ComponentUtil.VALIDATE_EVENT) {
        // todo update mode
        if (treeShown) {
            updateComponentTree();
        }
    }
}
Also used : FloatingResizableDialogController(org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController)

Aggregations

FloatingResizableDialogController (org.olat.core.gui.control.floatingresizabledialog.FloatingResizableDialogController)6 UserSearchController (org.olat.admin.user.UserSearchController)2