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);
}
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;
}
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);
}
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;
}
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();
}
Aggregations