mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 13:20:57 +00:00
little improvement when selecting a regatta group (waiting for better solution from ubilabs)
This commit is contained in:
1 parent
70455736f7
commit
9b8a700874
2 files changed
+6
-2
No files matched your search
+5
-1
@@ -9,6 +9,7 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
@@ -40,7 +41,8 @@ public class EventRegattaList extends Composite {
|
||||
@UiField DivElement regattaListNavigationDiv;
|
||||
@UiField DivElement regattaListItemsDiv;
|
||||
@UiField AnchorElement filterNoLeaderboardGroupsAnchor;
|
||||
|
||||
@UiField SpanElement allBoatClassesSelected;
|
||||
|
||||
private final EventDTO event;
|
||||
private final Map<String, List<Regatta>> regattaElementsByLeaderboardGroup;
|
||||
|
||||
@@ -108,6 +110,7 @@ public class EventRegattaList extends Composite {
|
||||
|
||||
private void filterRegattaListByLeaderboardGroup(LeaderboardGroupDTO leaderboardGroup) {
|
||||
if (leaderboardGroup != null) {
|
||||
allBoatClassesSelected.getStyle().setDisplay(Display.NONE);
|
||||
// hide all regattas of the not selected leaderboardgroup
|
||||
for (LeaderboardGroupDTO lg : event.getLeaderboardGroups()) {
|
||||
boolean isVisible = leaderboardGroup.getName().equals(lg.getName());
|
||||
@@ -118,6 +121,7 @@ public class EventRegattaList extends Composite {
|
||||
}
|
||||
} else {
|
||||
// make all regattas visible
|
||||
allBoatClassesSelected.getStyle().setDisplay(Display.INLINE_BLOCK);
|
||||
for (LeaderboardGroupDTO lg : event.getLeaderboardGroups()) {
|
||||
List<Regatta> regattaElements = regattaElementsByLeaderboardGroup.get(lg.getName());
|
||||
for (Regatta regatta : regattaElements) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
<div ui:field="regattaListNavigationDiv" class="{local_res.css.eventregattalist_navigation} {res.mainCss.navbar}">
|
||||
<div class="{res.mainCss.grid}">
|
||||
<div ui:field="regattaGroupsNavigationPanel" class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<a ui:field="filterNoLeaderboardGroupsAnchor" href="javascript:;" class="{res.mainCss.navbar_button} {res.mainCss.navbar_buttonactive}"><ui:text from='{i18n.eventRegattaListAllBoatClasses}'/></a>
|
||||
<a ui:field="filterNoLeaderboardGroupsAnchor" href="javascript:;" class="{res.mainCss.navbar_button} {res.mainCss.navbar_buttonactive}"><span ui:field="allBoatClassesSelected">✓ </span><ui:text from='{i18n.eventRegattaListAllBoatClasses}'/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user