mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 13:20:57 +00:00
Merge remote-tracking branch 'origin/newhome'
This commit is contained in:
commit
afe926dceb
9 files changed
+84
-23
No files matched your search
+6
-1
@@ -48,9 +48,11 @@ public class TabletAndDesktopEventView extends Composite implements EventView, E
|
||||
@UiField EventSponsors eventSponsors;
|
||||
|
||||
private final List<Widget> pageElements;
|
||||
private final EventDTO event;
|
||||
|
||||
public TabletAndDesktopEventView(SailingServiceAsync sailingService, EventDTO event, List<RaceGroupDTO> raceGroups, String leaderboardName,
|
||||
Timer timerForClientServerOffset) {
|
||||
this.event = event;
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> regattaStructure = getRegattaStructure(event, raceGroups);
|
||||
|
||||
eventHeader = new EventHeader(event, this);
|
||||
@@ -74,7 +76,7 @@ public class TabletAndDesktopEventView extends Composite implements EventView, E
|
||||
selectedRegatta = regattaStructure.get(0);
|
||||
}
|
||||
|
||||
if(selectedRegatta != null) {
|
||||
if(selectedRegatta != null && !event.isFakeSeries()) {
|
||||
goToRegattaRaces(selectedRegatta.getC(), selectedRegatta.getB(), selectedRegatta.getA());
|
||||
} else {
|
||||
goToRegattas();
|
||||
@@ -145,6 +147,7 @@ public class TabletAndDesktopEventView extends Composite implements EventView, E
|
||||
|
||||
private Map<String, String> createOverallLeaderboardLinkParameters(LeaderboardGroupDTO leaderboardGroup) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("name", leaderboardGroup.getName() + " " + LeaderboardNameConstants.OVERALL);
|
||||
linkParams.put("showRaceDetails", "true");
|
||||
if(leaderboardGroup.getDisplayName() != null) {
|
||||
@@ -156,6 +159,7 @@ public class TabletAndDesktopEventView extends Composite implements EventView, E
|
||||
|
||||
private Map<String, String> createRaceBoardLinkParameters(String leaderboardName, RegattaAndRaceIdentifier raceIdentifier) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("leaderboardName", leaderboardName);
|
||||
linkParams.put("raceName", raceIdentifier.getRaceName());
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true");
|
||||
@@ -167,6 +171,7 @@ public class TabletAndDesktopEventView extends Composite implements EventView, E
|
||||
|
||||
private Map<String, String> createLeaderboardLinkParameters(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("name", leaderboard.name);
|
||||
linkParams.put("showRaceDetails", "true");
|
||||
if (leaderboard.displayName != null) {
|
||||
|
||||
+30
-15
@@ -12,6 +12,7 @@ import com.google.gwt.dom.client.Style.Display;
|
||||
import com.google.gwt.dom.client.StyleInjector;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
@@ -164,24 +165,38 @@ public class Regatta extends Composite {
|
||||
Event.setEventListener(leaderboardLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
pageNavigator.openLeaderboardViewer(null, leaderboard);
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
pageNavigator.openLeaderboardViewer(null, leaderboard);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Event.sinkEvents(regattaImageWithLink, Event.ONCLICK);
|
||||
Event.setEventListener(regattaImageWithLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
pageNavigator.goToRegattaRaces(leaderboardGroup, leaderboard, raceGroup);
|
||||
}
|
||||
});
|
||||
if(isNavigatable) {
|
||||
Event.sinkEvents(regattaImageWithLink, Event.ONCLICK);
|
||||
Event.setEventListener(regattaImageWithLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
pageNavigator.goToRegattaRaces(leaderboardGroup, leaderboard, raceGroup);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Event.sinkEvents(regattaNameLink, Event.ONCLICK);
|
||||
Event.setEventListener(regattaNameLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
pageNavigator.goToRegattaRaces(leaderboardGroup, leaderboard, raceGroup);
|
||||
}
|
||||
});
|
||||
Event.sinkEvents(regattaNameLink, Event.ONCLICK);
|
||||
Event.setEventListener(regattaNameLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
pageNavigator.goToRegattaRaces(leaderboardGroup, leaderboard, raceGroup);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-1
@@ -13,6 +13,7 @@ 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;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
@@ -103,7 +104,11 @@ public class EventRegattaList extends Composite {
|
||||
Event.setEventListener(filterLeaderboardGroupAnchor, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
filterRegattaListByLeaderboardGroup(leaderboardGroup);
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
filterRegattaListByLeaderboardGroup(leaderboardGroup);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+11
-2
@@ -10,6 +10,7 @@ import com.google.gwt.dom.client.Style.Visibility;
|
||||
import com.google.gwt.i18n.shared.DateTimeFormat;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
@@ -101,7 +102,11 @@ public class EventRegattaRacesRace extends UIObject {
|
||||
Event.setEventListener(analyzeRaceLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
openRaceViewer();
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
openRaceViewer();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -109,7 +114,11 @@ public class EventRegattaRacesRace extends UIObject {
|
||||
Event.setEventListener(watchRaceLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
openRaceViewer();
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
openRaceViewer();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+6
-1
@@ -6,6 +6,7 @@ import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
@@ -39,7 +40,11 @@ public class UpcomingEvent extends UIObject {
|
||||
Event.setEventListener(eventOverviewLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event browserEvent) {
|
||||
navigator.goToEvent(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
switch (DOM.eventGetType(browserEvent)) {
|
||||
case Event.ONCLICK:
|
||||
navigator.goToEvent(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+10
@@ -5,8 +5,11 @@ import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigator;
|
||||
@@ -22,6 +25,7 @@ public class MainEvents extends Composite {
|
||||
private List<EventBaseDTO> recentEvents;
|
||||
|
||||
@UiField DivElement recentEventsDiv;
|
||||
@UiField Anchor showAllEventsAnchor;
|
||||
|
||||
private final PlaceNavigator navigator;
|
||||
|
||||
@@ -56,4 +60,10 @@ public class MainEvents extends Composite {
|
||||
event.setEvent(eventBase);
|
||||
recentEventsDiv.appendChild(event.getElement());
|
||||
}
|
||||
|
||||
@UiHandler("showAllEventsAnchor")
|
||||
public void showAllEvents(ClickEvent e) {
|
||||
navigator.goToEvents();;
|
||||
}
|
||||
|
||||
}
|
||||
+3
-1
@@ -19,7 +19,9 @@
|
||||
<!-- the recent events will be inserted here -->
|
||||
</div>
|
||||
<div class="{res.mainCss.grid} {res.mainCss.mainsection_navigation}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}"><a href="#" class="{res.mainCss.button}"><ui:text from='{i18n.mainEventShowAll}'/></a></div>
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<g:Anchor ui:field="showAllEventsAnchor" href="javascript:;" styleName="{res.mainCss.button}"><ui:text from='{i18n.mainEventShowAll}'/></g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
|
||||
+6
-1
@@ -10,6 +10,7 @@ import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
@@ -44,7 +45,11 @@ public class RecentEvent extends UIObject {
|
||||
Event.setEventListener(eventOverviewLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event browserEvent) {
|
||||
navigator.goToEvent(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
switch (DOM.eventGetType(browserEvent)) {
|
||||
case Event.ONCLICK:
|
||||
navigator.goToEvent(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+6
-1
@@ -7,6 +7,7 @@ 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;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
@@ -41,7 +42,11 @@ public abstract class StageTeaserBand extends UIObject {
|
||||
Event.setEventListener(actionLink, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
actionLinkClicked();
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
actionLinkClicked();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user