Skip to content
Snippets Groups Projects
Commit 268e80eb authored by srosse's avatar srosse
Browse files

OO-3795: implement table's quick search in coaching user search

parent c226ad71
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ public class StudentsTableDataModel extends DefaultFlexiTableDataModel<StudentSt
try {
List<StudentStatEntry> filteredList;
if(StringHelper.isLong(searchString)) {
Long identityKey = new Long(searchString);
Long identityKey = Long.valueOf(searchString);
filteredList = backupList.stream()
.filter(entry -> entry.getIdentityKey().equals(identityKey))
.collect(Collectors.toList());
......@@ -95,7 +95,7 @@ public class StudentsTableDataModel extends DefaultFlexiTableDataModel<StudentSt
int countRepo = student.getCountRepo();
switch(Columns.getValueAt(col)) {
case name: return student.getIdentityName();
case countCourse: return new Integer(countRepo);
case countCourse: return Integer.valueOf(countRepo);
case initialLaunch: {
if(countRepo == 0) {
return null;
......
......@@ -33,6 +33,7 @@ import org.olat.core.gui.components.form.flexible.impl.FormEvent;
import org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel;
import org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel;
import org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableDataModelFactory;
import org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent;
import org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent;
import org.olat.core.gui.components.link.Link;
import org.olat.core.gui.components.stack.TooledStackedPanel;
......@@ -170,6 +171,12 @@ public class UserListController extends FormBasicController implements Activatea
if("select".equals(cmd)) {
selectStudent(ureq, selectedRow);
}
} else if(event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent ftse = (FlexiTableSearchEvent)event;
String searchString = ftse.getSearch();
model.search(searchString);
tableEl.reset();
tableEl.reloadData();
}
}
super.formInnerEvent(ureq, source, event);
......@@ -187,7 +194,7 @@ public class UserListController extends FormBasicController implements Activatea
protected void event(UserRequest ureq, Controller source, Event event) {
if(event == Event.BACK_EVENT) {
reloadModel();
initialPanel.popContent();;
initialPanel.popContent();
removeAsListenerAndDispose(studentCtrl);
studentCtrl = null;
addToHistory(ureq);
......@@ -207,7 +214,12 @@ public class UserListController extends FormBasicController implements Activatea
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
//do nothing
}
@Override
protected void propagateDirtinessToContainer(FormItem fiSrc, FormEvent fe) {
//
}
protected void selectUniqueStudent(UserRequest ureq) {
if(model.getRowCount() > 0) {
StudentStatEntry studentStat = model.getObject(0);
......
......@@ -294,9 +294,8 @@ i.mce-ico.mce-i-help:before {
/*
* Overwrite some class of typehead needed by the flexi table
*/
div.o_table_search span.twitter-typeahead {
display: table-cell;
padding-top: 3px;
div.o_table_search>span.twitter-typeahead {
padding-top: 5px;
}
//tags input
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment