added focus out for auto-filter on tex filter for lists

This commit is contained in:
anhefti 2022-07-14 13:05:05 +02:00
parent 17c46362a3
commit 921595c3b0
3 changed files with 27 additions and 8 deletions

View file

@ -338,6 +338,9 @@ public class TableFilter<ROW extends ModelIdAware> {
TableFilter.this.entityTable.applyFilter();
}
});
this.textInput.addListener(SWT.FocusOut, event -> {
TableFilter.this.entityTable.applyFilter();
});
return this;
}

View file

@ -91,6 +91,26 @@ public class MockCourseAccessAPI implements CourseAccessAPI {
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),
null,
"http://lms.mockup.com/api/"));
if (webserviceInfo.hasProfile("dev")) {
for (int i = 12; i < 50; i++) {
this.mockups.add(new QuizData(
"quiz10" + i, institutionId, lmsSetupId, lmsType, "Demo Quiz 10 " + i + " (MOCKUP)",
i + "_Starts in a minute and ends after five minutes",
DateTime.now(DateTimeZone.UTC).plus(Constants.MINUTE_IN_MILLIS)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),
DateTime.now(DateTimeZone.UTC).plus(6 * Constants.MINUTE_IN_MILLIS)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),
"http://lms.mockup.com/api/"));
this.mockups.add(new QuizData(
"quiz11" + i, institutionId, lmsSetupId, lmsType, "Demo Quiz 11 " + i + " (MOCKUP)",
i + "_Starts in a minute and ends never",
DateTime.now(DateTimeZone.UTC).plus(Constants.MINUTE_IN_MILLIS)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),
null,
"http://lms.mockup.com/api/"));
}
}
}
@Override

View file

@ -137,10 +137,11 @@ public class ExamAdministrationController extends EntityController<Exam, Exam> {
final HttpServletRequest request) {
checkReadPrivilege(institutionId);
this.authorization.check(
PrivilegeType.READ,
EntityType.EXAM,
institutionId);
// NOTE: several attributes for sorting may be originated by the QuizData from LMS not by the database
// of the SEB Server. Therefore in the case we have no or the default sorting we can use the
// native PaginationService within MyBatis and SQL. For the other cases we need an in-line sorting and paging
if (StringUtils.isBlank(sort) ||
(this.paginationService.isNativeSortingSupported(ExamRecordDynamicSqlSupport.examRecord, sort))) {
@ -148,11 +149,6 @@ public class ExamAdministrationController extends EntityController<Exam, Exam> {
} else {
this.authorization.check(
PrivilegeType.READ,
EntityType.EXAM,
institutionId);
final Collection<Exam> exams = this.examDAO
.allMatching(new FilterMap(
allRequestParams,