diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java index c95b2c99..374c6704 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java @@ -59,6 +59,7 @@ import ch.ethz.seb.sebserver.gui.table.ColumnDefinition.TableFilterAttribute; import ch.ethz.seb.sebserver.gui.table.EntityTable; import ch.ethz.seb.sebserver.gui.table.TableFilter.CriteriaType; import ch.ethz.seb.sebserver.gui.widget.WidgetFactory; +import ch.ethz.seb.sebserver.gui.widget.WidgetFactory.ImageIcon; @Lazy @Component @@ -109,6 +110,8 @@ public class QuizLookupList implements TemplateComposer { new LocTextKey("sebserver.quizdiscovery.quiz.import.existing"); private final static LocTextKey TEXT_FETCH_NOTE = new LocTextKey("sebserver.quizdiscovery.list.fetchnote"); + private final static LocTextKey TEXT_FETCH_NOTE_TOOLTIP = + new LocTextKey("sebserver.quizdiscovery.list.fetchnote.tooltip"); private final static String TEXT_KEY_ADDITIONAL_ATTR_PREFIX = "sebserver.quizdiscovery.quiz.details.additional."; @@ -464,12 +467,12 @@ public class QuizLookupList implements TemplateComposer { gridData.heightHint = 28; gridData.widthHint = 25; gridData.verticalIndent = 5; - final Label action = new Label(warningPanel, SWT.NONE); - action.setImage(WidgetFactory.ImageIcon.SWITCH.getImage(notePanel.getDisplay())); - action.setLayoutData(gridData); - action.addListener(SWT.MouseDown, event -> { - table.applyFilter(); - }); + + this.widgetFactory.imageButton( + ImageIcon.SWITCH, + warningPanel, + TEXT_FETCH_NOTE_TOOLTIP, + event -> table.applyFilter()); final Label text = new Label(warningPanel, SWT.NONE); text.setData(RWT.MARKUP_ENABLED, Boolean.TRUE); diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 9ebacb9a..2fdf79e6 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -448,6 +448,7 @@ sebserver.quizdiscovery.list.column.endtime.tooltip=The end time of the LMS exam sebserver.quizdiscovery.info.pleaseSelect=At first please select an LMS exam from the list sebserver.quizdiscovery.list.action.no.modify.privilege=No Access: A LMS exam from other institution cannot be imported. sebserver.quizdiscovery.list.fetchnote=Note: This list is not complete yet since the service is still fetching data from LMS.
            Use the reload button on the left or the search icon from the list for update. +sebserver.quizdiscovery.list.fetchnote.tooltip=Click to reload the list and get all currently fetched results. sebserver.quizdiscovery.action.list=LMS Exam Lookup sebserver.quizdiscovery.action.import=Import as Exam