use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class AuthorListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addOwnersButton == source) {
List<AuthoringEntryRow> rows = getMultiSelectedRows();
if (!rows.isEmpty()) {
doAddOwners(ureq, rows);
} else {
showWarning("bulk.update.nothing.selected");
}
} else if (sendMailButton == source) {
List<AuthoringEntryRow> rows = getMultiSelectedRows();
if (!rows.isEmpty()) {
doSendMail(ureq, rows);
} else {
showWarning("bulk.update.nothing.selected");
}
} else if (copyButton == source) {
List<AuthoringEntryRow> rows = getMultiSelectedRows();
if (!rows.isEmpty()) {
doConfirmCopy(ureq, rows);
} else {
showWarning("bulk.update.nothing.selected");
}
} else if (deleteButton == source) {
List<AuthoringEntryRow> rows = getMultiSelectedRows();
if (!rows.isEmpty()) {
doDelete(ureq, rows);
} else {
showWarning("bulk.update.nothing.selected");
}
} else if (closedEl == source) {
doSetClosedFilter();
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("mark".equals(cmd)) {
AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
boolean marked = doMark(ureq, row);
link.setIconLeftCSS(marked ? "o_icon o_icon_bookmark o_icon-lg" : "o_icon o_icon_bookmark_add o_icon-lg");
link.setTitle(translate(marked ? "details.bookmark.remove" : "details.bookmark"));
link.getComponent().setDirty(true);
row.setMarked(marked);
} else if ("tools".equals(cmd)) {
AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
doOpenTools(ureq, row, link);
} else if ("references".equals(cmd)) {
AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
doOpenReferences(ureq, row, link);
}
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
AuthoringEntryRow row = model.getObject(se.getIndex());
if ("details".equals(cmd)) {
launchDetails(ureq, row);
} else if ("edit".equals(cmd)) {
launchEditor(ureq, row);
} else if ("select".equals(cmd)) {
launch(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
AuthorListState stateEntry = new AuthorListState();
stateEntry.setTableState(tableEl.getStateEntry());
addToHistory(ureq, stateEntry);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class RepositoryEntryListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source instanceof RatingWithAverageFormItem && event instanceof RatingFormEvent) {
RatingFormEvent ratingEvent = (RatingFormEvent) event;
RatingWithAverageFormItem ratingItem = (RatingWithAverageFormItem) source;
RepositoryEntryRow row = (RepositoryEntryRow) ratingItem.getUserObject();
doRating(row, ratingEvent.getRating());
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("mark".equals(cmd)) {
RepositoryEntryRow row = (RepositoryEntryRow) link.getUserObject();
boolean marked = doMark(ureq, row);
link.setIconLeftCSS(marked ? "o_icon o_icon_bookmark o_icon-lg" : "o_icon o_icon_bookmark_add o_icon-lg");
link.setTitle(translate(marked ? "details.bookmark.remove" : "details.bookmark"));
link.getComponent().setDirty(true);
row.setMarked(marked);
} else if ("start".equals(cmd)) {
RepositoryEntryRow row = (RepositoryEntryRow) link.getUserObject();
doOpen(ureq, row, null);
} else if ("details".equals(cmd)) {
RepositoryEntryRow row = (RepositoryEntryRow) link.getUserObject();
doOpenDetails(ureq, row);
} else if ("select".equals(cmd)) {
RepositoryEntryRow row = (RepositoryEntryRow) link.getUserObject();
if (row.isMember()) {
doOpen(ureq, row, null);
} else {
doOpenDetails(ureq, row);
}
} else if ("comments".equals(cmd)) {
RepositoryEntryRow row = (RepositoryEntryRow) link.getUserObject();
doOpenComments(ureq, row);
}
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
RepositoryEntryRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
if (row.isMember()) {
doOpen(ureq, row, null);
} else {
doOpenDetails(ureq, row);
}
}
} else if (event instanceof FlexiTableSearchEvent) {
RepositoryEntryListState state = new RepositoryEntryListState();
state.setTableState(tableEl.getStateEntry());
addToHistory(ureq, state);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent 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.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class AbstractMemberListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == membersTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
MemberView row = memberListModel.getObject(se.getIndex());
if (TABLE_ACTION_IM.equals(cmd)) {
doIm(ureq, row);
} else if (TABLE_ACTION_EDIT.equals(cmd)) {
openEdit(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
String cmd = event.getCommand();
if (FlexiTableSearchEvent.SEARCH.equals(event.getCommand())) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
String search = se.getSearch();
doSearch(search);
} else if (FlexiTableSearchEvent.QUICK_SEARCH.equals(event.getCommand())) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
String search = se.getSearch();
doSearch(search);
} else if (FlexiTableSearchEvent.RESET.getCommand().equals(cmd)) {
doResetSearch();
}
}
} else if (editButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
openEdit(ureq, selectedItems);
} else if (mailButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
doSendMail(ureq, selectedItems);
} else if (removeButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
confirmDelete(ureq, selectedItems);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
MemberView row = (MemberView) link.getUserObject();
doOpenTools(ureq, row, link);
} else if ("im".equals(cmd)) {
MemberView row = (MemberView) link.getUserObject();
doIm(ureq, row);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project openolat by klemens.
the class AbstractPageListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
loadModel(ureq, se.getSearch());
} else if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("up".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doMoveUpAssignment(ureq, row);
}
} else if ("down".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doMoveDownAssignment(ureq, row);
}
}
}
} else if (timelineSwitchOnButton == source) {
doSwitchTimelineOff();
} else if (timelineSwitchOffButton == source) {
doSwitchTimelineOn();
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open.full".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doOpenRow(ureq, row, false);
} else if ("comment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doComment(ureq, row.getPage());
} else if ("close.section".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmCloseSection(ureq, row);
} else if ("reopen.section".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmReopenSection(ureq, row);
} else if ("edit.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doEditAssignment(ureq, row);
} else if ("delete.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmDeleteAssignment(ureq, row);
} else if ("move.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveAssignment(ureq, row);
} else if ("start.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doStartAssignment(ureq, row);
} else if ("open.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doOpenAssignment(ureq, row);
} else if ("up.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveUpAssignment(ureq, row);
} else if ("down.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveDownAssignment(ureq, row);
}
} else if (source instanceof SingleSelection) {
SingleSelection startAssignment = (SingleSelection) source;
if (startAssignment.isOneSelected()) {
String selectedKey = startAssignment.getSelectedKey();
try {
Long key = Long.parseLong(selectedKey);
doStartAssignment(ureq, key);
} catch (Exception e) {
//
}
}
} else if (source == flc) {
if ("ONCLICK".equals(event.getCommand())) {
String category = ureq.getParameter("tag_select");
if (StringHelper.containsNonWhitespace(category)) {
tableEl.quickSearch(ureq, category);
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations