Search in sources :

Example 81 with FormLink

use of org.olat.core.gui.components.form.flexible.elements.FormLink in project OpenOLAT by OpenOLAT.

the class TaxonomyTreeTableController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (newLevelButton == source) {
        doNewLevel(ureq);
    } else if (deleteButton == source) {
        doConfirmMultiDelete(ureq);
    } else if (mergeButton == source) {
        doMerge(ureq);
    } else if (typeButton == source) {
        doAssignType(ureq);
    } else if (moveButton == source) {
        doMove(ureq);
    } else if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("select".equals(cmd)) {
                TaxonomyLevelRow row = model.getObject(se.getIndex());
                doSelectTaxonomyLevel(ureq, row);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            loadModel(true, true);
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("tools".equals(cmd)) {
            TaxonomyLevelRow row = (TaxonomyLevelRow) link.getUserObject();
            doOpenTools(ureq, row, link);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 82 with FormLink

use of org.olat.core.gui.components.form.flexible.elements.FormLink in project OpenOLAT by OpenOLAT.

the class TaxonomyTreeTableController method forgeRow.

private TaxonomyLevelRow forgeRow(TaxonomyLevel taxonomyLevel) {
    // tools
    FormLink toolsLink = uifactory.addFormLink("tools_" + (++counter), "tools", "", null, null, Link.NONTRANSLATED);
    toolsLink.setIconLeftCSS("o_icon o_icon_actions o_icon-lg");
    TaxonomyLevelRow row = new TaxonomyLevelRow(taxonomyLevel, toolsLink);
    toolsLink.setUserObject(row);
    return row;
}
Also used : FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 83 with FormLink

use of org.olat.core.gui.components.form.flexible.elements.FormLink in project OpenOLAT by OpenOLAT.

the class TaxonomyLevelTypesEditController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (addRootTypeButton == source) {
        doAddRootType(ureq);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("tools".equals(cmd)) {
            TaxonomyLevelTypeRow row = (TaxonomyLevelTypeRow) link.getUserObject();
            doOpenTools(ureq, row, link);
        }
    } else if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("edit".equals(cmd)) {
                TaxonomyLevelTypeRow row = model.getObject(se.getIndex());
                doEditLevelType(ureq, row.getType());
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 84 with FormLink

use of org.olat.core.gui.components.form.flexible.elements.FormLink in project OpenOLAT by OpenOLAT.

the class TaxonomyLevelTypesEditController method forgeRow.

private TaxonomyLevelTypeRow forgeRow(TaxonomyLevelType type) {
    TaxonomyLevelTypeRow row = new TaxonomyLevelTypeRow(type);
    if (isToolsEnable(type)) {
        FormLink toolsLink = uifactory.addFormLink("tools_" + (++counter), "tools", "", null, null, Link.NONTRANSLATED);
        toolsLink.setIconLeftCSS("o_icon o_icon_actions o_icon-lg");
        toolsLink.setUserObject(row);
        row.setToolsLink(toolsLink);
    }
    return row;
}
Also used : FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 85 with FormLink

use of org.olat.core.gui.components.form.flexible.elements.FormLink in project OpenOLAT by OpenOLAT.

the class VideoAdminErrorController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source instanceof FormLink && ((FormLink) source).getCmd().equals("deleteQuality")) {
        FormLink link = (FormLink) source;
        VideoTranscoding videoTranscoding = (VideoTranscoding) link.getUserObject();
        videoManager.deleteVideoTranscoding(videoTranscoding);
    } else if (source instanceof FormLink && ((FormLink) source).getCmd().equals("viewAuthor")) {
        showUserInfo(ureq, baseSecurity.findIdentityByName((String) source.getUserObject()));
    } else if (source instanceof FormLink && ((FormLink) source).getCmd().equals("retranscode")) {
        FormLink link = (FormLink) source;
        VideoTranscoding videoTranscoding = (VideoTranscoding) link.getUserObject();
        videoManager.retranscodeFailedVideoTranscoding(videoTranscoding);
    } else if (source instanceof FormLink && ((FormLink) source).getCmd().equals("viewResource")) {
        FormLink link = (FormLink) source;
        VideoTranscoding videoTranscoding = (VideoTranscoding) link.getUserObject();
        launch(ureq, videoTranscoding);
    }
    initTable();
}
Also used : VideoTranscoding(org.olat.modules.video.VideoTranscoding) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Aggregations

FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)376 ArrayList (java.util.ArrayList)108 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)64 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)40 TextElement (org.olat.core.gui.components.form.flexible.elements.TextElement)36 SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)34 List (java.util.List)30 FormItem (org.olat.core.gui.components.form.flexible.FormItem)28 HashMap (java.util.HashMap)26 FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)24 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)22 Date (java.util.Date)18 Map (java.util.Map)18 Link (org.olat.core.gui.components.link.Link)18 Identity (org.olat.core.id.Identity)18 Component (org.olat.core.gui.components.Component)16 RichTextElement (org.olat.core.gui.components.form.flexible.elements.RichTextElement)16 FormEvent (org.olat.core.gui.components.form.flexible.impl.FormEvent)16 Controller (org.olat.core.gui.control.Controller)16 Event (org.olat.core.gui.control.Event)16