mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-15 08:41:01 +00:00
Removed unused old event/ series/ regatta implementation
This commit is contained in:
1 parent
06dfaf42bf
commit
f49ea246ae
120 files changed
+44
-5962
No files matched your search
+3
-3
@@ -9,11 +9,13 @@ import com.sap.sailing.gwt.home.client.place.contact.ContactActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
@@ -28,10 +30,8 @@ import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesOverallLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesLeaderboardsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringActivityProxy;
|
||||
|
||||
+3
-4
@@ -3,11 +3,10 @@ package com.sap.sailing.gwt.home.client.app;
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartClientFactory;
|
||||
@@ -15,6 +14,6 @@ import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewClientFactory;
|
||||
|
||||
public interface ApplicationClientFactory extends AboutUsClientFactory, ContactClientFactory, EventClientFactory,
|
||||
EventsClientFactory, StartClientFactory, SponsoringClientFactory, SolutionsClientFactory, SearchResultClientFactory,
|
||||
WhatsNewClientFactory, RegattaClientFactory, SeriesClientFactory, ErrorClientFactory {
|
||||
WhatsNewClientFactory, SeriesClientFactory, ErrorClientFactory {
|
||||
HomePlacesNavigator getHomePlacesNavigator();
|
||||
}
|
||||
+3
-3
@@ -4,8 +4,10 @@ import com.google.gwt.place.shared.PlaceHistoryMapper;
|
||||
import com.google.gwt.place.shared.WithTokenizers;
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
@@ -19,9 +21,7 @@ import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesOverallL
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesLeaderboardsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.SeriesEventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.SeriesMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
|
||||
-9
@@ -13,8 +13,6 @@ import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPla
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringPlace;
|
||||
@@ -93,13 +91,6 @@ public class HomePlacesNavigator extends AbstractPlaceNavigator {
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, regattaPlace);
|
||||
}
|
||||
|
||||
// TODO replace with the new places / remove when the code that calls this is gone
|
||||
/** this place will be merged into the common series event view as tab later on */
|
||||
public PlaceNavigation<SeriesPlace> getSeriesAnalyticsNavigation(String eventUuidAsString, SeriesNavigationTabs navigationTab, String leaderboardIdAsNameString, String baseUrl, boolean isOnRemoteServer) {
|
||||
SeriesPlace seriesPlace = new SeriesPlace(eventUuidAsString, navigationTab, leaderboardIdAsNameString, true, true);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, seriesPlace);
|
||||
}
|
||||
|
||||
public PlaceNavigation<SearchResultPlace> getSearchResultNavigation(String searchQuery) {
|
||||
return createGlobalPlaceNavigation(new SearchResultPlace(searchQuery));
|
||||
}
|
||||
|
||||
-35
@@ -1,26 +1,13 @@
|
||||
package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.shared.SimpleEventBus;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.place.error.TabletAndDesktopErrorView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.TabletAndDesktopEventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.TabletAndDesktopRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.TabletAndDesktopSearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.series.TabletAndDesktopSeriesView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.TabletAndDesktopSolutionsView;
|
||||
@@ -31,9 +18,6 @@ import com.sap.sailing.gwt.home.client.place.start.TabletAndDesktopStartView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.TabletAndDesktopWhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewPlace.WhatsNewNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewView;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
|
||||
public class SmartphoneApplicationClientFactory extends AbstractApplicationClientFactory implements ApplicationClientFactory {
|
||||
@@ -49,15 +33,6 @@ public class SmartphoneApplicationClientFactory extends AbstractApplicationClien
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController), eventBus), eventBus, placeController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopEventView(getSailingService(), event, navigationTab, raceGroups, leaderboardName, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event) {
|
||||
return new TabletAndDesktopEventWithoutRegattasView(getSailingService(), event, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventsView createEventsView() {
|
||||
@@ -83,16 +58,6 @@ public class SmartphoneApplicationClientFactory extends AbstractApplicationClien
|
||||
return new TabletAndDesktopSolutionsView(navigationTab, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegattaAnalyticsView createRegattaAnalyticsView(EventDTO event, String leaderboardName, RegattaNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopRegattaView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopSeriesView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResultView createSearchResultView() {
|
||||
return new TabletAndDesktopSearchResultView(getHomePlacesNavigator());
|
||||
|
||||
-36
@@ -1,26 +1,13 @@
|
||||
package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.shared.SimpleEventBus;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.place.error.TabletAndDesktopErrorView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.TabletAndDesktopEventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.TabletAndDesktopRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.TabletAndDesktopSearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.series.TabletAndDesktopSeriesView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.TabletAndDesktopSolutionsView;
|
||||
@@ -31,9 +18,6 @@ import com.sap.sailing.gwt.home.client.place.start.TabletAndDesktopStartView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.TabletAndDesktopWhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewPlace.WhatsNewNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewView;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
|
||||
public class TabletAndDesktopApplicationClientFactory extends AbstractApplicationClientFactory implements ApplicationClientFactory {
|
||||
@@ -49,21 +33,11 @@ public class TabletAndDesktopApplicationClientFactory extends AbstractApplicatio
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController), eventBus), eventBus, placeController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopEventView(getSailingService(), event, navigationTab, raceGroups, leaderboardName, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TabletAndDesktopErrorView createErrorView(String errorMessage, Throwable errorReason) {
|
||||
return new TabletAndDesktopErrorView(errorMessage, errorReason, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event) {
|
||||
return new TabletAndDesktopEventWithoutRegattasView(getSailingService(), event, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventsView createEventsView() {
|
||||
return new TabletAndDesktopEventsView(getHomePlacesNavigator());
|
||||
@@ -83,16 +57,6 @@ public class TabletAndDesktopApplicationClientFactory extends AbstractApplicatio
|
||||
public SolutionsView createSolutionsView(SolutionsNavigationTabs navigationTab) {
|
||||
return new TabletAndDesktopSolutionsView(navigationTab, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegattaAnalyticsView createRegattaAnalyticsView(EventDTO event, String leaderboardName, RegattaNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopRegattaView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopSeriesView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResultView createSearchResultView() {
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
/**
|
||||
* A base class for a content composite related to an sailing event
|
||||
* @author Frank
|
||||
*
|
||||
*/
|
||||
public class AbstractEventComposite extends Composite {
|
||||
private final EventDTO event;
|
||||
private final EventPlaceNavigator pageNavigator;
|
||||
|
||||
public AbstractEventComposite(EventDTO event, EventPlaceNavigator pageNavigator) {
|
||||
this.event = event;
|
||||
this.pageNavigator = pageNavigator;
|
||||
}
|
||||
|
||||
public EventDTO getEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
public EventPlaceNavigator getPageNavigator() {
|
||||
return pageNavigator;
|
||||
}
|
||||
}
|
||||
-166
@@ -1,166 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.activity.shared.AbstractActivity;
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.client.shared.placeholder.Placeholder;
|
||||
import com.sap.sailing.gwt.ui.regattaoverview.RegattaRaceStatesSettings;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
|
||||
import com.sap.sse.gwt.client.mvp.ErrorView;
|
||||
import com.sap.sse.gwt.client.player.TimeListener;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sse.gwt.client.player.Timer.PlayModes;
|
||||
|
||||
public class EventActivity extends AbstractActivity {
|
||||
private final EventClientFactory clientFactory;
|
||||
|
||||
private final EventPlace eventPlace;
|
||||
private final Timer timerForClientServerOffset;
|
||||
|
||||
private final long serverUpdateRateInMs = 10000;
|
||||
private final Timer serverUpdateTimer;
|
||||
private final RegattaRaceStatesSettings raceStatesSettings;
|
||||
|
||||
private EventView view;
|
||||
private EventDTO event;
|
||||
|
||||
public EventActivity(EventPlace place, EventClientFactory clientFactory) {
|
||||
this.clientFactory = clientFactory;
|
||||
this.eventPlace = place;
|
||||
|
||||
this.view = null;
|
||||
this.event = null;
|
||||
|
||||
timerForClientServerOffset = new Timer(PlayModes.Replay);
|
||||
serverUpdateTimer = new Timer(PlayModes.Live, serverUpdateRateInMs);
|
||||
|
||||
raceStatesSettings = new RegattaRaceStatesSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
|
||||
panel.setWidget(new Placeholder());
|
||||
|
||||
final long clientTimeWhenRequestWasSent = System.currentTimeMillis();
|
||||
try {
|
||||
final UUID eventUUID = UUID.fromString(eventPlace.getEventUuidAsString());
|
||||
clientFactory.getSailingService().getEventById(eventUUID, true, new AsyncCallback<EventDTO>() {
|
||||
@Override
|
||||
public void onSuccess(final EventDTO event) {
|
||||
if(event != null) {
|
||||
loadRegattaStructureAndCreateEventView(panel, clientTimeWhenRequestWasSent, event);
|
||||
} else {
|
||||
createErrorView("No such event with UUID " + eventUUID, null, panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
createErrorView("Error while loading the event with service getEventById()", caught, panel);
|
||||
}
|
||||
});
|
||||
} catch (IllegalArgumentException e) {
|
||||
createErrorView("Could not parse a valid UUID from the parameter 'eventID'.", null, panel);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadRegattaStructureAndCreateEventView(final AcceptsOneWidget panel, final long clientTimeWhenRequestWasSent, final EventDTO event) {
|
||||
this.event = event;
|
||||
|
||||
if(event.getLeaderboardGroups().size() > 0) {
|
||||
clientFactory.getSailingService().getRegattaStructureOfEvent(event.id, new AsyncCallback<List<RaceGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RaceGroupDTO> raceGroups) {
|
||||
if(raceGroups.size() > 0) {
|
||||
for(LeaderboardGroupDTO leaderboardGroupDTO: event.getLeaderboardGroups()) {
|
||||
final long clientTimeWhenResponseWasReceived = System.currentTimeMillis();
|
||||
if (leaderboardGroupDTO.getAverageDelayToLiveInMillis() != null) {
|
||||
timerForClientServerOffset.setLivePlayDelayInMillis(leaderboardGroupDTO.getAverageDelayToLiveInMillis());
|
||||
}
|
||||
timerForClientServerOffset.adjustClientServerOffset(clientTimeWhenRequestWasSent, leaderboardGroupDTO.getCurrentServerTime(), clientTimeWhenResponseWasReceived);
|
||||
}
|
||||
createEventView(event, raceGroups, panel);
|
||||
|
||||
if(event.isRunning()) {
|
||||
// create update time for race states only for running events
|
||||
serverUpdateTimer.addTimeListener(new TimeListener() {
|
||||
@Override
|
||||
public void timeChanged(Date newTime, Date oldTime) {
|
||||
loadAndUpdateEventRaceStatesLog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
createEventWithoutRegattasView(event, panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
createErrorView("Error while loading the regatta structure with service getRegattaStructureOfEvent()", caught, panel);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createEventWithoutRegattasView(event, panel);
|
||||
}
|
||||
}
|
||||
|
||||
private void createErrorView(String errorMessage, Throwable errorReason, AcceptsOneWidget panel) {
|
||||
ErrorView view = clientFactory.createErrorView(errorMessage, errorReason);
|
||||
panel.setWidget(view.asWidget());
|
||||
}
|
||||
|
||||
private void createEventView(EventDTO event, List<RaceGroupDTO> raceGroups, AcceptsOneWidget panel) {
|
||||
view = clientFactory.createEventView(event, eventPlace.getNavigationTab(), raceGroups, eventPlace.getLeaderboardIdAsNameString(), timerForClientServerOffset);
|
||||
panel.setWidget(view.asWidget());
|
||||
Window.setTitle(eventPlace.getTitle(event.getName()));
|
||||
}
|
||||
|
||||
private void createEventWithoutRegattasView(EventDTO event, AcceptsOneWidget panel) {
|
||||
// no leaderboard groups defined yet -> show a teaser page
|
||||
EventWithoutRegattasView view = clientFactory.createEventWithoutRegattasView(event);
|
||||
panel.setWidget(view.asWidget());
|
||||
Window.setTitle(eventPlace.getTitle(event.getName()));
|
||||
}
|
||||
|
||||
protected void loadAndUpdateEventRaceStatesLog() {
|
||||
if(view != null && event != null) {
|
||||
final long clientTimeWhenRequestWasSent = System.currentTimeMillis();
|
||||
|
||||
clientFactory.getSailingService().getRaceStateEntriesForRaceGroup(event.id, raceStatesSettings.getVisibleCourseAreas(),
|
||||
raceStatesSettings.getVisibleRegattas(), raceStatesSettings.isShowOnlyCurrentlyRunningRaces(), raceStatesSettings.isShowOnlyRacesOfSameDay(),
|
||||
new MarkedAsyncCallback<List<RegattaOverviewEntryDTO>>(
|
||||
new AsyncCallback<List<RegattaOverviewEntryDTO>>() {
|
||||
@Override
|
||||
public void onFailure(Throwable cause) {
|
||||
Window.setStatus("Error while loading the race states with service getRaceStateEntriesForRaceGroup()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<RegattaOverviewEntryDTO> result) {
|
||||
final long clientTimeWhenResponseWasReceived = System.currentTimeMillis();
|
||||
Date serverTimeDuringRequest = null;
|
||||
for (RegattaOverviewEntryDTO entryDTO : result) {
|
||||
if (entryDTO.currentServerTime != null) {
|
||||
serverTimeDuringRequest = entryDTO.currentServerTime;
|
||||
}
|
||||
}
|
||||
view.updateEventRaceStates(result);
|
||||
timerForClientServerOffset.adjustClientServerOffset(clientTimeWhenRequestWasSent, serverTimeDuringRequest, clientTimeWhenResponseWasReceived);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.sap.sse.gwt.client.mvp.AbstractActivityProxy;
|
||||
|
||||
public class EventActivityProxy extends AbstractActivityProxy {
|
||||
|
||||
private final EventClientFactory clientFactory;
|
||||
private final EventPlace place;
|
||||
|
||||
public EventActivityProxy(EventPlace place, EventClientFactory clientFactory) {
|
||||
this.place = place;
|
||||
this.clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startAsync() {
|
||||
GWT.runAsync(new AbstractRunAsyncCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
super.onSuccess(new EventActivity(place, clientFactory));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.ui.client.SailingClientFactory;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public interface EventClientFactory extends SailingClientFactory {
|
||||
EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset);
|
||||
|
||||
EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public interface EventPlaceNavigator {
|
||||
void goToOverview();
|
||||
void goToRegattas();
|
||||
void goToSchedule();
|
||||
void goToMedia();
|
||||
void goToRegattaRaces(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard, RaceGroupDTO raceGroup);
|
||||
String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race);
|
||||
void openOverallLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup);
|
||||
void openLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard);
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
|
||||
public interface EventView {
|
||||
Widget asWidget();
|
||||
|
||||
void updateEventRaceStates(List<RegattaOverviewEntryDTO> racesStateEntries);
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public interface EventWithoutRegattasView {
|
||||
Widget asWidget();
|
||||
}
|
||||
-223
@@ -1,223 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.EventHeader;
|
||||
import com.sap.sailing.gwt.home.client.place.event.media.EventMedia;
|
||||
import com.sap.sailing.gwt.home.client.place.event.overview.EventOverview;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattalist.EventRegattaList;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRaces;
|
||||
import com.sap.sailing.gwt.home.client.place.event.schedule.EventSchedule;
|
||||
import com.sap.sailing.gwt.home.client.shared.eventsponsors.EventSponsors;
|
||||
import com.sap.sailing.gwt.ui.client.EntryPointLinkFactory;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardViewConfiguration;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.common.Util.Triple;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class TabletAndDesktopEventView extends Composite implements EventView, EventPlaceNavigator {
|
||||
private static EventViewUiBinder uiBinder = GWT.create(EventViewUiBinder.class);
|
||||
|
||||
interface EventViewUiBinder extends UiBinder<Widget, TabletAndDesktopEventView> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) EventHeader eventHeader;
|
||||
@UiField(provided=true) EventOverview eventOverview;
|
||||
@UiField(provided=true) EventSchedule eventSchedule;
|
||||
@UiField(provided=true) EventMedia eventMedia;
|
||||
@UiField(provided=true) EventRegattaList eventRegattaList;
|
||||
@UiField(provided=true) EventRegattaRaces eventRegattaRaces;
|
||||
|
||||
@UiField EventSponsors eventSponsors;
|
||||
|
||||
private final List<Widget> pageElements;
|
||||
private final EventDTO event;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private EventPlace currentInternalPlace;
|
||||
|
||||
public TabletAndDesktopEventView(SailingServiceAsync sailingService, EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName,
|
||||
Timer timerForClientServerOffset, HomePlacesNavigator navigator) {
|
||||
this.event = event;
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> regattaStructure = getRegattaStructure(event, raceGroups);
|
||||
|
||||
eventHeader = new EventHeader(event, navigator, this);
|
||||
eventRegattaList = new EventRegattaList(event, regattaStructure, timerForClientServerOffset, navigator, this);
|
||||
eventRegattaRaces = new EventRegattaRaces(event, timerForClientServerOffset, navigator, this);
|
||||
eventOverview = new EventOverview(event, this);
|
||||
eventSchedule = new EventSchedule(event, this);
|
||||
eventMedia = new EventMedia(event, this);
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
pageElements = Arrays.asList(new Widget[] { eventOverview, eventRegattaList, eventRegattaRaces, eventMedia, eventSchedule });
|
||||
|
||||
Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO> selectedRegatta = null;
|
||||
if(leaderboardName != null) {
|
||||
selectedRegatta = regattaStructure.get(leaderboardName);
|
||||
}
|
||||
|
||||
// in case we only have one regatta/leaderboard we go directly to the 'races' page
|
||||
if(selectedRegatta == null && regattaStructure.size() == 1) {
|
||||
selectedRegatta = regattaStructure.get(0);
|
||||
}
|
||||
|
||||
if(selectedRegatta != null && (navigationTab == EventNavigationTabs.Regatta || !event.isFakeSeries())) {
|
||||
goToRegattaRaces(selectedRegatta.getC(), selectedRegatta.getB(), selectedRegatta.getA());
|
||||
} else {
|
||||
goToRegattas();
|
||||
}
|
||||
if(event.getSponsorImageURLs() != null && event.getSponsorImageURLs().size() > 0) {
|
||||
eventSponsors.setVisible(false);
|
||||
eventSponsors.setEventSponsors(event.getSponsorImageURLs());
|
||||
} else {
|
||||
eventSponsors.setVisible(false);
|
||||
eventSponsors.setEventSponsors(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEventRaceStates(List<RegattaOverviewEntryDTO> racesStateEntries) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToOverview() {
|
||||
setVisibleEventElement(eventOverview);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Overview, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToRegattas() {
|
||||
setVisibleEventElement(eventRegattaList);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Regattas, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToRegattaRaces(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard, RaceGroupDTO raceGroup) {
|
||||
eventRegattaRaces.setRaces(leaderboardGroup, false, leaderboard, raceGroup);
|
||||
eventHeader.setCompactHeader();
|
||||
setVisibleEventElement(eventRegattaRaces);
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Regatta, leaderboard.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToSchedule() {
|
||||
setVisibleEventElement(eventSchedule);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Schedule, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToMedia() {
|
||||
setVisibleEventElement(eventMedia);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Media, null);
|
||||
}
|
||||
|
||||
public String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race) {
|
||||
RegattaAndRaceIdentifier raceIdentifier = race.getRaceIdentifier();
|
||||
return EntryPointLinkFactory.createRaceBoardLink(createRaceBoardLinkParameters(leaderboard.name, raceIdentifier));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard) {
|
||||
String link = EntryPointLinkFactory.createLeaderboardLink(createLeaderboardLinkParameters(leaderboardGroup, leaderboard));
|
||||
Window.open(link, "_blank", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openOverallLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup) {
|
||||
String link = EntryPointLinkFactory.createLeaderboardLink(createOverallLeaderboardLinkParameters(leaderboardGroup));
|
||||
Window.open(link, "_blank", "");
|
||||
}
|
||||
|
||||
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) {
|
||||
linkParams.put("displayName", leaderboardGroup.getDisplayName());
|
||||
}
|
||||
linkParams.put("leaderboardGroupName", leaderboardGroup.getName());
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
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());
|
||||
// TODO this must only be forwarded if there is a logged-on user
|
||||
// linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_MAPCONTROLS, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_NAVIGATION_PANEL, "true");
|
||||
linkParams.put("regattaName", raceIdentifier.getRegattaName());
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
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) {
|
||||
linkParams.put("displayName", leaderboard.displayName);
|
||||
}
|
||||
if(leaderboardGroup != null) {
|
||||
linkParams.put("leaderboardGroupName", leaderboardGroup.getName());
|
||||
}
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
private void setVisibleEventElement(Widget visibleWidget) {
|
||||
for (Widget element : pageElements) {
|
||||
element.setVisible(element == visibleWidget);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> getRegattaStructure(EventDTO event, List<RaceGroupDTO> raceGroups) {
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> result = new HashMap<>();
|
||||
Map<String, RaceGroupDTO> raceGroupsMap = new HashMap<>();
|
||||
for (RaceGroupDTO raceGroup: raceGroups) {
|
||||
raceGroupsMap.put(raceGroup.getName(), raceGroup);
|
||||
}
|
||||
|
||||
for (LeaderboardGroupDTO leaderboardGroup : event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
String leaderboardName = leaderboard.name;
|
||||
result.put(leaderboardName, new Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>(raceGroupsMap.get(leaderboardName),
|
||||
leaderboard, leaderboardGroup));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
|
||||
<g:HTMLPanel>
|
||||
<p:header.EventHeader ui:field='eventHeader'/>
|
||||
<p:overview.EventOverview ui:field='eventOverview'/>
|
||||
<p:regattalist.EventRegattaList ui:field='eventRegattaList'/>
|
||||
<p:regattaraces.EventRegattaRaces ui:field='eventRegattaRaces'/>
|
||||
<p:schedule.EventSchedule ui:field='eventSchedule'/>
|
||||
<p:media.EventMedia ui:field='eventMedia'/>
|
||||
<s:eventsponsors.EventSponsors ui:field='eventSponsors'/>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.EventHeader;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class TabletAndDesktopEventWithoutRegattasView extends Composite implements EventWithoutRegattasView {
|
||||
private static EventViewUiBinder uiBinder = GWT.create(EventViewUiBinder.class);
|
||||
|
||||
interface EventViewUiBinder extends UiBinder<Widget, TabletAndDesktopEventWithoutRegattasView> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) EventHeader eventHeader;
|
||||
|
||||
public TabletAndDesktopEventWithoutRegattasView(SailingServiceAsync sailingService, EventDTO event, HomePlacesNavigator placeNavigator) {
|
||||
eventHeader = new EventHeader(event, placeNavigator);
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:style>
|
||||
.infoPanel {
|
||||
height: 300px;
|
||||
padding-top: 2em;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<p:header.EventHeader ui:field='eventHeader'/>
|
||||
<div class="{res.mediaCss.grid} {style.infoPanel}">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
There is no information available about the regattas of this event yet.
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.header;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.ImageElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
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.Event;
|
||||
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.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public class CompactEventHeader extends Composite {
|
||||
private static CompactHeaderUiBinder uiBinder = GWT.create(CompactHeaderUiBinder.class);
|
||||
|
||||
interface CompactHeaderUiBinder extends UiBinder<Widget, CompactEventHeader> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
@UiField Anchor regattaLink;
|
||||
@UiField Anchor regattaLink2;
|
||||
@UiField ImageElement eventLogo;
|
||||
@UiField SpanElement eventNameSpan;
|
||||
|
||||
private final EventDTO event;
|
||||
private final HomePlacesNavigator placeNavigator;
|
||||
private final PlaceNavigation<AbstractEventRegattaPlace> regattaNavigation;
|
||||
|
||||
public CompactEventHeader(EventDTO event, String leaderboardName, HomePlacesNavigator placeNavigator) {
|
||||
this.event = event;
|
||||
this.placeNavigator = placeNavigator;
|
||||
|
||||
EventHeaderResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
regattaNavigation = placeNavigator.getRegattaNavigation(event.id.toString(), leaderboardName, event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattaLink.setHref(regattaNavigation.getTargetUrl());
|
||||
regattaLink2.setHref(regattaNavigation.getTargetUrl());
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private StrippedLeaderboardDTO findLeaderboardWithSameCourseArea(EventDTO event) {
|
||||
for(LeaderboardGroupDTO leaderboardGroup: event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
for(CourseAreaDTO courseArea: event.venue.getCourseAreas()) {
|
||||
if(leaderboard.defaultCourseAreaId != null && leaderboard.defaultCourseAreaId.equals(courseArea.id)) {
|
||||
return leaderboard;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
boolean isSeries = event.isFakeSeries();
|
||||
|
||||
String eventName = event.getName();
|
||||
if(isSeries) {
|
||||
LeaderboardGroupDTO leaderboardGroupDTO = event.getLeaderboardGroups().get(0);
|
||||
eventName = leaderboardGroupDTO.getDisplayName() != null ? leaderboardGroupDTO.getDisplayName() : leaderboardGroupDTO.getName();
|
||||
|
||||
StrippedLeaderboardDTO leaderboardFittingToEvent = findLeaderboardWithSameCourseArea(event);
|
||||
if(leaderboardFittingToEvent != null) {
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
}
|
||||
eventNameSpan.setInnerText(eventName);
|
||||
String logoUrl = event.getLogoImageURL() != null ? event.getLogoImageURL() : EventHeaderResources.INSTANCE.defaultEventLogoImage().getSafeUri().asString();
|
||||
eventLogo.setSrc(logoUrl);
|
||||
}
|
||||
|
||||
@UiHandler("regattaLink")
|
||||
void gotoRegattaClicked(ClickEvent event) {
|
||||
handleClickEvent(event, regattaNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("regattaLink2")
|
||||
void gotoRegatta2Clicked(ClickEvent event) {
|
||||
handleClickEvent(event, regattaNavigation);
|
||||
}
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
placeNavigator.goToPlace(placeNavigation);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.header.EventHeaderResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- event navigation-->
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompact}">
|
||||
<div class="{res.mediaCss.grid}" style="margin-left:5rem;margin-right:5rem;">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
<g:Anchor ui:field="regattaLink">
|
||||
<img ui:field="eventLogo" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img>
|
||||
</g:Anchor>
|
||||
<g:Anchor ui:field="regattaLink2" styleName="{res.mainCss.button} {local_res.css.eventnavigation_link}">
|
||||
<span ui:field='eventNameSpan' />
|
||||
</g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-241
@@ -1,241 +0,0 @@
|
||||
.dropdown {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
width: 20em;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown_head {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
.dropdown_head_title {
|
||||
cursor: pointer;
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
height: 2.733333333333333em;
|
||||
line-height: 2.666666666666667em;
|
||||
padding-left: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dropdown_head_titlebutton {
|
||||
float: right;
|
||||
}
|
||||
.dropdown_content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
background: #f6f9fc;
|
||||
display: none;
|
||||
width: 20em;
|
||||
height: auto;
|
||||
max-height: 23.333333333333332em;
|
||||
overflow: auto;
|
||||
-webkit-box-shadow: 0 0.066666666666667em 0.266666666666667em #ccc;
|
||||
box-shadow: 0 0.066666666666667em 0.266666666666667em #ccc;
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
.dropdown_content_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1.333333333333333em 1em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.dropdown_content_link:hover,
|
||||
.dropdown_content_link:focus {
|
||||
background: #f8f8f8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdown_content_link:hover .dropdown_content_link_title,
|
||||
.dropdown_content_link:focus .dropdown_content_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.dropdown_content_link_title {
|
||||
color: #008fcc;
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.dropdown_content_link_subtitle {
|
||||
color: #666;
|
||||
font-size: 1.066666666666667em;
|
||||
}
|
||||
.leaderboardquickaccess {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
text-align: right;
|
||||
}
|
||||
.eventheaderwrapper {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='compact'] .eventheader,
|
||||
.eventheaderwrapper[data-navigationtype='compact'] .eventnavigationnormal {
|
||||
display: none;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='normal'] .eventnavigationcompact {
|
||||
display: none;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='normal'] .eventnavigationcompactfloating {
|
||||
-webkit-transition: top 0.4s;
|
||||
-moz-transition: top 0.4s;
|
||||
-o-transition: top 0.4s;
|
||||
-ms-transition: top 0.4s;
|
||||
transition: top 0.4s;
|
||||
}
|
||||
.eventheader {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
background: #f2f2f2;
|
||||
padding: 2em 0;
|
||||
border-bottom: 1px solid darkgray;
|
||||
}
|
||||
.eventheader_intro {
|
||||
padding-left: 10.333333333333334em;
|
||||
min-height: 9.333333333333334em;
|
||||
position: relative;
|
||||
}
|
||||
.eventheader_intro_description {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventheader_intro_logo {
|
||||
-webkit-box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
max-width: 140px;
|
||||
max-height: 140px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.eventheader_intro_logo_image {
|
||||
border: solid 5px #fff;
|
||||
max-height: 100%;
|
||||
}
|
||||
.eventheader_intro_name {
|
||||
display: inline-block;
|
||||
margin: 0 0.333333333333333em 0 0;
|
||||
}
|
||||
.eventheader_intro_details {
|
||||
margin-bottom: 0.666666666666667em;
|
||||
padding-bottom: 0.666666666666667em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.eventheader_intro_details_item {
|
||||
display: inline-block;
|
||||
border-right: 1px solid #ddd;
|
||||
padding: 0.266666666666667em 0.666666666666667em 0.266666666666667em 0;
|
||||
margin-right: 0.666666666666667em;
|
||||
}
|
||||
.eventheader_intro_details_itemlink {
|
||||
color: inherit;
|
||||
}
|
||||
.eventheader_intro_details_item:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
.eventheader_intro_details_item:nth-child(2) {
|
||||
border: none;
|
||||
}
|
||||
.eventheader_intro_details_item:last-child {
|
||||
display: block;
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
@media (min-width: 50em) {
|
||||
.eventheader_intro_details_item:nth-child(2) {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.eventheader_intro_details_item:last-child {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.eventheader_sharing {
|
||||
text-align: right;
|
||||
}
|
||||
.eventheader_sharing_item {
|
||||
display: inline-block;
|
||||
height: 2.666666666666667em;
|
||||
width: 2.666666666666667em;
|
||||
margin-left: 0.333333333333333em;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.eventheader_sharing_itememail {
|
||||
background-color: #f0ab00;
|
||||
background-image: url("images/home/email-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itememail:hover,
|
||||
.eventheader_sharing_itememail:focus {
|
||||
background-color: #d89a00;
|
||||
}
|
||||
.eventheader_sharing_itemtwitter {
|
||||
background-color: #32b5e2;
|
||||
background-image: url("images/home/twitter-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itemtwitter:hover,
|
||||
.eventheader_sharing_itemtwitter:focus {
|
||||
background-color: #1faada;
|
||||
}
|
||||
.eventheader_sharing_itemfacebook {
|
||||
background-color: #3b5998;
|
||||
background-image: url("images/home/facebook-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itemfacebook:hover,
|
||||
.eventheader_sharing_itemfacebook:focus {
|
||||
background-color: #355089;
|
||||
}
|
||||
.locationicon {
|
||||
vertical-align: text-bottom;
|
||||
margin-right: 0.333333333333333em;
|
||||
}
|
||||
.eventnavigation {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventnavigationnormal {
|
||||
position: relative;
|
||||
}
|
||||
.eventnavigationcompact,
|
||||
.eventnavigationcompactfloating {
|
||||
background: #f2f2f2;
|
||||
margin: 0;
|
||||
padding: 1em 0;
|
||||
}
|
||||
.eventnavigationcompact_logo,
|
||||
.eventnavigationcompactfloating_logo {
|
||||
border: solid 2px #fff;
|
||||
-webkit-box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
margin-right: 0.666666666666667em;
|
||||
}
|
||||
.eventnavigationcompactfloating {
|
||||
position: fixed;
|
||||
top: -8em;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
.eventnavigationcompactfloating.eventnavigationfixed {
|
||||
top: 0;
|
||||
}
|
||||
.eventnavigation_link {
|
||||
text-transform: uppercase;
|
||||
margin-right: 0.625em;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.eventnavigation_link:hover,
|
||||
.eventnavigation_link:focus {
|
||||
background-color: #b8b8b8;
|
||||
}
|
||||
.eventnavigation_linkactive {
|
||||
background-color: #f0ab00;
|
||||
}
|
||||
.eventnavigation_linkactive:hover,
|
||||
.eventnavigation_linkactive:focus {
|
||||
background-color: #d89a00;
|
||||
}
|
||||
-354
@@ -1,354 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.header;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.ImageElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.shared.EventDatesFormatterUtil;
|
||||
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public class EventHeader extends AbstractEventComposite {
|
||||
private static EventHeaderUiBinder uiBinder = GWT.create(EventHeaderUiBinder.class);
|
||||
|
||||
interface EventHeaderUiBinder extends UiBinder<Widget, EventHeader> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
// @UiField Anchor overviewLink;
|
||||
@UiField Anchor regattasLink;
|
||||
// @UiField Anchor scheduleLink;
|
||||
// @UiField Anchor mediaLink;
|
||||
//
|
||||
// @UiField Anchor overviewLink2;
|
||||
@UiField Anchor regattasLink2;
|
||||
// @UiField Anchor scheduleLink2;
|
||||
// @UiField Anchor mediaLink2;
|
||||
//
|
||||
// @UiField Anchor overviewLink3;
|
||||
// @UiField Anchor regattasLink3;
|
||||
// @UiField Anchor scheduleLink3;
|
||||
// @UiField Anchor mediaLink3;
|
||||
@UiField Anchor officalWebsiteAnchor;
|
||||
@UiField Anchor twitterAnchor;
|
||||
@UiField Anchor facebookAnchor;
|
||||
@UiField DivElement seriesLeaderboardDiv;
|
||||
@UiField Anchor seriesLeaderboardAnchor;
|
||||
|
||||
@UiField DivElement eventHeaderWrapperDiv;
|
||||
@UiField DivElement regattaNameInSeriesDiv;
|
||||
@UiField SpanElement eventNameSpan;
|
||||
@UiField SpanElement eventName2Span;
|
||||
// @UiField SpanElement eventName3;
|
||||
@UiField DivElement eventDateDiv;
|
||||
@UiField DivElement eventDescriptionDiv;
|
||||
@UiField SpanElement venueNameSpan;
|
||||
@UiField DivElement isLiveDiv;
|
||||
@UiField DivElement isFinishedDiv;
|
||||
|
||||
@UiField ImageElement eventLogo;
|
||||
@UiField ImageElement eventLogo2;
|
||||
// @UiField ImageElement eventLogo3;
|
||||
|
||||
// private final List<Anchor> links1;
|
||||
// private final List<Anchor> links2;
|
||||
// private final List<Anchor> links3;
|
||||
|
||||
private final HomePlacesNavigator placeNavigator;
|
||||
private PlaceNavigation<SeriesPlace> seriesAnalyticsNavigation = null;
|
||||
private PlaceNavigation<MultiregattaRegattasPlace> regattasNavigation = null;
|
||||
|
||||
public EventHeader(EventDTO event, HomePlacesNavigator placeNavigator, EventPlaceNavigator pageNavigator) {
|
||||
super(event, pageNavigator);
|
||||
|
||||
this.placeNavigator = placeNavigator;
|
||||
initResources();
|
||||
|
||||
// links1 = Arrays.asList(new Anchor[] { overviewLink, regattasLink, scheduleLink, mediaLink });
|
||||
// links2 = Arrays.asList(new Anchor[] { overviewLink2, regattasLink2, scheduleLink2, mediaLink2 });
|
||||
// links3 = Arrays.asList(new Anchor[] { overviewLink3, regattasLink3, scheduleLink3, mediaLink3 });
|
||||
// setActiveLink(links1, overviewLink);
|
||||
// setActiveLink(links2, overviewLink2);
|
||||
// setActiveLink(links3, overviewLink3);
|
||||
|
||||
if(event.isRunning()) {
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else if (event.isFinished()) {
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else {
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
setFullsizeHeader();
|
||||
updateUI();
|
||||
}
|
||||
|
||||
public EventHeader(EventDTO event, HomePlacesNavigator placeNavigator) {
|
||||
super(event, null);
|
||||
|
||||
this.placeNavigator = placeNavigator;
|
||||
initResources();
|
||||
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
|
||||
setFullsizeHeader();
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private void initResources() {
|
||||
EventHeaderResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setFullsizeHeader() {
|
||||
eventHeaderWrapperDiv.setAttribute("data-navigationtype", "normal");
|
||||
}
|
||||
|
||||
public void setCompactHeader() {
|
||||
eventHeaderWrapperDiv.setAttribute("data-navigationtype", "compact");
|
||||
EventDTO event = getEvent();
|
||||
|
||||
PlaceNavigation<MultiregattaRegattasPlace> regattaDetailsNavigation = placeNavigator.getEventRegattasNavigation(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattasLink.setHref(regattaDetailsNavigation.getTargetUrl());
|
||||
regattasLink2.setHref(regattaDetailsNavigation.getTargetUrl());
|
||||
}
|
||||
|
||||
private StrippedLeaderboardDTO findLeaderboardWithSameCourseArea(EventDTO event) {
|
||||
for(LeaderboardGroupDTO leaderboardGroup: event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
for(CourseAreaDTO courseArea: event.venue.getCourseAreas()) {
|
||||
if(leaderboard.defaultCourseAreaId != null && leaderboard.defaultCourseAreaId.equals(courseArea.id)) {
|
||||
return leaderboard;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
EventDTO event = getEvent();
|
||||
boolean isSeries = event.isFakeSeries();
|
||||
|
||||
String eventName = event.getName();
|
||||
|
||||
regattasNavigation = placeNavigator.getEventRegattasNavigation(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
if(isSeries) {
|
||||
LeaderboardGroupDTO leaderboardGroupDTO = event.getLeaderboardGroups().get(0);
|
||||
eventName = leaderboardGroupDTO.getDisplayName() != null ? leaderboardGroupDTO.getDisplayName() : leaderboardGroupDTO.getName();
|
||||
|
||||
String overallLeaderboardName = leaderboardGroupDTO.getName() + " " + LeaderboardNameConstants.OVERALL;
|
||||
seriesAnalyticsNavigation = placeNavigator.getSeriesAnalyticsNavigation(event.id.toString(), SeriesNavigationTabs.OverallLeaderboard, overallLeaderboardName, event.getBaseURL(), event.isOnRemoteServer());
|
||||
seriesLeaderboardAnchor.setHref(seriesAnalyticsNavigation.getTargetUrl());
|
||||
|
||||
StrippedLeaderboardDTO leaderboardFittingToEvent = findLeaderboardWithSameCourseArea(event);
|
||||
if (leaderboardFittingToEvent != null) {
|
||||
regattaNameInSeriesDiv.setInnerText(leaderboardFittingToEvent.displayName);
|
||||
} else {
|
||||
regattaNameInSeriesDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
} else {
|
||||
seriesLeaderboardDiv.getStyle().setDisplay(Display.NONE);
|
||||
regattaNameInSeriesDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
eventNameSpan.setInnerHTML(eventName);
|
||||
eventName2Span.setInnerHTML(eventName);
|
||||
// eventName3.setInnerHTML(event.getName());
|
||||
venueNameSpan.setInnerHTML(event.venue.getName());
|
||||
eventDateDiv.setInnerHTML(EventDatesFormatterUtil.formatDateRangeWithYear(event.startDate, event.endDate));
|
||||
|
||||
if(event.getDescription() != null) {
|
||||
eventDescriptionDiv.setInnerHTML(event.getDescription());
|
||||
}
|
||||
if(event.getOfficialWebsiteURL() != null) {
|
||||
String title = event.getOfficialWebsiteURL();
|
||||
if(title.startsWith("http://")) {
|
||||
title = title.substring("http://".length(), title.length());
|
||||
}
|
||||
if(title.length() > 35) {
|
||||
title = TextMessages.INSTANCE.officalEventWebsite();
|
||||
}
|
||||
officalWebsiteAnchor.setText(title);
|
||||
officalWebsiteAnchor.setHref(event.getOfficialWebsiteURL());
|
||||
} else {
|
||||
officalWebsiteAnchor.setVisible(false);
|
||||
}
|
||||
if(event.getTwitterURL() != null) {
|
||||
twitterAnchor.setHref(event.getTwitterURL());
|
||||
} else {
|
||||
twitterAnchor.setVisible(false);
|
||||
}
|
||||
if(event.getFacebookURL() != null) {
|
||||
facebookAnchor.setHref(event.getFacebookURL());
|
||||
} else {
|
||||
facebookAnchor.setVisible(false);
|
||||
}
|
||||
|
||||
String logoUrl = event.getLogoImageURL() != null ? event.getLogoImageURL() : EventHeaderResources.INSTANCE.defaultEventLogoImage().getSafeUri().asString();;
|
||||
eventLogo.setSrc(logoUrl);
|
||||
eventLogo2.setSrc(logoUrl);
|
||||
// eventLogo3.setSrc(logoUrl);
|
||||
}
|
||||
|
||||
// @UiHandler("overviewLink")
|
||||
// void overviewClicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("overviewLink2")
|
||||
// void overview2Clicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("overviewLink3")
|
||||
// void overview3Clicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
|
||||
// private void showOverview() {
|
||||
// pageNavigator.goToOverview();
|
||||
// setActiveLink(links1, overviewLink);
|
||||
// setActiveLink(links2, overviewLink2);
|
||||
// setActiveLink(links3, overviewLink3);
|
||||
// }
|
||||
|
||||
@UiHandler("regattasLink")
|
||||
void regattasClicked(ClickEvent event) {
|
||||
showRegattas(event);
|
||||
}
|
||||
|
||||
@UiHandler("regattasLink2")
|
||||
void regattas2Clicked(ClickEvent event) {
|
||||
showRegattas(event);
|
||||
}
|
||||
|
||||
@UiHandler("seriesLeaderboardAnchor")
|
||||
void seriesLeaderboardClicked(ClickEvent e) {
|
||||
EventDTO event = getEvent();
|
||||
if(event.isFakeSeries()) {
|
||||
handleClickEvent(e, seriesAnalyticsNavigation);
|
||||
}
|
||||
}
|
||||
|
||||
// @UiHandler("regattasLink3")
|
||||
// void regattas3Clicked(ClickEvent event) {
|
||||
// showRegattas();
|
||||
// }
|
||||
//
|
||||
private void showRegattas(ClickEvent e) {
|
||||
handleClickEvent(e, regattasNavigation);
|
||||
// setActiveLink(links1, regattasLink);
|
||||
// setActiveLink(links2, regattasLink2);
|
||||
// setActiveLink(links3, regattasLink3);
|
||||
}
|
||||
|
||||
// @UiHandler("scheduleLink")
|
||||
// void scheduleClicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("scheduleLink2")
|
||||
// void schedule2Clicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("scheduleLink3")
|
||||
// void schedule3Clicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// private void showSchedule() {
|
||||
// pageNavigator.goToSchedule();
|
||||
// setActiveLink(links1, scheduleLink);
|
||||
// setActiveLink(links2, scheduleLink2);
|
||||
// setActiveLink(links3, scheduleLink3);
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink")
|
||||
// void mediaClicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink2")
|
||||
// void media2Clicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink3")
|
||||
// void media3Clicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// private void showMedia() {
|
||||
// pageNavigator.goToMedia();
|
||||
// setActiveLink(links1, mediaLink);
|
||||
// setActiveLink(links2, mediaLink2);
|
||||
// setActiveLink(links3, mediaLink3);
|
||||
// }
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
placeNavigator.goToPlace(placeNavigation);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLoad() {
|
||||
super.onLoad();
|
||||
|
||||
initNormalNavigation();
|
||||
}
|
||||
|
||||
private void initNormalNavigation() {
|
||||
// Window.addWindowScrollHandler(new Window.ScrollHandler() {
|
||||
// public void onWindowScroll(Window.ScrollEvent event) {
|
||||
// int scrollY = Math.max(0, Window.getScrollTop());
|
||||
// int navNormalOffset = eventNavigationNormalDiv.getOffsetTop();
|
||||
//
|
||||
// if (scrollY > navNormalOffset) {
|
||||
// eventNavigationFloatingDiv.addClassName(EventHeaderResources.INSTANCE.css().eventnavigationfixed());
|
||||
// } else {
|
||||
// eventNavigationFloatingDiv.removeClassName(EventHeaderResources.INSTANCE.css()
|
||||
// .eventnavigationfixed());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
// private void setActiveLink(List<Anchor> linksToSet, Anchor link) {
|
||||
// final String activeStyle = EventHeaderResources.INSTANCE.css().eventnavigation_linkactive();
|
||||
// for (Anchor l : linksToSet) {
|
||||
// if (l == link) {
|
||||
// l.addStyleName(activeStyle);
|
||||
// } else {
|
||||
// l.removeStyleName(activeStyle);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.header.EventHeaderResources" />
|
||||
<ui:style>
|
||||
.action {
|
||||
float: right;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.action_link {
|
||||
background-color: #008FCC;
|
||||
color: white;
|
||||
}
|
||||
.action_link:hover {
|
||||
background-color: #0177ab;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- The header of an event including the event navigation-->
|
||||
<div ui:field="eventHeaderWrapperDiv" data-navigationtype="normal" class="{local_res.css.eventheaderwrapper}">
|
||||
<div class="{local_res.css.eventheader}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small9} {res.mediaCss.large8} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventheader_intro}">
|
||||
<div class="{local_res.css.eventheader_intro_logo}"><img ui:field="eventLogo" alt="" class="{local_res.css.eventheader_intro_logo_image}"></img></div>
|
||||
<h3 class="{local_res.css.eventheader_intro_name}"><span ui:field='eventNameSpan' /></h3>
|
||||
<div ui:field="isLiveDiv" data-labeltype="live" class="{res.mainCss.label}"><ui:text from='{i18n.live}'/></div>
|
||||
<div ui:field="isFinishedDiv" data-labeltype="finished" class="{res.mainCss.label}"><ui:text from='{i18n.finished}'/></div>
|
||||
<div class="{local_res.css.eventheader_intro_details}">
|
||||
<div ui:field="regattaNameInSeriesDiv" class="{local_res.css.eventheader_intro_details_item}"></div>
|
||||
<div ui:field="eventDateDiv" class="{local_res.css.eventheader_intro_details_item}"></div>
|
||||
<div class="{local_res.css.eventheader_intro_details_item}">
|
||||
<img src="images/home/location-icon.png" class="{local_res.css.locationicon}"></img>
|
||||
<span ui:field='venueNameSpan' />
|
||||
</div>
|
||||
<g:Anchor ui:field="officalWebsiteAnchor" href="javascript:;" target="_blank" styleName="{local_res.css.eventheader_intro_details_item} {local_res.css.eventheader_intro_details_itemlink}" />
|
||||
</div>
|
||||
<div ui:field="eventDescriptionDiv" class="{local_res.css.eventheader_intro"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.large4} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventheader_sharing}">
|
||||
<g:Anchor ui:field="twitterAnchor" title="{i18n.sharingTwitter}" target="_blank" styleName="{local_res.css.eventheader_sharing_item} {local_res.css.eventheader_sharing_itemtwitter}"></g:Anchor>
|
||||
<g:Anchor ui:field="facebookAnchor" title="{i18n.sharingFacebook}" target="_blank" styleName="{local_res.css.eventheader_sharing_item} {local_res.css.eventheader_sharing_itemfacebook}"></g:Anchor>
|
||||
</div>
|
||||
<div ui:field="seriesLeaderboardDiv" class="{local_res.css.eventheader_sharing}">
|
||||
<div class="{style.action}">
|
||||
<g:Anchor ui:field="seriesLeaderboardAnchor" styleName="{res.mainCss.button} {style.action_link}"><ui:text from='{i18n.overallLeaderboard}'/></g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompact}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
<g:Anchor ui:field="regattasLink">
|
||||
<img ui:field='eventLogo2' alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img>
|
||||
</g:Anchor>
|
||||
<g:Anchor ui:field="regattasLink2" styleName="{res.mainCss.button} {local_res.css.eventnavigation_link}">
|
||||
<span ui:field='eventName2Span' />
|
||||
</g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompactfloating}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.columns}">{#if navigation.isEvent}<a href="event-overview.html"><img src="images/{event.logo}" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img></a><a href="event-overview.html" class="{res.mainCss.button} {local_res.css.eventnavigation_link}">{event.name}</a>{/if navigation.isEvent}{#if navigation.isSeries}<a href="series-overview.html"><img src="images/{event.logo}" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img></a><a href="series-overview.html" class="{res.mainCss.button} {local_res.css.eventnavigation_link}">{event.name}</a>
|
||||
</div></s>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.header;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.CssResource.Shared;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface EventHeaderResources extends ClientBundle {
|
||||
public static final EventHeaderResources INSTANCE = GWT.create(EventHeaderResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/header/EventHeader.gss")
|
||||
LocalCss css();
|
||||
|
||||
@Shared
|
||||
public interface LocalCss extends CssResource {
|
||||
String dropdown();
|
||||
String dropdown_head();
|
||||
String dropdown_head_title();
|
||||
String dropdown_head_titlebutton();
|
||||
String dropdown_content();
|
||||
String dropdown_content_link();
|
||||
String dropdown_content_link_title();
|
||||
String dropdown_content_link_subtitle();
|
||||
String leaderboardquickaccess();
|
||||
String eventheaderwrapper();
|
||||
String eventheader();
|
||||
String eventnavigationnormal();
|
||||
String eventnavigationcompact();
|
||||
String eventnavigationcompactfloating();
|
||||
String eventheader_intro();
|
||||
String eventheader_intro_description();
|
||||
String eventheader_intro_logo();
|
||||
String eventheader_intro_logo_image();
|
||||
String eventheader_intro_name();
|
||||
String eventheader_intro_details();
|
||||
String eventheader_intro_details_item();
|
||||
String eventheader_intro_details_itemlink();
|
||||
String eventheader_sharing();
|
||||
String eventheader_sharing_item();
|
||||
String eventheader_sharing_itememail();
|
||||
String eventheader_sharing_itemtwitter();
|
||||
String eventheader_sharing_itemfacebook();
|
||||
String locationicon();
|
||||
String eventnavigation();
|
||||
String eventnavigation_link();
|
||||
String eventnavigation_linkactive();
|
||||
String eventnavigationcompact_logo();
|
||||
String eventnavigationcompactfloating_logo();
|
||||
String eventnavigationfixed();
|
||||
}
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/images/default_event_logo.jpg")
|
||||
ImageResource defaultEventLogoImage();
|
||||
|
||||
}
|
||||
Whitespace-only changes.
-23
@@ -1,23 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.media;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class EventMedia extends AbstractEventComposite {
|
||||
private static EventMediaUiBinder uiBinder = GWT.create(EventMediaUiBinder.class);
|
||||
|
||||
interface EventMediaUiBinder extends UiBinder<Widget, EventMedia> {
|
||||
}
|
||||
|
||||
public EventMedia(EventDTO event, EventPlaceNavigator placeNavigator) {
|
||||
super(event, placeNavigator);
|
||||
|
||||
EventMediaResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.media.EventMediaResources" />
|
||||
<g:HTMLPanel>
|
||||
Event Media
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.media;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventMediaResources extends ClientBundle {
|
||||
public static final EventMediaResources INSTANCE = GWT.create(EventMediaResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/media/EventMedia.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
|
||||
}
|
||||
}
|
||||
-1
@@ -5,7 +5,6 @@
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources" />
|
||||
<ui:with field="local_res2" type="com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsResources" />
|
||||
<g:HTMLPanel>
|
||||
<div class="{res.mediaCss.grid}" style="margin-left:5rem;margin-right:5rem;">
|
||||
<div class="{res.mediaCss.small6} {res.mediaCss.column} {local_res.css.regattaleaderboard_meta_scoring}">
|
||||
|
||||
-464
@@ -1,464 +0,0 @@
|
||||
/**
|
||||
* The overview page of an event
|
||||
*/
|
||||
.latestraceresults {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
margin-top: 1.875em;
|
||||
margin-bottom: 4.0625em;
|
||||
}
|
||||
.latestraceresults_refresh {
|
||||
float: right;
|
||||
}
|
||||
.latestraceresults_headline {
|
||||
border-bottom: solid 1px #ccc;
|
||||
margin: 0;
|
||||
padding: 0 0 0.5em 0;
|
||||
}
|
||||
.latestraceresults_link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.latestraceresults_link:hover,
|
||||
.latestraceresults_link:focus {
|
||||
text-decoration: none;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.latestraceresults_link:hover .latestraceresults_link_title,
|
||||
.latestraceresults_link:focus .latestraceresults_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.latestraceresults_detail {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.latestraceresults_detail_wrapper {
|
||||
margin-top: 1.25em;
|
||||
}
|
||||
.latestraceresults_detail_wrapper_medal {
|
||||
border-bottom: solid 1px #ccc;
|
||||
padding-top: 0.625em;
|
||||
height: 2.875em;
|
||||
color: #333;
|
||||
}
|
||||
.latestraceresults_detail_wrapper_medal.last {
|
||||
border-bottom: none;
|
||||
}
|
||||
.latestraceresults_detail_wrapper_thumb {
|
||||
border: solid 1px #ccc;
|
||||
}
|
||||
.latestraceresults_detail_wrapper_more {
|
||||
padding: 1.25em 0 0.625em;
|
||||
}
|
||||
.latestraceresults_link,
|
||||
.latestraceresults_detail {
|
||||
display: block;
|
||||
border-bottom: solid 1px #ddd;
|
||||
padding: 0.625em;
|
||||
}
|
||||
.latestraceresults_link_title,
|
||||
.latestraceresults_detail_title {
|
||||
color: #008fcc;
|
||||
float: left;
|
||||
font-weight: 700;
|
||||
}
|
||||
.latestraceresults_link_raceCount,
|
||||
.latestraceresults_detail_raceCount {
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
}
|
||||
.latestraceresults_link_datetime,
|
||||
.latestraceresults_detail_datetime {
|
||||
color: #999;
|
||||
float: right;
|
||||
margin-right: 0.625em;
|
||||
}
|
||||
.columns .latestraceresults_detail_wrapperimage {
|
||||
max-width: none;
|
||||
}
|
||||
.mediateaser {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
margin-top: 1.875em;
|
||||
margin-bottom: 4.0625em;
|
||||
}
|
||||
.mediateaser_title {
|
||||
margin-bottom: 0.375em;
|
||||
}
|
||||
.mediateaser_title_link {
|
||||
color: #008fcc;
|
||||
}
|
||||
.mediateaser_title_value {
|
||||
font-weight: 400;
|
||||
}
|
||||
.mediateaser_photo {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
.mediateaser_photomain {
|
||||
height: 22.1875em;
|
||||
margin-right: -0.9375rem;
|
||||
}
|
||||
.mediateaser_photothumb {
|
||||
height: 10.625em;
|
||||
}
|
||||
.mediateaser_photothumb:first-child {
|
||||
margin-bottom: 0.9375em;
|
||||
}
|
||||
.mediateaser_video {
|
||||
position: relative;
|
||||
height: 26.875em;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
.mediateaser_video:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.playablevideo_buttonplay {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
height: 7.125em;
|
||||
width: 7.125em;
|
||||
margin-top: -3.5625em;
|
||||
margin-left: -3.5625em;
|
||||
background: url("../images/play-icon.png") no-repeat;
|
||||
}
|
||||
.box {
|
||||
display: block;
|
||||
color: inherit;
|
||||
background: #f8f8f8;
|
||||
margin-top: 1.875em;
|
||||
}
|
||||
.boxlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
.boxlink:hover {
|
||||
background: #f0f0f0;
|
||||
text-decoration: none;
|
||||
}
|
||||
.boxlink:hover .box_header {
|
||||
background: #e6e6e6;
|
||||
}
|
||||
.boxlink:hover h2,
|
||||
.boxlink:hover h3,
|
||||
.boxlink:hover h4,
|
||||
.boxlink:hover h5 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.box h2,
|
||||
.box h3,
|
||||
.box h4,
|
||||
.box h5 {
|
||||
margin: 0;
|
||||
}
|
||||
.box_header {
|
||||
background: #eee;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
padding: 1.25em;
|
||||
}
|
||||
.box_header_title {
|
||||
font-size: 1.25em;
|
||||
display: inline-block;
|
||||
}
|
||||
.box_content {
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
padding: 0.9375em 1.25em;
|
||||
}
|
||||
.box_content:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.box_contentlink {
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.box_contentlink:hover,
|
||||
.box_contentlink:focus {
|
||||
background: #f5f5f5;
|
||||
text-decoration: none;
|
||||
}
|
||||
.upcomingraceshort {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
padding: 0.8125em 0.625em;
|
||||
zoom: 1;
|
||||
}
|
||||
.upcomingraceshort:before,
|
||||
.upcomingraceshort:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.upcomingraceshort:after {
|
||||
clear: both;
|
||||
}
|
||||
.upcomingraceshort:hover .upcomingraceshort_name {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.upcomingraceshort_date {
|
||||
float: left;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
}
|
||||
.upcomingraceshort_date_today {
|
||||
font-size: 1.125em;
|
||||
margin: 0.375em 0;
|
||||
}
|
||||
.upcomingraceshort_date_day {
|
||||
font-size: 1.125em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.upcomingraceshort_date_month {
|
||||
font-size: 0.75em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.upcomingraceshort_name {
|
||||
float: left;
|
||||
width: 100%;
|
||||
color: #008fcc;
|
||||
font-size: 1.125em;
|
||||
font-weight: 800;
|
||||
}
|
||||
.upcomingraceshort_subtitle {
|
||||
font-size: 0.875em;
|
||||
font-weight: 600;
|
||||
margin-top: -emCalc(3px);
|
||||
}
|
||||
.upcomingraceshort_details {
|
||||
position: absolute;
|
||||
right: 1.125em;
|
||||
margin-top: 1.5625em;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
.upcomingraceshort_details[data-countdown='true'],
|
||||
.upcomingraceshort_details[data-countdown='data-countdown'] {
|
||||
color: #f00;
|
||||
}
|
||||
.upcomingraceshort_countdown {
|
||||
color: #666;
|
||||
font-size: 0.875em;
|
||||
font-weight: 100;
|
||||
}
|
||||
.weathershort {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
font-weight: 600;
|
||||
background: #eee;
|
||||
height: 5em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.weathershort .grid {
|
||||
height: 100%;
|
||||
float: left;
|
||||
width: 60%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.weathershort_title {
|
||||
float: left;
|
||||
width: 40%;
|
||||
}
|
||||
.weathershort_title h3 {
|
||||
font-size: 1.25em;
|
||||
padding: 1.375em 0 1.375em 0.75em;
|
||||
}
|
||||
.weathershort_data {
|
||||
padding: 2.8125em 0 0 0;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 0.9375em;
|
||||
text-align: center;
|
||||
border-left: solid 1px #ddd;
|
||||
height: 100%;
|
||||
}
|
||||
.weathershort_datatemperature {
|
||||
background-image: url("../images/weather-sunny.png");
|
||||
}
|
||||
.weathershort_datawindspeed {
|
||||
background-image: url("../images/weather-wind-speed.png");
|
||||
}
|
||||
.weathershort_datawinddirection {
|
||||
background-image: url("../images/weather-wind-direction.png");
|
||||
}
|
||||
.newsupdate {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.newsupdate_date {
|
||||
font-size: 0.875em;
|
||||
color: #949494;
|
||||
display: block;
|
||||
}
|
||||
.dropdown {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
width: 18.75em;
|
||||
display: inline-block;
|
||||
}
|
||||
.dropdown:hover .dropdown_content,
|
||||
.dropdown:focus .dropdown_content {
|
||||
display: block;
|
||||
}
|
||||
.dropdown_head {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
.dropdown_head_title {
|
||||
cursor: pointer;
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
height: 2.5625em;
|
||||
line-height: 2.5em;
|
||||
padding-left: 0.9375em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dropdown_head_titlebutton {
|
||||
float: right;
|
||||
}
|
||||
.dropdown_content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
background: #f6f9fc;
|
||||
display: none;
|
||||
width: 18.75em;
|
||||
height: auto;
|
||||
max-height: 21.875em;
|
||||
overflow: auto;
|
||||
-webkit-box-shadow: 0 0.0625em 0.25em #ccc;
|
||||
box-shadow: 0 0.0625em 0.25em #ccc;
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
.dropdown_content_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1.25em 0.9375em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.dropdown_content_link:hover,
|
||||
.dropdown_content_link:focus {
|
||||
background: #f8f8f8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdown_content_link:hover .dropdown_content_link_title,
|
||||
.dropdown_content_link:focus .dropdown_content_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.dropdown_content_link_title {
|
||||
color: #008fcc;
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
font-size: 1.125em;
|
||||
}
|
||||
.dropdown_content_link_subtitle {
|
||||
color: #666;
|
||||
font-size: 1em;
|
||||
}
|
||||
.eventquickfinder.dropdown {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
float: right;
|
||||
}
|
||||
.eventlivebox {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
margin-top: 1.875em;
|
||||
}
|
||||
.eventlivebox_video_container {
|
||||
position: relative;
|
||||
height: 26.875em;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
.eventlivebox_video_container_captionlayer {
|
||||
background: #000;
|
||||
opacity: 0.4;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
|
||||
filter: alpha(opacity=40);
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
height: 5em;
|
||||
width: 100%;
|
||||
}
|
||||
.eventlivebox_video_container_caption {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
font-size: 1.5em;
|
||||
color: #008fcc;
|
||||
font-weight: 700;
|
||||
padding: 0.9375em 1.25em;
|
||||
}
|
||||
.eventlivebox_video_container_caption .label {
|
||||
margin-right: 0.9375em;
|
||||
}
|
||||
.eventlivebox_video_container:hover,
|
||||
.eventlivebox_video_container:focus {
|
||||
cursor: pointer;
|
||||
}
|
||||
.eventlivebox_video_container:hover .eventlivebox_video_container_caption,
|
||||
.eventlivebox_video_container:focus .eventlivebox_video_container_caption {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.eventlivebox_linklist {
|
||||
border-left: solid 1px #ccc;
|
||||
border-right: solid 1px #ccc;
|
||||
}
|
||||
.eventlivebox_linklist_link {
|
||||
display: inline-block;
|
||||
border-bottom: solid 1px #ccc;
|
||||
width: 100%;
|
||||
}
|
||||
.eventlivebox_linklist_link:hover,
|
||||
.eventlivebox_linklist_link:focus {
|
||||
background: #fafafa;
|
||||
text-decoration: none;
|
||||
}
|
||||
.eventlivebox_linklist_link:hover .eventlivebox_linklist_link_title,
|
||||
.eventlivebox_linklist_link:focus .eventlivebox_linklist_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.eventlivebox_linklist_link_icon {
|
||||
float: left;
|
||||
width: 3.625em;
|
||||
height: 3.625em;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left top;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
border: solid 1px #ccc;
|
||||
margin: 1.25em;
|
||||
}
|
||||
.eventlivebox_linklist_link_icon[data-type="audio"] {
|
||||
background-image: url("../images/icon/audio.png");
|
||||
}
|
||||
.eventlivebox_linklist_link_icon[data-type="diagram"] {
|
||||
background-image: url("../images/icon/diagram.png");
|
||||
}
|
||||
.eventlivebox_linklist_link_icon[data-type="video"] {
|
||||
background-image: url("../images/icon/video.png");
|
||||
}
|
||||
.eventlivebox_linklist_link_title {
|
||||
font-weight: 700;
|
||||
display: block;
|
||||
font-size: 1.25em;
|
||||
margin-top: 1.25em;
|
||||
}
|
||||
.eventlivebox_linklist_link_title .label {
|
||||
margin: -0.25em 0 0 0.3125em;
|
||||
}
|
||||
.eventlivebox_linklist_link_description {
|
||||
color: #666;
|
||||
padding-right: 0.625em;
|
||||
}
|
||||
.eventoverview {
|
||||
font-size: 16px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.overview;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class EventOverview extends AbstractEventComposite {
|
||||
private static EventOverviewUiBinder uiBinder = GWT.create(EventOverviewUiBinder.class);
|
||||
|
||||
interface EventOverviewUiBinder extends UiBinder<Widget, EventOverview> {
|
||||
}
|
||||
|
||||
public EventOverview(EventDTO event, EventPlaceNavigator pageNavigator) {
|
||||
super(event, pageNavigator);
|
||||
|
||||
EventOverviewResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
}
|
||||
}
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.overview.EventOverviewResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- The overview page of an event-->
|
||||
|
||||
<!-- Ubilabs has to cut this page into partials
|
||||
<div class="{local_res.css.eventoverview}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small8} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventlivebox}">
|
||||
<figure class="{local_res.css.eventlivebox_video} {local_res.css.videowrapper}">
|
||||
<div style="background-image: url({event.livebox.video.preview});" data-src="{event.livebox.video.src}" class="{local_res.css.eventlivebox_video_container} {local_res.css.playablevideo}"><span class="{local_res.css.playablevideo_buttonplay}"></span>
|
||||
<div class="{local_res.css.eventlivebox_video_container_captionlayer}"></div>
|
||||
<figcaption class="{local_res.css.eventlivebox_video_container_caption}">{#if event.livebox.isLive}
|
||||
<div data-labeltype="live" class="{res.mainCss.label}">Live</div>{/if event.livebox.isLive}{event.livebox.caption}
|
||||
</figcaption>
|
||||
</div>
|
||||
</figure>
|
||||
<div class="{local_res.css.eventlivebox_linklist}"><a href="{link.url}" class="{local_res.css.eventlivebox_linklist_link}"><span data-type="{link.icon}" class="{local_res.css.eventlivebox_linklist_link_icon}"></span><strong class="{local_res.css.eventlivebox_linklist_link_title}">{link.title}{#if link.isLive}
|
||||
<div data-labeltype="live" class="{res.mainCss.label}">Live</div>{/if link.isLive}</strong>
|
||||
<div class="{local_res.css.eventlivebox_linklist_link_description}">{link.description}
|
||||
</div></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.latestraceresults}">
|
||||
<h3 class="{local_res.css.latestraceresults_headline}">Latest Official Race Results
|
||||
<button class="{local_res.css.latestraceresults_refresh} {res.mainCss.button} {res.mainCss.buttonrefresh}">refresh</button>
|
||||
</h3>{#if result.details}
|
||||
<div class="{local_res.css.latestraceresults_detail}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.columns} {local_res.css.latestraceresults_detail_title}">{result.title}
|
||||
</div>
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.columns} {local_res.css.latestraceresults_detail_raceCount}">Result after {result.totalRaces} races
|
||||
</div>
|
||||
<div class="{res.mediaCss.small6} {res.mediaCss.columns}">{#if result.isNew}
|
||||
<div data-labeltype="new" class="{res.mainCss.label}">New</div>{else}{/if result.isNew}{#if result.isUpdated}
|
||||
<div data-labeltype="updated" class="{res.mainCss.label}">Updated</div>{else}{/if result.isUpdated}
|
||||
<div class="{local_res.css.latestraceresults_detail_datetime}">{result.time}
|
||||
</div>
|
||||
<div class="{local_res.css.latestraceresults_detail_datetime}">Last update: {result.date}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.grid} {local_res.css.latestraceresults_detail_wrapper}">
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.columns}"><img src="{result.details.thumb.url}" alt="{result.details.thumb.altText}" class="{local_res.css.latestraceresults_detail_wrapper_thumb}"></img></div>
|
||||
<div class="{res.mediaCss.small9} {res.mediaCss.columns}">
|
||||
<div data-rank="{competitor.rank}" class="{local_res.css.leaderboardcompetitor} {local_res.css.leaderboardcompetitorshort}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small1} {res.mediaCss.columns} {local_res.css.leaderboardcompetitor_itemcenter}">
|
||||
<div class="{local_res.css.leaderboardcompetitor_rank}">{competitor.rank}</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small1} {res.mediaCss.columns}"><img src="assets/flags/{competitor.countryCode}.png" alt="{competitor.countryCode}" width="32" height="32" class="{local_res.css.latestraceresults_detail_wrapperimage} {local_res.css.leaderboardcompetitor_nationality}"></img></div>
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">{competitor.sailID}</div>
|
||||
<div class="{res.mediaCss.small7} {res.mediaCss.columns}">{competitor.displayName}</div>
|
||||
<div class="{res.mediaCss.small1} {res.mediaCss.columns} {local_res.css.leaderboardcompetitor_itemcenter}">{competitor.totalPoints}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.latestraceresults_detail_wrapper_more}"><a href="{result.details.moreLink}" class="{res.mainCss.button}"> Leaderboard</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>{else}<a href="{result.link}" class="{local_res.css.latestraceresults_link}"><span class="{res.mediaCss.grid}"><span class="{res.mediaCss.small3} {res.mediaCss.columns} {local_res.css.latestraceresults_link_title}">{result.title}</span><span class="{res.mediaCss.small3} {res.mediaCss.columns} {local_res.css.latestraceresults_link_raceCount}">Result after {result.totalRaces} races</span><span class="{res.mediaCss.small6} {res.mediaCss.columns}"><span data-labeltype="new" class="{res.mainCss.label}">New</span><span data-labeltype="updated" class="{res.mainCss.label}">Updated</span><span class="{local_res.css.latestraceresults_link_datetime}">{result.time}</span><span class="{local_res.css.latestraceresults_link_datetime}">{result.date}</span></span></span></a>{/if result.details}
|
||||
</div>
|
||||
<div class="{local_res.css.mediateaser} {local_res.css.mediateaserphotos}">
|
||||
<h3 class="{local_res.css.mediateaser_title}"><a href="event-media.html" class="{local_res.css.mediateaser_title_link}">Photos <span class="{local_res.css.mediateaser_title_value}">({event.photosCount})</span></a></h3>
|
||||
<div class="{res.mediaCss.grid} {local_res.css.lightbox}">
|
||||
<div class="{local_res.css.lightbox_data}">{event.photos[0].thumb},{event.photos[0].file},{event.photos[0].title};{event.photos[1].thumb},{event.photos[1].file},{event.photos[1].title};{event.photos[2].thumb},{event.photos[2].file},{event.photos[2].title};
|
||||
</div>
|
||||
<div class="{res.mediaCss.small9} {res.mediaCss.columns}">
|
||||
<div title="{event.photos[0].title}" data-src="{event.photos[0].file}" style="background-image: url(images/{event.photos[0].thumb});" class="{local_res.css.lightbox_photo} {local_res.css.mediateaser_photo} {local_res.css.mediateaser_photomain}"></div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.columns}">
|
||||
<div title="{event.photos[1].title}" data-src="{event.photos[1].file}" style="background-image: url(images/{event.photos[1].thumb});" class="{local_res.css.lightbox_photo} {local_res.css.mediateaser_photo} {local_res.css.mediateaser_photothumb}"></div>
|
||||
<div title="{event.photos[2].title}" data-src="{event.photos[2].file}" style="background-image: url(images/{event.photos[2].thumb});" class="{local_res.css.lightbox_photo} {local_res.css.mediateaser_photo} {local_res.css.mediateaser_photothumb}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.mediateaser} {local_res.css.mediateaservideos} {local_res.css.videowrapper}">
|
||||
<h3 class="{local_res.css.mediateaser_title}"><a href="event-media.html" class="{local_res.css.mediateaser_title_link}">Videos <span class="{local_res.css.mediateaser_title_value}">({event.videosCount})</span></a></h3>
|
||||
<div style="background-image: url(images/{event.videos[0].preview});" data-src="undefined" class="{local_res.css.mediateaser_video} {local_res.css.playablevideo}"><span class="{local_res.css.playablevideo_buttonplay}"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small4} {res.mediaCss.columns}">{#if event.liveNow}<a href="{event.liveNow.regatta.series.race.link}" class="{local_res.css.box} {local_res.css.boxlink}">
|
||||
<div class="{local_res.css.box_header}">
|
||||
<h3 class="{local_res.css.box_header_title}">{event.liveNow.regatta.name}</h3>
|
||||
<div data-labeltype="live" class="{res.mainCss.label}">Live</div>
|
||||
</div><img src="images/{event.liveNow.preview}" alt=""></img>
|
||||
<div class="{local_res.css.box_content}">
|
||||
<h5>{event.liveNow.regatta.series.name} - {event.liveNow.regatta.series.race.name}
|
||||
</h5>{event.liveNow.regatta.series.race.details}
|
||||
</div></a>{/if event.liveNow}{#if event.upcoming}
|
||||
<div class="{local_res.css.box}">
|
||||
<div class="{local_res.css.box_header}">
|
||||
<h3 class="{local_res.css.box_header_title}">Upcoming Races Today</h3>
|
||||
</div>{#each race in event.upcoming.races}<a href="{race.link}" class="{local_res.css.box_content} {local_res.css.box_contentlink} {local_res.css.upcomingraceshort}">
|
||||
<div class="{local_res.css.upcomingraceshort_name}">{race.name}
|
||||
<div class="{local_res.css.upcomingraceshort_subtitle}"></div></div>
|
||||
<div data-countdown="{race.isCountdown}" class="{local_res.css.upcomingraceshort_details}">{#if race.isLive}
|
||||
<div data-labeltype="live" class="{res.mainCss.label}">Live</div>{else}{/if race.isLive}
|
||||
</div>
|
||||
<div class="{local_res.css.upcomingraceshort_countdown}">Starting in hrs and minutes
|
||||
</div></a>{/each event.upcoming.races}<a href="event-schedule.html" class="{local_res.css.box_content} {res.mainCss.morelink}">Event Schedule</a>
|
||||
</div>{/if event.upcoming}{#if event.weather}
|
||||
<div class="{local_res.css.box} {local_res.css.weathershort}">
|
||||
<div class="{local_res.css.weathershort_title}">
|
||||
<h3>Weather</h3>
|
||||
</div>
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small4} {res.mediaCss.columns} {local_res.css.weathershort_data} {local_res.css.weathershort_datawindspeed}"><span class="{local_res.css.weathershort_data_value}">{event.weather.windSpeed}</span><span class="{local_res.css.weathershort_data_unit}"> KTS</span></div>
|
||||
<div class="{res.mediaCss.small4} {res.mediaCss.columns} {local_res.css.weathershort_data} {local_res.css.weathershort_datawinddirection}"><span class="{local_res.css.weathershort_data_value}">{event.weather.windDirection}</span>°</div>
|
||||
<div data-currentweather="{event.weather.current}" class="{res.mediaCss.small4} {res.mediaCss.columns} {local_res.css.weathershort_data} {local_res.css.weathershort_datatemperature}"><span class="{local_res.css.weathershort_data_value}">{event.weather.temperature}</span>°</div>
|
||||
</div>
|
||||
</div>{/if event.weather}{#if event.news}
|
||||
<div class="{local_res.css.box}">
|
||||
<div class="{local_res.css.box_header}">
|
||||
<h3 class="{local_res.css.box_header_title}">News Update</h3>
|
||||
</div>{#each message in event.news.messages}<a href="{message.link}" class="{local_res.css.box_content} {local_res.css.box_contentlink} {local_res.css.newsupdate}"><span class="{local_res.css.newsupdate_date}">{message.date}</span><span>{message.text}</span></a>{#each message in event.news.messages}<a href="#" class="{local_res.css.box_content} {res.mainCss.morelink}">Report news</a>
|
||||
</div>{/if event.news}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-86
@@ -1,86 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.overview;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventOverviewResources extends ClientBundle {
|
||||
public static final EventOverviewResources INSTANCE = GWT.create(EventOverviewResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/overview/EventOverview.gss")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String latestraceresults();
|
||||
String latestraceresults_refresh();
|
||||
String latestraceresults_headline();
|
||||
String latestraceresults_link();
|
||||
String latestraceresults_link_title();
|
||||
String latestraceresults_detail();
|
||||
String latestraceresults_detail_wrapper();
|
||||
String latestraceresults_detail_wrapper_medal();
|
||||
String last();
|
||||
String latestraceresults_detail_wrapper_thumb();
|
||||
String latestraceresults_detail_wrapper_more();
|
||||
String latestraceresults_detail_title();
|
||||
String latestraceresults_link_raceCount();
|
||||
String latestraceresults_detail_raceCount();
|
||||
String latestraceresults_link_datetime();
|
||||
String latestraceresults_detail_datetime();
|
||||
String columns();
|
||||
String latestraceresults_detail_wrapperimage();
|
||||
String mediateaser();
|
||||
String mediateaser_title();
|
||||
String mediateaser_title_link();
|
||||
String mediateaser_title_value();
|
||||
String mediateaser_photo();
|
||||
String mediateaser_photomain();
|
||||
String mediateaser_photothumb();
|
||||
String mediateaser_video();
|
||||
String playablevideo_buttonplay();
|
||||
String box();
|
||||
String boxlink();
|
||||
String box_header();
|
||||
String box_header_title();
|
||||
String box_content();
|
||||
String box_contentlink();
|
||||
String upcomingraceshort();
|
||||
String upcomingraceshort_name();
|
||||
String upcomingraceshort_date();
|
||||
String upcomingraceshort_date_today();
|
||||
String upcomingraceshort_date_day();
|
||||
String upcomingraceshort_date_month();
|
||||
String upcomingraceshort_subtitle();
|
||||
String upcomingraceshort_details();
|
||||
String upcomingraceshort_countdown();
|
||||
String weathershort();
|
||||
String grid();
|
||||
String weathershort_title();
|
||||
String weathershort_data();
|
||||
String weathershort_datatemperature();
|
||||
String weathershort_datawindspeed();
|
||||
String weathershort_datawinddirection();
|
||||
String newsupdate();
|
||||
String newsupdate_date();
|
||||
String dropdown();
|
||||
String dropdown_content();
|
||||
String dropdown_head();
|
||||
String dropdown_head_title();
|
||||
String dropdown_head_titlebutton();
|
||||
String dropdown_content_link();
|
||||
String dropdown_content_link_title();
|
||||
String dropdown_content_link_subtitle();
|
||||
String eventquickfinder();
|
||||
String eventlivebox();
|
||||
String eventlivebox_video_container();
|
||||
String eventlivebox_video_container_captionlayer();
|
||||
String eventlivebox_video_container_caption();
|
||||
String label();
|
||||
String eventlivebox_linklist();
|
||||
String eventlivebox_linklist_link();
|
||||
String eventlivebox_linklist_link_title();
|
||||
String eventlivebox_linklist_link_icon();
|
||||
String eventlivebox_linklist_link_description();
|
||||
String eventoverview();
|
||||
}
|
||||
}
|
||||
-190
@@ -1,190 +0,0 @@
|
||||
.regatta {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding: 1.333333333333333em 0;
|
||||
}
|
||||
.regatta[data-rendermode='compact'] {
|
||||
border-top: 1px solid #ccc;
|
||||
padding-left: 4em;
|
||||
padding-right: 4em;
|
||||
}
|
||||
.regatta[data-rendermode='compact'] .regatta_intro_details_itemhideoncompact {
|
||||
display: none;
|
||||
}
|
||||
.regatta[data-rendermode='link']:hover,
|
||||
.regatta[data-rendermode='link']:focus {
|
||||
background-color: #fcfcfc;
|
||||
}
|
||||
.regatta[data-rendermode='link']:nth-child(odd) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.regatta[data-rendermode='link']:nth-child(odd):hover,
|
||||
.regatta[data-rendermode='link']:nth-child(odd):focus {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
.regatta_intro {
|
||||
display: block;
|
||||
padding-left: 10.333333333333334em;
|
||||
min-height: 9.333333333333334em;
|
||||
position: relative;
|
||||
}
|
||||
.regatta_intro:hover,
|
||||
.regatta_intro:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
.regatta_intro_image {
|
||||
border: 1px solid #ccc;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.regatta_intro_header {
|
||||
margin-bottom: 0.666666666666667em;
|
||||
padding-top: 0.333333333333333em;
|
||||
padding-bottom: 0.666666666666667em;
|
||||
border-bottom: 1px solid #ccc;
|
||||
position: relative;
|
||||
}
|
||||
.regatta_intro_header_name {
|
||||
display: inline-block;
|
||||
font-size: 1.333333333333333em;
|
||||
margin: 0;
|
||||
margin-right: 0.266666666666667em;
|
||||
}
|
||||
.regatta_intro_header_namelink:hover,
|
||||
.regatta_intro_header_namelink:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.regatta_intro_header_details {
|
||||
text-align: right;
|
||||
}
|
||||
.regatta_intro_header_details_item {
|
||||
display: inline-block;
|
||||
padding: 0.2em 1em 0.2em 0;
|
||||
margin-right: 1em;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.regatta_intro_header_details_item:last-child {
|
||||
padding-right: 0;
|
||||
margin-right: 0;
|
||||
border-right-width: 0;
|
||||
}
|
||||
.regatta_intro_header_details_item_value {
|
||||
color: #008fcc;
|
||||
font-weight: 700;
|
||||
}
|
||||
.regatta_intro_header_details_label {
|
||||
vertical-align: middle;
|
||||
margin-top: -0.2em;
|
||||
}
|
||||
.regatta_intro_phases {
|
||||
position: relative;
|
||||
padding-right: 10em;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 0.666666666666667em;
|
||||
}
|
||||
.regatta_intro_phases_phase {
|
||||
display: block;
|
||||
margin-right: 1.333333333333333em;
|
||||
padding: 0.133333333333333em 1.333333333333333em 0.133333333333333em 0;
|
||||
min-height: 2.666666666666667em;
|
||||
|
||||
}
|
||||
@media (min-width: 50em) {
|
||||
.regatta_intro_phases_phase {
|
||||
display: inline-block;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
.regatta_intro_phases_phase_name {
|
||||
font-size: 0.866666666666667em;
|
||||
}
|
||||
.regatta_intro_phases_phase_races {
|
||||
display: inline-block;
|
||||
}
|
||||
.regatta_intro_phases_phase_races_race {
|
||||
display: inline-block;
|
||||
background-color: #ccc;
|
||||
height: 0.666666666666667em;
|
||||
width: 1.333333333333333em;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.regatta_intro_phases_phase_races_race[data-status='live'] {
|
||||
background-color: #f00;
|
||||
}
|
||||
.regatta_intro_phases_phase_races_race[data-status='finished'] {
|
||||
background-color: #f0ab00;
|
||||
}
|
||||
.regatta_intro_phases_leaderboardlink {
|
||||
text-transform: uppercase;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #008FCC;
|
||||
color: white;
|
||||
}
|
||||
.regatta_intro_phases_leaderboardlink:hover {
|
||||
background-color: #0177ab;
|
||||
}
|
||||
|
||||
.regatta_intro_scheduled {
|
||||
padding-top: 0.8em;
|
||||
}
|
||||
.regatta_intro_results {
|
||||
padding-top: 0.6em;
|
||||
}
|
||||
.regatta_intro_results_competitor {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
display: inline-block;
|
||||
max-width: 32%;
|
||||
padding: 0.2em 1.333333333333333em;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.regatta_intro_results_competitor:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
.regatta_intro_results_competitor:last-child {
|
||||
padding-right: 0;
|
||||
border-right-width: 0;
|
||||
}
|
||||
.regatta_intro_results_competitor_name {
|
||||
font-weight: 700;
|
||||
color: #008fcc;
|
||||
}
|
||||
.regatta_intro_fleets {
|
||||
width: 100%;
|
||||
}
|
||||
.regatta_intro_fleets_fleet {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.regatta_intro_fleets_fleet:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.regatta_intro_fleets_fleet_item {
|
||||
margin: 0.4em 0;
|
||||
padding: 0.4em 1.333333333333333em;
|
||||
border-left: 1px solid #ccc;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.regatta_intro_fleets_fleet_itemfirst {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.regatta_intro_fleets_fleet_item_value {
|
||||
font-weight: 700;
|
||||
color: #008fcc;
|
||||
}
|
||||
.regatta_intro_fleets_fleet_item_flag {
|
||||
width: 2em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.regatta_intro_fleets_fleet_live {
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
}
|
||||
-185
@@ -1,185 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.HeadingElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.gwt.common.client.BoatClassImageResolver;
|
||||
import com.sap.sailing.gwt.common.client.BoatClassImageResources;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.shared.LongNamesUtil;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class Regatta extends Composite {
|
||||
private static RegattaUiBinder uiBinder = GWT.create(RegattaUiBinder.class);
|
||||
|
||||
interface RegattaUiBinder extends UiBinder<Widget, Regatta> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
private final EventDTO event;
|
||||
private final Timer timerForClientServerOffset;
|
||||
private RaceGroupDTO raceGroup;
|
||||
private final List<RegattaPhase> phasesElements;
|
||||
private LeaderboardGroupDTO leaderboardGroup;
|
||||
private final boolean isSingleView;
|
||||
|
||||
@UiField DivElement regattaDiv;
|
||||
@UiField HeadingElement regattaNameHeading;
|
||||
@UiField DivElement leaderboardGroupName;
|
||||
@UiField DivElement leaderboardGroupNameDiv;
|
||||
// @UiField SpanElement scheduledStart;
|
||||
@UiField DivElement regattaPhasesPanel;
|
||||
@UiField DivElement regattaPhasesInfoDiv;
|
||||
|
||||
@UiField SpanElement competitorsCount;
|
||||
@UiField DivElement competitorsCountDiv;
|
||||
@UiField SpanElement racesCount;
|
||||
@UiField SpanElement trackedRacesCount;
|
||||
@UiField DivElement isLiveDiv;
|
||||
// @UiField TableElement isLiveDiv2;
|
||||
// @UiField DivElement isFinishedDiv;
|
||||
// @UiField DivElement isFinishedDiv2;
|
||||
// @UiField DivElement isScheduledDiv;
|
||||
// @UiField AnchorElement leaderboardLink;
|
||||
// @UiField DivElement liveRaceInfosPerFleetPanel;
|
||||
// @UiField(provided=true) RegattaCompetitor competitorWithRank1;
|
||||
// @UiField(provided=true) RegattaCompetitor competitorWithRank2;
|
||||
// @UiField(provided=true) RegattaCompetitor competitorWithRank3;
|
||||
|
||||
@UiField Anchor regattaDetailsLink;
|
||||
@UiField Anchor leaderboardLink;
|
||||
|
||||
@UiField Image boatClassImage;
|
||||
|
||||
private PlaceNavigation<RegattaLeaderboardPlace> leaderboardNavigation;
|
||||
private PlaceNavigation<AbstractEventRegattaPlace> regattaNavigation;
|
||||
private final HomePlacesNavigator placesNavigator;
|
||||
private final EventPlaceNavigator eventPlaceNavigator;
|
||||
|
||||
public Regatta(EventDTO event, Timer timerForClientServerOffset, boolean isSingleView, HomePlacesNavigator placesNavigator, EventPlaceNavigator eventPlaceNavigator) {
|
||||
this.event = event;
|
||||
this.timerForClientServerOffset = timerForClientServerOffset;
|
||||
this.isSingleView = isSingleView;
|
||||
this.placesNavigator = placesNavigator;
|
||||
this.eventPlaceNavigator = eventPlaceNavigator;
|
||||
|
||||
phasesElements = new ArrayList<RegattaPhase>();
|
||||
|
||||
// competitorWithRank1 = new RegattaCompetitor(1, null);
|
||||
// competitorWithRank2 = new RegattaCompetitor(2, null);
|
||||
// competitorWithRank3 = new RegattaCompetitor(3, null);
|
||||
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setData(LeaderboardGroupDTO leaderboardGroup, boolean hasMultipleLeaderboardGroups, StrippedLeaderboardDTO leaderboard,
|
||||
RaceGroupDTO raceGroup) {
|
||||
this.raceGroup = raceGroup;
|
||||
this.leaderboardGroup = leaderboardGroup;
|
||||
|
||||
if(isSingleView) {
|
||||
regattaDetailsLink.setVisible(false);
|
||||
leaderboardNavigation = placesNavigator.getLeaderboardNavigation(event.id.toString(),
|
||||
leaderboard.name, event.getBaseURL(), event.isOnRemoteServer());
|
||||
leaderboardLink.setHref(leaderboardNavigation.getTargetUrl());
|
||||
} else {
|
||||
leaderboardLink.setVisible(false);
|
||||
regattaNavigation = placesNavigator.getRegattaNavigation(event.id.toString(), leaderboard.name, event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattaDetailsLink.setHref(regattaNavigation.getTargetUrl());
|
||||
}
|
||||
|
||||
boolean hasLiveRace = leaderboard.hasLiveRace(timerForClientServerOffset.getLiveTimePointInMillis());
|
||||
if(!hasLiveRace) {
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
// boolean isFinished... TODO
|
||||
if(raceGroup.boatClass != null) {
|
||||
boatClassImage.setResource(BoatClassImageResolver.getBoatClassIconResource(raceGroup.boatClass));
|
||||
} else {
|
||||
boatClassImage.setResource(BoatClassImageResources.INSTANCE.genericBoatClass());
|
||||
}
|
||||
|
||||
String regattaDisplayName = leaderboard.displayName != null ? leaderboard.displayName : leaderboard.name;
|
||||
regattaNameHeading.setInnerText(regattaDisplayName);
|
||||
if(hasMultipleLeaderboardGroups && leaderboardGroup.getName() != null) {
|
||||
leaderboardGroupName.setInnerText(LongNamesUtil.shortenLeaderboardGroupName(event.getName(), leaderboardGroup.getName()));
|
||||
leaderboardGroupName.setAttribute("data-labeltype", "group1");
|
||||
} else {
|
||||
leaderboardGroupNameDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
if(leaderboard.competitorsCount > 0) {
|
||||
competitorsCount.setInnerText(String.valueOf(leaderboard.competitorsCount));
|
||||
} else {
|
||||
competitorsCountDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
setRegattaProgress(leaderboard);
|
||||
}
|
||||
|
||||
private void setRegattaProgress(StrippedLeaderboardDTO leaderboard) {
|
||||
// clear first
|
||||
regattaPhasesPanel.removeAllChildren();
|
||||
phasesElements.clear();
|
||||
|
||||
if(raceGroup != null) {
|
||||
if(raceGroup.getSeries().size() == 0) {
|
||||
regattaPhasesInfoDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else {
|
||||
for(RaceGroupSeriesDTO series: raceGroup.getSeries()) {
|
||||
RegattaPhase regattaPhase = new RegattaPhase(series, leaderboardGroup,
|
||||
leaderboard, raceGroup, eventPlaceNavigator, timerForClientServerOffset);
|
||||
regattaPhasesPanel.appendChild(regattaPhase.getElement());
|
||||
phasesElements.add(regattaPhase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
racesCount.setInnerText(String.valueOf(leaderboard.getRacesCount()));
|
||||
trackedRacesCount.setInnerText(String.valueOf(leaderboard.getTrackedRacesCount()));
|
||||
}
|
||||
|
||||
@UiHandler("regattaDetailsLink")
|
||||
void regattaDetailsLinkClicked(ClickEvent e) {
|
||||
handleClickEvent(e, regattaNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("leaderboardLink")
|
||||
void leaderboardLinkClicked(ClickEvent e) {
|
||||
handleClickEvent(e, leaderboardNavigation);
|
||||
}
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
placesNavigator.goToPlace(placeNavigation);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regatta.RegattaResources" />
|
||||
<g:HTMLPanel>
|
||||
<!-- A view, introducing a regatta-->
|
||||
<div ui:field="regattaDiv" class="{local_res.css.regatta}" data-labeltype="">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.regatta_intro}">
|
||||
<div>
|
||||
<g:Image ui:field="boatClassImage" height="140" width="140" styleName="{local_res.css.regatta_intro_image}"></g:Image>
|
||||
</div>
|
||||
<div class="{local_res.css.regatta_intro_header}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small4} {res.mediaCss.columns}">
|
||||
<h3 ui:field="regattaNameHeading" class="{local_res.css.regatta_intro_header_name}"></h3>
|
||||
<div ui:field="isLiveDiv" data-labeltype="live" class="{res.mainCss.label}"><ui:text from='{i18n.live}'/></div>
|
||||
<!-- not used as long as we don't have start and end date of regatta
|
||||
<div ui:field="isFinishedDiv" data-labeltype="finished" class="{res.mainCss.label}"><ui:text from='{i18n.finished}'/></div>
|
||||
-->
|
||||
</div>
|
||||
<div class="{res.mediaCss.small8} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.regatta_intro_header_details}">
|
||||
<div ui:field="competitorsCountDiv" class="{local_res.css.regatta_intro_header_details_item}"><ui:text from='{i18n.regattaCompetitors}'/> <span class="{local_res.css.regatta_intro_header_details_item_value}"><span ui:field="competitorsCount" /></span></div>
|
||||
<div class="{local_res.css.regatta_intro_header_details_item}"><ui:text from='{i18n.regattaRaces}'/> <span class="{local_res.css.regatta_intro_header_details_item_value}"><span ui:field="racesCount" /></span></div>
|
||||
<div class="{local_res.css.regatta_intro_header_details_item}"><ui:text from='{i18n.regattaTracked}'/> <span class="{local_res.css.regatta_intro_header_details_item_value}"><span ui:field="trackedRacesCount" /></span></div>
|
||||
<div ui:field="leaderboardGroupNameDiv" class="{local_res.css.regatta_intro_header_details_item}">
|
||||
<div ui:field="leaderboardGroupName" data-labeltype="" class="{local_res.css.regatta_intro_header_details_label} {res.mainCss.label}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ui:field="regattaPhasesInfoDiv" class="{local_res.css.regatta_intro_phases}">
|
||||
<div ui:field="regattaPhasesPanel" />
|
||||
<g:Anchor ui:field="regattaDetailsLink" styleName="{local_res.css.regatta_intro_phases_leaderboardlink} {res.mainCss.button}"><ui:text from='{i18n.regattaDetails}'/></g:Anchor>
|
||||
<g:Anchor ui:field="leaderboardLink" styleName="{local_res.css.regatta_intro_phases_leaderboardlink} {res.mainCss.button}"><ui:text from='{i18n.leaderboard}'/></g:Anchor>
|
||||
</div>
|
||||
<!--
|
||||
<div ui:field="isScheduledDiv" class="{local_res.css.regatta_intro_scheduled}">
|
||||
<ui:text from='{i18n.regattaRegattaStarts}'/>: <span ui:field="scheduledStart" />
|
||||
</div>
|
||||
<div ui:field="isFinishedDiv2" class="{local_res.css.regatta_intro_results}">
|
||||
<s:regatta.RegattaCompetitor ui:field="competitorWithRank1" />
|
||||
<s:regatta.RegattaCompetitor ui:field="competitorWithRank2" />
|
||||
<s:regatta.RegattaCompetitor ui:field="competitorWithRank3" />
|
||||
</div>
|
||||
<table ui:field="isLiveDiv2" class="{local_res.css.regatta_intro_fleets}">
|
||||
<div ui:field="liveRaceInfosPerFleetPanel" />
|
||||
</table>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.dto.CompetitorDTO;
|
||||
|
||||
public class RegattaCompetitor extends Composite {
|
||||
private static RegattaCompetitorUiBinder uiBinder = GWT.create(RegattaCompetitorUiBinder.class);
|
||||
|
||||
interface RegattaCompetitorUiBinder extends UiBinder<Widget, RegattaCompetitor> {
|
||||
}
|
||||
|
||||
@UiField SpanElement competitorRank;
|
||||
@UiField SpanElement competitorNationality;
|
||||
@UiField SpanElement competitorName;
|
||||
@UiField SpanElement competitorTotalPoints;
|
||||
|
||||
public RegattaCompetitor(Integer rank, CompetitorDTO competitor) {
|
||||
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
competitorRank.setInnerText(String.valueOf(rank));
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regatta.RegattaResources" />
|
||||
<ui:style>
|
||||
.panel {
|
||||
display: inline-block;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel styleName="{style.panel}">
|
||||
<div class="{local_res.css.regatta_intro_results_competitor}">
|
||||
<span ui:field="competitorRank" />. <span ui:field="competitorNationality" /> - <span class="{local_res.css.regatta_intro_results_competitor_name}"><span ui:field="competitorName" /></span> - <span ui:field="competitorTotalPoints" /><ui:text from='{i18n.regattaPts}'/>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class RegattaFleet extends Composite {
|
||||
private static RegattaFleetUiBinder uiBinder = GWT.create(RegattaFleetUiBinder.class);
|
||||
|
||||
interface RegattaFleetUiBinder extends UiBinder<Widget, RegattaFleet> {
|
||||
}
|
||||
|
||||
public RegattaFleet() {
|
||||
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regatta.RegattaResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<tr class="{local_res.css.regatta_intro_fleets_fleet}">
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item} {local_res.css.regatta_intro_fleets_fleet_itemfirst}">{fleet.name}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item}">{fleet.phase.name} - <span class="{local_res.css.regatta_intro_fleets_fleet_item_value}">{fleet.race.name}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item} {res.mediaCss.hideonsmall}">
|
||||
{#if regatta.isScheduled}<ui:text from='{i18n.regattaScheduledAt}'/> {/if regatta.isScheduled}
|
||||
{#if regatta.isLive}<ui:text from='{i18n.regattaStartedAt}'/> {/if regatta.isLive}
|
||||
{#if regatta.isFinished}<ui:text from='{i18n.regattaFinishedAt}'/> {/if regatta.isFinished}{fleet.time}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item} {res.mediaCss.hideonsmall}"><img src="images/flagImage" class="{local_res.css.regatta_intro_fleets_fleet_item_flag}"></img></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item} {res.mediaCss.showonlarge}"><ui:text from='{i18n.regattaCourse}'/> <span class="{local_res.css.regatta_intro_fleets_fleet_item_value}">{fleet.course}</span></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="{local_res.css.regatta_intro_fleets_fleet_item} {res.mediaCss.showonlarge}"><ui:text from='{i18n.regattaArea}'/> <span class="{local_res.css.regatta_intro_fleets_fleet_item_value}">{fleet.area}</span></div>
|
||||
</td>
|
||||
<td class="{local_res.css.regatta_intro_fleets_fleet_live}">
|
||||
{#if regatta.isLive}<a href="#" data-labeltype="live" class="{res.mainCss.label}"><ui:text from='{i18n.watchNow}'/></a>{/if regatta.isLive}
|
||||
</td>
|
||||
</tr>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
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.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;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class RegattaPhase extends UIObject {
|
||||
private static RegattaPhaseUiBinder uiBinder = GWT.create(RegattaPhaseUiBinder.class);
|
||||
|
||||
interface RegattaPhaseUiBinder extends UiBinder<DivElement, RegattaPhase> {
|
||||
}
|
||||
|
||||
@UiField SpanElement phaseName;
|
||||
@UiField DivElement phaseRacesDiv;
|
||||
@UiField AnchorElement phaseRacesAnchor;
|
||||
|
||||
public RegattaPhase(RaceGroupSeriesDTO series, final LeaderboardGroupDTO leaderboardGroup,
|
||||
final StrippedLeaderboardDTO leaderboard, final RaceGroupDTO raceGroup, final EventPlaceNavigator pageNavigator, Timer timerForClientServerOffset) {
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
if(LeaderboardNameConstants.DEFAULT_SERIES_NAME.equals(series.getName())) {
|
||||
phaseName.setInnerText("Races");
|
||||
} else {
|
||||
phaseName.setInnerText(series.getName());
|
||||
}
|
||||
|
||||
for(RaceColumnDTO raceColumn: series.getRaceColumns()) {
|
||||
// the raceColumn from the RaceGroupSeriesDTO does not contain all required information for the race state.
|
||||
// therefore we take it from the LeaderboardDTO
|
||||
// TODO: try to have only one RaceColumnDTO
|
||||
RaceColumnDTO raceColumn2 = leaderboard.getRaceColumnByName(raceColumn.getName());
|
||||
RegattaPhaseRace race = new RegattaPhaseRace(raceColumn2, timerForClientServerOffset);
|
||||
phaseRacesDiv.appendChild(race.getElement());
|
||||
|
||||
Event.sinkEvents(phaseRacesAnchor, Event.ONCLICK);
|
||||
Event.setEventListener(phaseRacesAnchor, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event browserEvent) {
|
||||
switch (DOM.eventGetType(browserEvent)) {
|
||||
case Event.ONCLICK:
|
||||
pageNavigator.goToRegattaRaces(leaderboardGroup, leaderboard, raceGroup);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public RegattaPhase() {
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
phaseName.setInnerText("No series defined yet.");
|
||||
}
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regatta.RegattaResources" />
|
||||
<div class="{local_res.css.regatta_intro_phases_phase}">
|
||||
<div class="{local_res.css.regatta_intro_phases_phase_name}"><span ui:field="phaseName" /></div>
|
||||
<a ui:field="phaseRacesAnchor" href="javascript:;">
|
||||
<div ui:field="phaseRacesDiv" class="{local_res.css.regatta_intro_phases_phase_races}" />
|
||||
</a>
|
||||
</div>
|
||||
</ui:UiBinder>
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class RegattaPhaseRace extends UIObject {
|
||||
private static RegattaPhaseRaceUiBinder uiBinder = GWT.create(RegattaPhaseRaceUiBinder.class);
|
||||
|
||||
interface RegattaPhaseRaceUiBinder extends UiBinder<DivElement, RegattaPhaseRace> {
|
||||
}
|
||||
|
||||
@UiField DivElement raceStatus;
|
||||
|
||||
private enum DataStatusEnum {
|
||||
FINISHED ("finished"), LIVE("live"), SCHEDULED("scheduled");
|
||||
|
||||
private final String attributeValue;
|
||||
private static final String ATTRIBUTE_NAME = "data-status";
|
||||
|
||||
DataStatusEnum(String attributeValue) {
|
||||
this.attributeValue = attributeValue;
|
||||
}
|
||||
}
|
||||
|
||||
public RegattaPhaseRace(RaceColumnDTO raceColumn, Timer timerForClientServerOffset) {
|
||||
RegattaResources.INSTANCE.css().ensureInjected();
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
DataStatusEnum dataStatus;
|
||||
if(raceColumn.hasLiveRaces(timerForClientServerOffset.getLiveTimePointInMillis())) {
|
||||
dataStatus = DataStatusEnum.LIVE;
|
||||
} else if (raceColumn.hasTrackedRaces()) {
|
||||
dataStatus = DataStatusEnum.FINISHED;
|
||||
} else {
|
||||
dataStatus = DataStatusEnum.SCHEDULED;
|
||||
}
|
||||
raceStatus.setAttribute(DataStatusEnum.ATTRIBUTE_NAME, dataStatus.attributeValue);
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regatta.RegattaResources" />
|
||||
<div ui:field="raceStatus" class="{local_res.css.regatta_intro_phases_phase_races_race}"></div>
|
||||
</ui:UiBinder>
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regatta;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.CssResource.Shared;
|
||||
|
||||
public interface RegattaResources extends ClientBundle {
|
||||
public static final RegattaResources INSTANCE = GWT.create(RegattaResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regatta/Regatta.gss")
|
||||
LocalCss css();
|
||||
|
||||
@Shared
|
||||
public interface LocalCss extends CssResource {
|
||||
String regatta();
|
||||
String regatta_intro_details_itemhideoncompact();
|
||||
String regatta_intro();
|
||||
String regatta_intro_image();
|
||||
String regatta_intro_header();
|
||||
String regatta_intro_header_name();
|
||||
String regatta_intro_header_namelink();
|
||||
String regatta_intro_header_details();
|
||||
String regatta_intro_header_details_item();
|
||||
String regatta_intro_header_details_item_value();
|
||||
String regatta_intro_header_details_label();
|
||||
String regatta_intro_phases();
|
||||
String regatta_intro_phases_phase();
|
||||
String regatta_intro_phases_phase_name();
|
||||
String regatta_intro_phases_phase_races();
|
||||
String regatta_intro_phases_phase_races_race();
|
||||
String regatta_intro_phases_leaderboardlink();
|
||||
String regatta_intro_scheduled();
|
||||
String regatta_intro_results();
|
||||
String regatta_intro_results_competitor();
|
||||
String regatta_intro_results_competitor_name();
|
||||
String regatta_intro_fleets();
|
||||
String regatta_intro_fleets_fleet();
|
||||
String regatta_intro_fleets_fleet_item();
|
||||
String regatta_intro_fleets_fleet_itemfirst();
|
||||
String regatta_intro_fleets_fleet_item_value();
|
||||
String regatta_intro_fleets_fleet_item_flag();
|
||||
String regatta_intro_fleets_fleet_live();
|
||||
}
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
.oldLeaderboardPanel {
|
||||
background-color:#f8f8f8;
|
||||
padding: 0 10px 10px 10px;
|
||||
width: 100%;
|
||||
}
|
||||
-209
@@ -1,209 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaanalytics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Visibility;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.History;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.domain.common.DetailType;
|
||||
import com.sap.sailing.domain.common.RaceIdentifier;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.CompactEventHeader;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldcompetitorcharts.OldCompetitorCharts;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldleaderboard.OldLeaderboard;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSettings;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.gwt.client.ErrorReporter;
|
||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||
|
||||
public class RegattaAnalytics extends Composite implements LeaderboardUpdateListener {
|
||||
private static RegattaAnalyticsUiBinder uiBinder = GWT.create(RegattaAnalyticsUiBinder.class);
|
||||
|
||||
interface RegattaAnalyticsUiBinder extends UiBinder<Widget, RegattaAnalytics> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
@UiField OldLeaderboard oldLeaderboardComposite;
|
||||
@UiField OldCompetitorCharts oldCompetitorChartsComposite;
|
||||
@UiField(provided=true) CompactEventHeader eventHeader;
|
||||
|
||||
@UiField SpanElement title;
|
||||
@UiField DivElement liveRaceDiv;
|
||||
|
||||
@UiField HTMLPanel leaderboardTabPanel;
|
||||
@UiField HTMLPanel competitorChartsTabPanel;
|
||||
private HTMLPanel activeTabPanel;
|
||||
private Anchor activeAnchor;
|
||||
|
||||
@UiField Anchor leaderboardAnchor;
|
||||
@UiField Anchor competitorChartsAnchor;
|
||||
|
||||
private final PlaceNavigation<RegattaLeaderboardPlace> leaderboardNavigation;
|
||||
private final PlaceNavigation<RegattaCompetitorAnalyticsPlace> competitorChartsNavigation;
|
||||
|
||||
private RegattaAnalyticsDataManager regattaAnalyticsManager;
|
||||
private Timer autoRefreshTimer;
|
||||
private RegattaNavigationTabs navigationTab;
|
||||
|
||||
public RegattaAnalytics(EventDTO event, String leaderboardName, RegattaNavigationTabs navigationTab, Timer timerForClientServerOffset, HomePlacesNavigator placesNavigator) {
|
||||
this.navigationTab = navigationTab;
|
||||
|
||||
eventHeader = new CompactEventHeader(event, leaderboardName, placesNavigator);
|
||||
|
||||
EventRegattaLeaderboardResources.INSTANCE.css().ensureInjected();
|
||||
RegattaAnalyticsResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
title.setInnerText(leaderboardName);
|
||||
|
||||
competitorChartsTabPanel.setVisible(false);
|
||||
leaderboardTabPanel.setVisible(false);
|
||||
liveRaceDiv.getStyle().setVisibility(Visibility.HIDDEN);
|
||||
|
||||
leaderboardNavigation = placesNavigator.getLeaderboardNavigation(event.id.toString(), leaderboardName,
|
||||
event.getBaseURL(), event.isOnRemoteServer());
|
||||
competitorChartsNavigation = placesNavigator.getCompetitorAnalyticsNavigation(event.id.toString(), leaderboardName,
|
||||
event.getBaseURL(), event.isOnRemoteServer());
|
||||
|
||||
leaderboardAnchor.setHref(leaderboardNavigation.getTargetUrl());
|
||||
competitorChartsAnchor.setHref(competitorChartsNavigation.getTargetUrl());
|
||||
}
|
||||
|
||||
public void createRegattaAnalyticsViewer(final SailingServiceAsync sailingService, final AsyncActionsExecutor asyncActionsExecutor,
|
||||
final Timer timer, final LeaderboardSettings leaderboardSettings, final RaceIdentifier preselectedRace,
|
||||
final String leaderboardGroupName, String leaderboardName, final ErrorReporter errorReporter,
|
||||
final UserAgentDetails userAgent, boolean showRaceDetails,
|
||||
boolean autoExpandLastRaceColumn, boolean showOverallLeaderboard) {
|
||||
this.autoRefreshTimer = timer;
|
||||
regattaAnalyticsManager = new RegattaAnalyticsDataManager(sailingService, asyncActionsExecutor, timer, errorReporter, userAgent);
|
||||
regattaAnalyticsManager.createLeaderboardPanel(leaderboardSettings, preselectedRace, leaderboardGroupName,
|
||||
leaderboardName, showRaceDetails, autoExpandLastRaceColumn);
|
||||
|
||||
List<DetailType> availableDetailsTypes = new ArrayList<DetailType>();
|
||||
DetailType initialDetailType = DetailType.REGATTA_RANK;
|
||||
availableDetailsTypes.add(DetailType.REGATTA_RANK);
|
||||
availableDetailsTypes.add(DetailType.REGATTA_TOTAL_POINTS_SUM);
|
||||
regattaAnalyticsManager.createMultiCompetitorChart(leaderboardName, initialDetailType);
|
||||
|
||||
oldLeaderboardComposite.setLeaderboard(regattaAnalyticsManager.getLeaderboardPanel(), autoRefreshTimer);
|
||||
regattaAnalyticsManager.getLeaderboardPanel().addLeaderboardUpdateListener(this);
|
||||
|
||||
oldCompetitorChartsComposite.setChart(regattaAnalyticsManager.getMultiCompetitorChart(), availableDetailsTypes, initialDetailType);
|
||||
regattaAnalyticsManager.hideCompetitorChart();
|
||||
|
||||
switch(navigationTab) {
|
||||
case Leaderboard:
|
||||
setActiveTabPanel(leaderboardTabPanel, leaderboardAnchor);
|
||||
break;
|
||||
case CompetitorAnalytics:
|
||||
setActiveTabPanel(competitorChartsTabPanel, competitorChartsAnchor);
|
||||
DetailType selectedChartDetailType = oldCompetitorChartsComposite.getSelectedChartDetailType();
|
||||
regattaAnalyticsManager.showCompetitorChart(selectedChartDetailType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatedLeaderboard(LeaderboardDTO leaderboard) {
|
||||
if(activeTabPanel == leaderboardTabPanel) {
|
||||
StringMessages stringMessages = StringMessages.INSTANCE;
|
||||
|
||||
if(leaderboard != null) {
|
||||
List<Pair<RaceColumnDTO, FleetDTO>> liveRaces = leaderboard.getLiveRaces(autoRefreshTimer.getLiveTimePointInMillis());
|
||||
boolean hasLiveRace = !liveRaces.isEmpty();
|
||||
if (hasLiveRace) {
|
||||
String liveRaceText = "";
|
||||
if(liveRaces.size() == 1) {
|
||||
Pair<RaceColumnDTO, FleetDTO> liveRace = liveRaces.get(0);
|
||||
liveRaceText = stringMessages.raceIsLive("'" + liveRace.getA().getRaceColumnName() + "'");
|
||||
} else {
|
||||
String raceNames = "";
|
||||
for (Pair<RaceColumnDTO, FleetDTO> liveRace : liveRaces) {
|
||||
raceNames += "'" + liveRace.getA().getRaceColumnName() + "', ";
|
||||
}
|
||||
// remove last ", "
|
||||
raceNames = raceNames.substring(0, raceNames.length() - 2);
|
||||
liveRaceText = stringMessages.racesAreLive(raceNames);
|
||||
}
|
||||
liveRaceDiv.setInnerText(liveRaceText);
|
||||
} else {
|
||||
liveRaceDiv.setInnerText("");
|
||||
}
|
||||
liveRaceDiv.getStyle().setVisibility(hasLiveRace ? Visibility.VISIBLE : Visibility.HIDDEN);
|
||||
|
||||
oldLeaderboardComposite.updatedLeaderboard(leaderboard, hasLiveRace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void currentRaceSelected(RaceIdentifier raceIdentifier, RaceColumnDTO raceColumn) {
|
||||
}
|
||||
|
||||
@UiHandler("leaderboardAnchor")
|
||||
void leaderboardTabClicked(ClickEvent event) {
|
||||
setActiveTabPanel(leaderboardTabPanel, leaderboardAnchor);
|
||||
regattaAnalyticsManager.hideCompetitorChart();
|
||||
handleClickEvent(event, leaderboardNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("competitorChartsAnchor")
|
||||
void competitorChartsTabClicked(ClickEvent event) {
|
||||
setActiveTabPanel(competitorChartsTabPanel, competitorChartsAnchor);
|
||||
DetailType selectedChartDetailType = oldCompetitorChartsComposite.getSelectedChartDetailType();
|
||||
regattaAnalyticsManager.showCompetitorChart(selectedChartDetailType);
|
||||
oldCompetitorChartsComposite.updateSelectionState(regattaAnalyticsManager.getCompetitorSelectionProvider());
|
||||
handleClickEvent(event, competitorChartsNavigation);
|
||||
}
|
||||
|
||||
private void setActiveTabPanel(HTMLPanel newActivePanel, Anchor newActiveAnchor) {
|
||||
if(activeTabPanel != null) {
|
||||
activeTabPanel.setVisible(false);
|
||||
activeAnchor.removeStyleName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
}
|
||||
|
||||
activeTabPanel = newActivePanel;
|
||||
activeAnchor = newActiveAnchor;
|
||||
activeTabPanel.setVisible(true);
|
||||
activeAnchor.addStyleName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
}
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
// don't use the placecontroller for navigation here as we want to avoid a page reload
|
||||
History.newItem(placeNavigation.getHistoryUrl(), false);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.regatta"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources" />
|
||||
<ui:with field="local_res2" type="com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsResources" />
|
||||
<g:HTMLPanel>
|
||||
<s:header.CompactEventHeader ui:field='eventHeader'/>
|
||||
<div class="{res.mediaCss.grid} {local_res.css.regattaleaderboard}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta}">
|
||||
<h3 class="{local_res.css.regattaleaderboard_meta_title}">
|
||||
<span style="color:darkgrey;"><ui:text from='{i18n.regatta}'/></span>
|
||||
<span ui:field="title"></span>
|
||||
</h3>
|
||||
<div ui:field="liveRaceDiv" class="{res.mainCss.label} {local_res.css.regattaleaderboard_meta_status} {local_res.css.regattaleaderboard_meta_statuslive}">
|
||||
<ui:text from='{i18n.live}'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta_navigation}">
|
||||
<g:Anchor ui:field="leaderboardAnchor" styleName="{res.mainCss.navbar_button}"><ui:text from="{i18n.leaderboard}" /></g:Anchor>
|
||||
<g:Anchor ui:field="competitorChartsAnchor" styleName="{res.mainCss.navbar_button}"><ui:text from="{i18n.competitorsAnalytics}" /></g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
<g:HTMLPanel ui:field="leaderboardTabPanel">
|
||||
<s:oldleaderboard.OldLeaderboard ui:field='oldLeaderboardComposite'/>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="competitorChartsTabPanel">
|
||||
<s:oldcompetitorcharts.OldCompetitorCharts ui:field='oldCompetitorChartsComposite'/>
|
||||
</g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaanalytics;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface RegattaAnalyticsResources extends ClientBundle {
|
||||
public static final RegattaAnalyticsResources INSTANCE = GWT.create(RegattaAnalyticsResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regattaanalytics/RegattaAnalytics.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String oldLeaderboardPanel();
|
||||
}
|
||||
}
|
||||
-164
@@ -1,164 +0,0 @@
|
||||
/**
|
||||
* The header of a regatta of an event
|
||||
*/
|
||||
.eventregattaheader {
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.regattanavigation {
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.regattanavigation_link {
|
||||
display: inline-block;
|
||||
margin-right: 1.875em;
|
||||
padding: 0.9375em 0 0.6875em 0;
|
||||
border-bottom: 0.25em solid transparent;
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
}
|
||||
.regattanavigation_link:hover,
|
||||
.regattanavigation_link:focus {
|
||||
border-bottom-color: #ddd;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
.regattanavigation_linkactive {
|
||||
border-bottom-color: #f0ab00;
|
||||
}
|
||||
.regattanavigation_linkactive:hover,
|
||||
.regattanavigation_linkactive:focus {
|
||||
border-bottom-color: #d89a00;
|
||||
}
|
||||
.regatta {
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding: 1.25em 0;
|
||||
}
|
||||
.regattacompact {
|
||||
border-top: 1px solid #ccc;
|
||||
padding-left: 3.75em;
|
||||
padding-right: 3.75em;
|
||||
}
|
||||
.regattacompact .regatta_intro_details_itemhideoncompact {
|
||||
display: none;
|
||||
}
|
||||
.regattalink:hover {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.regattalink:hover .regatta_intro_image {
|
||||
opacity: 0.9;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
|
||||
filter: alpha(opacity=90);
|
||||
}
|
||||
.regattalink:nth-child(even) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.regattalink:nth-child(even):hover {
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
.regatta_intro {
|
||||
display: block;
|
||||
padding-left: 9.6875em;
|
||||
min-height: 8.75em;
|
||||
position: relative;
|
||||
}
|
||||
.regatta_intro:hover,
|
||||
.regatta_intro:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
.regatta_intro_image {
|
||||
border: 1px solid #ccc;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.regatta_intro_header {
|
||||
margin-bottom: 0.625em;
|
||||
padding-top: 0.3125em;
|
||||
padding-bottom: 0.625em;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
position: relative;
|
||||
}
|
||||
.regatta_intro_header_logo {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.regatta_intro_header_name {
|
||||
display: inline-block;
|
||||
font-size: 1.25em;
|
||||
margin: 0;
|
||||
margin-right: 0.25em;
|
||||
}
|
||||
.regatta_intro_header_name:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.regatta_intro_header_labels {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0.1875em;
|
||||
}
|
||||
.regatta_intro_header_labels .label {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.regatta_intro_races {
|
||||
position: relative;
|
||||
min-height: 1.875em;
|
||||
margin-bottom: 0.625em;
|
||||
padding-bottom: 0.625em;
|
||||
padding-left: 0.3125em;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
.regatta_intro_races_race {
|
||||
display: inline-block;
|
||||
background-color: #ccc;
|
||||
height: 0.625em;
|
||||
width: 0.9375em;
|
||||
-webkit-transform: skew(-45deg);
|
||||
-moz-transform: skew(-45deg);
|
||||
-o-transform: skew(-45deg);
|
||||
-ms-transform: skew(-45deg);
|
||||
transform: skew(-45deg);
|
||||
}
|
||||
.regatta_intro_races_race[data-finished='true'],
|
||||
.regatta_intro_races_race[data-finished='data-finished'] {
|
||||
background-color: #f0ab00;
|
||||
}
|
||||
.regatta_intro_meta {
|
||||
position: relative;
|
||||
font-weight: 600;
|
||||
}
|
||||
.regatta_intro_meta_scoring {
|
||||
color: #008fcc;
|
||||
display: inline-block;
|
||||
}
|
||||
.regatta_intro_meta_leaderboardlink {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-transform: uppercase;
|
||||
line-height: 2.8125em;
|
||||
}
|
||||
.regatta_intro_details {
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
}
|
||||
.regatta_intro_details_item {
|
||||
display: inline-block;
|
||||
margin-right: 2.1875em;
|
||||
}
|
||||
.regatta_intro_details_item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.regatta_intro_details_item_sub {
|
||||
display: inline;
|
||||
}
|
||||
.regatta_intro_details_item_sub:last-child:after {
|
||||
content: '';
|
||||
}
|
||||
.regatta_intro_details_item_value {
|
||||
color: #008fcc;
|
||||
}
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaheader;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Visibility;
|
||||
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.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaHeader extends Composite {
|
||||
private static EventRegattaHeaderUiBinder uiBinder = GWT.create(EventRegattaHeaderUiBinder.class);
|
||||
|
||||
interface EventRegattaHeaderUiBinder extends UiBinder<Widget, EventRegattaHeader> {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final EventDTO event;
|
||||
private final Timer timerForClientServerOffset;
|
||||
private final EventPlaceNavigator pageNavigator;
|
||||
private StrippedLeaderboardDTO leaderboard;
|
||||
|
||||
@UiField SpanElement regattaName;
|
||||
@UiField SpanElement leaderboardGroupName;
|
||||
@UiField SpanElement regattaPhase;
|
||||
@UiField SpanElement competitorsCount;
|
||||
@UiField DivElement isLiveDiv;
|
||||
@UiField Anchor leaderboardLink;
|
||||
|
||||
public EventRegattaHeader(EventDTO event, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
this.event = event;
|
||||
this.timerForClientServerOffset = timerForClientServerOffset;
|
||||
this.pageNavigator = pageNavigator;
|
||||
|
||||
EventRegattaHeaderResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setData(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard) {
|
||||
this.leaderboard = leaderboard;
|
||||
|
||||
boolean hasLiveRace = leaderboard.hasLiveRace(timerForClientServerOffset.getLiveTimePointInMillis());
|
||||
isLiveDiv.setAttribute("data-labeltype", hasLiveRace ? "live" : "");
|
||||
|
||||
regattaName.setInnerText(leaderboard.displayName != null ? leaderboard.displayName : leaderboard.name);
|
||||
leaderboardGroupName.setInnerText(leaderboardGroup.getName());
|
||||
|
||||
if(leaderboard.rows != null) {
|
||||
competitorsCount.setInnerText(String.valueOf(leaderboard.rows.size()));
|
||||
} else {
|
||||
competitorsCount.getStyle().setVisibility(Visibility.HIDDEN);
|
||||
}
|
||||
regattaPhase.setInnerText(calculateCurrentRegattaPhase(leaderboard));
|
||||
}
|
||||
|
||||
private String calculateCurrentRegattaPhase(StrippedLeaderboardDTO leaderboard) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@UiHandler("leaderboardLink")
|
||||
public void goToLeaderboard(ClickEvent e) {
|
||||
pageNavigator.openLeaderboardViewer(null, leaderboard);
|
||||
}
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaheader.EventRegattaHeaderResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- The regatta header contains basic regatta information and the regatta navigation-->
|
||||
<div class="{local_res.css.eventregattaheader}">
|
||||
|
||||
<div class="{local_res.css.regatta}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.regatta_intro}"><img src="images/home/regatta-boatclass_sample.png" alt="" height="140" width="140" class="{local_res.css.regatta_intro_image}"></img>
|
||||
<div class="{local_res.css.regatta_intro_header}">
|
||||
<g:Anchor ui:field="regattaRacesLink">
|
||||
<h3 class="{local_res.css.regatta_intro_header_name}"><span ui:field="regattaName" /></h3>
|
||||
<div ui:field="isLiveDiv" data-labeltype="" class="{res.mainCss.label}"><ui:text from='{i18n.live}'/></div>
|
||||
</g:Anchor>
|
||||
<div class="{local_res.css.regatta_intro_header_labels}">
|
||||
<div data-labeltype="ess" class="{res.mainCss.label}"><span ui:field="leaderboardGroupName" /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.regatta_intro_meta}">Phase
|
||||
<div class="{local_res.css.regatta_intro_meta_scoring}"><span ui:field="regattaPhase" />
|
||||
</div>
|
||||
<div class="{local_res.css.regatta_intro_meta_leaderboardlink}">
|
||||
<g:Anchor ui:field="leaderboardLink">Leaderboard</g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.regatta_intro_races}">
|
||||
<div data-finished="race.finished" class="{local_res.css.regatta_intro_races_race}"></div>
|
||||
</div>
|
||||
<div class="{local_res.css.regatta_intro_details}">
|
||||
<div class="{local_res.css.regatta_intro_details_item}">
|
||||
<div class="{local_res.css.regatta_intro_details_item_sub}"> <span class="{local_res.css.regatta_intro_details_item_value}"><span ui:field="competitorsCount" /></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--
|
||||
<div class="{local_res.css.regattanavigation}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}"><a href="event-regatta-schedule.html" class="{local_res.css.regattanavigation_link}"><ui:text from='{i18n.eventRegattaHeaderRaceSchedule}'/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaheader;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventRegattaHeaderResources extends ClientBundle {
|
||||
public static final EventRegattaHeaderResources INSTANCE = GWT.create(EventRegattaHeaderResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regattaheader/EventRegattaHeader.gss")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String eventregattaheader();
|
||||
String regattanavigation();
|
||||
String regattanavigation_link();
|
||||
String regattanavigation_linkactive();
|
||||
String regatta();
|
||||
String regattacompact();
|
||||
String regatta_intro_details_itemhideoncompact();
|
||||
String regattalink();
|
||||
String regatta_intro_image();
|
||||
String regatta_intro();
|
||||
String regatta_intro_header();
|
||||
String regatta_intro_header_logo();
|
||||
String regatta_intro_header_name();
|
||||
String regatta_intro_header_labels();
|
||||
String label();
|
||||
String regatta_intro_races();
|
||||
String regatta_intro_races_race();
|
||||
String regatta_intro_meta();
|
||||
String regatta_intro_meta_scoring();
|
||||
String regatta_intro_meta_leaderboardlink();
|
||||
String regatta_intro_details();
|
||||
String regatta_intro_details_item();
|
||||
String regatta_intro_details_item_sub();
|
||||
String regatta_intro_details_item_value();
|
||||
}
|
||||
}
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- The leaderboard of races of a regatta-->
|
||||
<div class="{res.mediaCss.grid} {local_res.css.regattaleaderboard}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta}">
|
||||
<header>
|
||||
<h3 class="{local_res.css.regattaleaderboard_meta_title}"></h3>{#if navigation.isLive}
|
||||
<div class="{res.mainCss.label} {local_res.css.regattaleaderboard_meta_status} {local_res.css.regattaleaderboard_meta_statuslive}"><ui:text from='{i18n.live}'/></div>{/if navigation.isLive}
|
||||
</header>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta_navigation}"><a href="#" class="{res.mainCss.navbar_button} {res.mainCss.navbar_buttonactive}"><ui:text from='{i18n.leaderBoard}'/></a><a href="#" class="{res.mainCss.navbar_button}"><ui:text from='{i18n.eventRegattaLeaderboardRegattaRank}'/></a><a href="#" class="{res.mainCss.navbar_button}"><ui:text from='{i18n.eventRegattaLeaderboardTotalPoints}'/></a></div>
|
||||
<div class="{res.mediaCss.small6} {res.mediaCss.column} {local_res.css.regattaleaderboard_meta_scoring}">
|
||||
<p class="{local_res.css.regattaleaderboard_meta_scoring_comment}">{leaderboard.scoringComment}</p>
|
||||
<p class="{local_res.css.regattaleaderboard_meta_scoring_type}"></p>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small6} {res.mediaCss.column} {local_res.css.regattaleaderboard_meta_settings}">
|
||||
<div class="{local_res.css.regattaleaderboard_meta_update}">
|
||||
<p class="{local_res.css.regattaleaderboard_meta_update_text}"><ui:text from='{i18n.eventRegattaLeaderboardLastScoreUpdate}'/></p>
|
||||
<p class="{local_res.css.regattaleaderboard_meta_update_timestamp}">{leaderboard.lastScoringUpdate}</p>
|
||||
</div><a href="#" class="{res.mainCss.button} {local_res.css.regattaleaderboard_meta_reload}"></a><a href="#" class="{res.mainCss.button} {local_res.css.regattaleaderboard_meta_settings_button}"></a>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.column}">
|
||||
<table class="{local_res.css.regattaleaderboard_table}">
|
||||
<tr class="{local_res.css.regattaleaderboard_header}">
|
||||
<td class="{local_res.css.regattaleaderboard_header_item} {local_res.css.regattaleaderboard_header_itemrank} {local_res.css.regattaleaderboard_header_itemascending}"><a href="#" class="{local_res.css.regattaleaderboard_header_item_name}"><ui:text from='{i18n.eventRegattaLeaderboardRegattaRank}'/></a></td>
|
||||
<td class="{local_res.css.regattaleaderboard_header_item} {local_res.css.regattaleaderboard_header_itemcompetitor} {local_res.css.regattaleaderboard_header_itemdescending}"><a href="#" class="{local_res.css.regattaleaderboard_header_item_name}"><ui:text from='{i18n.eventRegattaLeaderboardCompetitor}'/></a></td>
|
||||
<td class="{local_res.css.regattaleaderboard_header_item} {local_res.css.regattaleaderboard_header_itemname}"><a href="#" class="{local_res.css.regattaleaderboard_header_item_name}"><ui:text from='{i18n.eventRegattaLeaderboardName}'/></a></td>
|
||||
<td class="{local_res.css.regattaleaderboard_header_item} {local_res.css.regattaleaderboard_header_itemdata}">
|
||||
<table class="{local_res.css.regattaleaderboard_header_table}">
|
||||
<tr>{#each columnName in leaderboard.columnNames}<s:eventRegattaLeaderboard.RegattaLeaderboardHeaderColumn ui:field='columnName'></s>{/each leaderboard.columnNames}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="{local_res.css.regattaleaderboard_header_item} {local_res.css.regattaleaderboard_header_itempoints}"><a href="#" class="{local_res.css.regattaleaderboard_header_item_name}"><ui:text from='{i18n.eventRegattaLeaderboardTotalPoints}'/></a></td>
|
||||
</tr>{#each competitor in leaderboard.competitors}<s:eventRegattaLeaderboard.RegattaLeaderboardCompetitor ui:field='competitor'></s>{/each leaderboard.competitors}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.shared.eventregattaleaderboard.RegattaLeaderboardCompetitorResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<tr class="{local_res.css.leaderboardcompetitor}">
|
||||
<td class="{local_res.css.leaderboardcompetitor_itemcenter}">{competitor.rank}</td>
|
||||
<td class="{local_res.css.leaderboardcompetitor_item}"><img src="assets/flags/{competitor.countryCode}.png" alt="{competitor.nationality}" width="32" height="32" class="{local_res.css.leaderboardcompetitor_nationality}"></img><span>{competitor.sailID}</span></td>
|
||||
<td class="{local_res.css.leaderboardcompetitor_item}">{competitor.name}</td>
|
||||
<td class="{local_res.css.leaderboardcompetitor_itemcenter}">
|
||||
<table class="{local_res.css.leaderboardcompetitor_item_table}">
|
||||
<tr>{#each raceScore in competitor.raceScores}<s:eventRegattaLeaderboard.RegattaLeaderboardCompetitorRaceScore ui:field='raceScore'></s>{/each competitor.raceScores}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="{local_res.css.leaderboardcompetitor_itemcenter}">{competitor.totalPoints}</td>
|
||||
</tr>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.shared.eventregattaleaderboard.RegattaLeaderboardCompetitorRaceScoreResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<td class="{local_res.css.eventregattaleaderboard_data_element}">{raceScore.totalPoints}</td>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.shared.eventregattaleaderboard.RegattaLeaderboardHeaderColumnResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<td class="{local_res.css.eventregattaleaderboard_header_itemdata_element}"><a href="#" class="{local_res.css.eventregattaleaderboard_header_itemdata_element_name}">{columnName}</a></td>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
.eventregattalist {
|
||||
font-size: 15px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.eventregattalist_navigation {
|
||||
padding: 1.333333333333333em 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
-148
@@ -1,148 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattalist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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;
|
||||
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.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.Regatta;
|
||||
import com.sap.sailing.gwt.home.client.shared.LongNamesUtil;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.common.Util.Triple;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaList extends AbstractEventComposite {
|
||||
private static EventRegattaHeaderUiBinder uiBinder = GWT.create(EventRegattaHeaderUiBinder.class);
|
||||
|
||||
interface EventRegattaHeaderUiBinder extends UiBinder<Widget, EventRegattaList> {
|
||||
}
|
||||
|
||||
// @UiField DivElement seriesLeaderboardDiv;
|
||||
// @UiField AnchorElement seriesLeaderboardAnchor;
|
||||
|
||||
@UiField DivElement regattaGroupsNavigationPanel;
|
||||
@UiField DivElement regattaListNavigationDiv;
|
||||
@UiField HTMLPanel regattaListItemsPanel;
|
||||
@UiField AnchorElement filterNoLeaderboardGroupsAnchor;
|
||||
@UiField SpanElement allBoatClassesSelected;
|
||||
|
||||
private final Map<String, List<Regatta>> regattaElementsByLeaderboardGroup;
|
||||
private final List<AnchorElement> leaderboardGroupFilterAnchors;
|
||||
|
||||
public EventRegattaList(EventDTO event, Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> regattaStructure,
|
||||
Timer timerForClientServerOffset, HomePlacesNavigator placeNavigator, EventPlaceNavigator pageNavigator) {
|
||||
super(event, pageNavigator);
|
||||
|
||||
EventRegattaListResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
regattaElementsByLeaderboardGroup = new HashMap<>();
|
||||
leaderboardGroupFilterAnchors = new ArrayList<AnchorElement>();
|
||||
boolean isSeries = event.isFakeSeries();
|
||||
boolean hasMultipleLeaderboardGroups = event.getLeaderboardGroups().size() > 1;
|
||||
|
||||
if(isSeries) {
|
||||
regattaListNavigationDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else {
|
||||
if(hasMultipleLeaderboardGroups) {
|
||||
// fill the navigation panel
|
||||
registerFilterLeaderboardGroupEvent(filterNoLeaderboardGroupsAnchor, null);
|
||||
for(LeaderboardGroupDTO leaderboardGroup: event.getLeaderboardGroups()) {
|
||||
AnchorElement filterLeaderboardGroupAnchor = Document.get().createAnchorElement();
|
||||
filterLeaderboardGroupAnchor.setClassName(SharedResources.INSTANCE.mainCss().navbar_button());
|
||||
filterLeaderboardGroupAnchor.setHref("javascript:;");
|
||||
|
||||
String leaderboardGroupName = LongNamesUtil.shortenLeaderboardGroupName(event.getName(), leaderboardGroup.getName());
|
||||
filterLeaderboardGroupAnchor.setInnerText(leaderboardGroupName);
|
||||
regattaGroupsNavigationPanel.appendChild(filterLeaderboardGroupAnchor);
|
||||
leaderboardGroupFilterAnchors.add(filterLeaderboardGroupAnchor);
|
||||
|
||||
registerFilterLeaderboardGroupEvent(filterLeaderboardGroupAnchor, leaderboardGroup);
|
||||
}
|
||||
} else {
|
||||
regattaListNavigationDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
}
|
||||
|
||||
for (LeaderboardGroupDTO leaderboardGroup : event.getLeaderboardGroups()) {
|
||||
for (StrippedLeaderboardDTO leaderboard : leaderboardGroup.getLeaderboards()) {
|
||||
Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO> r = regattaStructure.get(leaderboard.name);
|
||||
if (r != null) {
|
||||
Regatta regatta = new Regatta(event, timerForClientServerOffset, false, placeNavigator, pageNavigator);
|
||||
regatta.setData(r.getC(), hasMultipleLeaderboardGroups, r.getB(), r.getA());
|
||||
regattaListItemsPanel.add(regatta);
|
||||
List<Regatta> regattaElements = regattaElementsByLeaderboardGroup.get(leaderboardGroup.getName());
|
||||
if (regattaElements == null) {
|
||||
regattaElements = new ArrayList<Regatta>();
|
||||
regattaElementsByLeaderboardGroup.put(leaderboardGroup.getName(), regattaElements);
|
||||
}
|
||||
regattaElements.add(regatta);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void registerFilterLeaderboardGroupEvent(final AnchorElement filterLeaderboardGroupAnchor, final LeaderboardGroupDTO leaderboardGroup) {
|
||||
Event.sinkEvents(filterLeaderboardGroupAnchor, Event.ONCLICK);
|
||||
Event.setEventListener(filterLeaderboardGroupAnchor, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
switch (DOM.eventGetType(event)) {
|
||||
case Event.ONCLICK:
|
||||
filterRegattaListByLeaderboardGroup(leaderboardGroup);
|
||||
|
||||
for(AnchorElement anchor: leaderboardGroupFilterAnchors) {
|
||||
anchor.removeClassName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
}
|
||||
filterLeaderboardGroupAnchor.addClassName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void filterRegattaListByLeaderboardGroup(LeaderboardGroupDTO leaderboardGroup) {
|
||||
if (leaderboardGroup != null) {
|
||||
allBoatClassesSelected.getStyle().setDisplay(Display.NONE);
|
||||
filterNoLeaderboardGroupsAnchor.removeClassName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
// hide all regattas of the not selected leaderboardgroup
|
||||
for (LeaderboardGroupDTO lg : getEvent().getLeaderboardGroups()) {
|
||||
boolean isVisible = leaderboardGroup.getName().equals(lg.getName());
|
||||
List<Regatta> regattaElements = regattaElementsByLeaderboardGroup.get(lg.getName());
|
||||
for (Regatta regatta : regattaElements) {
|
||||
regatta.setVisible(isVisible);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// make all regattas visible
|
||||
allBoatClassesSelected.getStyle().setDisplay(Display.INLINE_BLOCK);
|
||||
filterNoLeaderboardGroupsAnchor.addClassName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
for (LeaderboardGroupDTO lg : getEvent().getLeaderboardGroups()) {
|
||||
List<Regatta> regattaElements = regattaElementsByLeaderboardGroup.get(lg.getName());
|
||||
for (Regatta regatta : regattaElements) {
|
||||
regatta.setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattalist.EventRegattaListResources" />
|
||||
<g:HTMLPanel>
|
||||
<!-- A list of regattas-->
|
||||
<div class="{local_res.css.eventregattalist}">
|
||||
<div ui:field="regattaListNavigationDiv" class="{local_res.css.eventregattalist_navigation} {res.mainCss.navbar}">
|
||||
<div class="{res.mediaCss.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}"><span ui:field="allBoatClassesSelected">✓ </span><ui:text from='{i18n.eventRegattaListAllBoatClasses}'/></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<g:HTMLPanel ui:field="regattaListItemsPanel" />
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattalist;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventRegattaListResources extends ClientBundle {
|
||||
public static final EventRegattaListResources INSTANCE = GWT.create(EventRegattaListResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regattalist/EventRegattaList.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String eventregattalist();
|
||||
String eventregattalist_navigation();
|
||||
}
|
||||
}
|
||||
-287
@@ -1,287 +0,0 @@
|
||||
.eventregattaraces {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventregattaraces_phase {
|
||||
margin: 2em 0;
|
||||
}
|
||||
.eventregattaraces_phase_name {
|
||||
display: block;
|
||||
margin: 0 0 1.666666666666667em 0;
|
||||
padding-bottom: 0.416666666666667em;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.eventregattaraces_phase_day {
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 0.533333333333333em;
|
||||
}
|
||||
.eventregattaraces_phase_races {
|
||||
margin-bottom: 2.666666666666667em;
|
||||
}
|
||||
.eventregattaraces_phase_fleets {
|
||||
margin-bottom: 2.333333333333333em;
|
||||
}
|
||||
.eventregattaraces_phase_fleet {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.eventregattaraces_phase_fleet_name {
|
||||
display: table-cell;
|
||||
height: 2.5em;
|
||||
padding: 0.533333333333333em;
|
||||
border: 1px solid #ccc;
|
||||
border-left: none;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.066666666666667em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.eventregattaraces_phase_fleet_count {
|
||||
display: table-cell;
|
||||
width: 3.333333333333333em;
|
||||
height: 3.333333333333333em;
|
||||
padding: 0.333333333333333em;
|
||||
background-color: #008fcc;
|
||||
background-image: url("images/home/fleet-icon.png");
|
||||
background-position: center 4px;
|
||||
background-repeat: no-repeat;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.eventregattaraces_legend {
|
||||
position: absolute;
|
||||
top: 2.333333333333333em;
|
||||
right: 1.333333333333333em;
|
||||
}
|
||||
.eventregattaraces_legend_item {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-left: 0.666666666666667em;
|
||||
padding-left: 3.333333333333333em;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
.eventregattaraces_legend_item:first-of-type {
|
||||
border: none;
|
||||
}
|
||||
.eventregattaraces_legend_item:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: -0.2em;
|
||||
left: 0.666666666666667em;
|
||||
width: 1.733333333333333em;
|
||||
height: 1.733333333333333em;
|
||||
background-image: url("images/home/race-features-icons.png");
|
||||
-webkit-background-size: auto 200%;
|
||||
-moz-background-size: auto 200%;
|
||||
background-size: auto 200%;
|
||||
}
|
||||
.eventregattaraces_legend_itemgps:before {
|
||||
background-position: 0 0;
|
||||
}
|
||||
.eventregattaraces_legend_itemwind:before {
|
||||
background-position: 33% 0;
|
||||
}
|
||||
.eventregattaraces_legend_itemvideo:before {
|
||||
background-position: 66% 0;
|
||||
}
|
||||
.eventregattaraces_legend_itemaudio:before {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
.eventregattarace {
|
||||
position: relative;
|
||||
border-top: 1px solid #ccc;
|
||||
padding: 0.666666666666667em 0;
|
||||
zoom: 1;
|
||||
}
|
||||
.eventregattarace:before,
|
||||
.eventregattarace:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.eventregattarace:after {
|
||||
clear: both;
|
||||
}
|
||||
.eventregattarace:last-of-type {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
.eventregattarace_fleetindicator {
|
||||
position: absolute;
|
||||
width: 0.333333333333333em;
|
||||
top: 0.333333333333333em;
|
||||
bottom: 0.333333333333333em;
|
||||
}
|
||||
.eventregattarace_details {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
min-height: 2.666666666666667em;
|
||||
padding: 0 1.333333333333333em;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.eventregattarace_details:last-of-type {
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.eventregattarace_name {
|
||||
width: 22%;
|
||||
}
|
||||
.eventregattarace_nameshort {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-right: 0.555555555555556em;
|
||||
margin-top: -0.194444444444444em;
|
||||
font-size: 2.4em;
|
||||
color: #ccc;
|
||||
font-weight: 700;
|
||||
}
|
||||
.eventregattarace_flag {
|
||||
display: none;
|
||||
width: 9%;
|
||||
min-height: 0;
|
||||
padding-top: 0.666666666666667em;
|
||||
}
|
||||
.eventregattarace_wind {
|
||||
width: 14%;
|
||||
}
|
||||
.eventregattarace_wind_strength {
|
||||
color: #008fcc;
|
||||
font-weight: 600;
|
||||
}
|
||||
.eventregattarace_leader {
|
||||
width: 24%;
|
||||
border-right: none;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.eventregattarace_leader_name {
|
||||
color: #008fcc;
|
||||
font-weight: 600;
|
||||
}
|
||||
.eventregattarace_features,
|
||||
.eventregattarace_legs {
|
||||
width: 17%;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
.eventregattarace_features_list,
|
||||
.eventregattarace_legs_list {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventregattarace_features {
|
||||
min-height: 0;
|
||||
padding-top: 0.666666666666667em;
|
||||
text-align: center;
|
||||
}
|
||||
.eventregattarace_legs_leg {
|
||||
display: inline-block;
|
||||
height: 10px;
|
||||
width: 20px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.eventregattarace_legs_leg[data-status*="finished"] {
|
||||
background-color: #f0ab00;
|
||||
}
|
||||
.eventregattarace_legs_leg[data-status*="running"] {
|
||||
background-color: #f00;
|
||||
}
|
||||
.eventregattarace_action {
|
||||
float: right;
|
||||
width: 13%;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
}
|
||||
.eventregattarace_action_watch,
|
||||
.eventregattarace_action_analyze {
|
||||
width: 9.666666666666666em;
|
||||
max-width: 100%;
|
||||
}
|
||||
.eventregattarace_action_watch {
|
||||
background-color: #f00;
|
||||
}
|
||||
.eventregattarace_action_watch:hover {
|
||||
background-color: #a71724;
|
||||
}
|
||||
.eventregattarace_actiondisabled {
|
||||
background-color: transparent;
|
||||
color: #666;
|
||||
cursor: initial;
|
||||
}
|
||||
.eventregattarace_actiondisabled:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
.eventregattarace_feature {
|
||||
display: inline-block;
|
||||
width: 1.733333333333333em;
|
||||
height: 1.733333333333333em;
|
||||
margin-right: 0.666666666666667em;
|
||||
background-image: url("images/home/race-features-icons.png");
|
||||
-webkit-background-size: auto 200%;
|
||||
-moz-background-size: auto 200%;
|
||||
background-size: auto 200%;
|
||||
}
|
||||
.eventregattarace_feature:last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
.eventregattarace_featuregps {
|
||||
background-position: 0 0;
|
||||
}
|
||||
.eventregattarace_featuregps.eventregattarace_featureunavailable {
|
||||
background-position: 0 100%;
|
||||
}
|
||||
.eventregattarace_featurewind {
|
||||
background-position: 33% 0;
|
||||
}
|
||||
.eventregattarace_featurewind.eventregattarace_featureunavailable {
|
||||
background-position: 33% 100%;
|
||||
}
|
||||
.eventregattarace_featurevideo {
|
||||
background-position: 66% 0;
|
||||
}
|
||||
.eventregattarace_featurevideo.eventregattarace_featureunavailable {
|
||||
background-position: 66% 100%;
|
||||
}
|
||||
.eventregattarace_featureaudio {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
.eventregattarace_featureaudio.eventregattarace_featureunavailable {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
.regattanavigation {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.regattanavigation_link {
|
||||
display: inline-block;
|
||||
margin-right: 2em;
|
||||
padding: 1em 0 0.733333333333333em 0;
|
||||
border-bottom: 0.266666666666667em solid transparent;
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
}
|
||||
.regattanavigation_link:hover,
|
||||
.regattanavigation_link:focus {
|
||||
border-bottom-color: #ddd;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
.regattanavigation_linkactive {
|
||||
border-bottom-color: #f0ab00;
|
||||
}
|
||||
.regattanavigation_linkactive:hover,
|
||||
.regattanavigation_linkactive:focus {
|
||||
border-bottom-color: #d89a00;
|
||||
}
|
||||
@media (min-width: 25em) {
|
||||
.eventregattarace_nameshort {
|
||||
float: left;
|
||||
}
|
||||
.eventregattarace_flag {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.Regatta;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaRaces extends AbstractEventComposite {
|
||||
private static EventRegattaRacesUiBinder uiBinder = GWT.create(EventRegattaRacesUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesUiBinder extends UiBinder<Widget, EventRegattaRaces> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) Regatta regatta;
|
||||
@UiField HTMLPanel regattaPhasesNavigationPanel;
|
||||
@UiField HTMLPanel regattaPhasesPanel;
|
||||
@UiField HTMLPanel rootPanel;
|
||||
|
||||
private final Timer timerForClientServerOffset;
|
||||
private final List<EventRegattaRacesPhase> phaseElements;
|
||||
|
||||
public EventRegattaRaces(EventDTO event, Timer timerForClientServerOffset, HomePlacesNavigator placeNavigator, EventPlaceNavigator pageNavigator) {
|
||||
super(event, pageNavigator);
|
||||
this.timerForClientServerOffset = timerForClientServerOffset;
|
||||
|
||||
phaseElements = new ArrayList<EventRegattaRacesPhase>();
|
||||
|
||||
regatta = new Regatta(event, timerForClientServerOffset, true, placeNavigator, pageNavigator);
|
||||
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setRaces(LeaderboardGroupDTO leaderboardGroup, boolean hasMultipleLeaderboardGroups, StrippedLeaderboardDTO leaderboard, RaceGroupDTO raceGroup) {
|
||||
// clear all existing child elements first
|
||||
regattaPhasesPanel.getElement().removeAllChildren();
|
||||
phaseElements.clear();
|
||||
|
||||
regatta.setData(leaderboardGroup, hasMultipleLeaderboardGroups, leaderboard, raceGroup);
|
||||
|
||||
int regattaPhases = raceGroup.getSeries().size();
|
||||
if(regattaPhases > 1) {
|
||||
for(RaceGroupSeriesDTO series: raceGroup.getSeries()) {
|
||||
EventRegattaRacesPhase regattaPhase = new EventRegattaRacesPhase(leaderboard, series, timerForClientServerOffset, getPageNavigator());
|
||||
regattaPhasesPanel.getElement().appendChild(regattaPhase.getElement());
|
||||
phaseElements.add(regattaPhase);
|
||||
}
|
||||
} else {
|
||||
RaceGroupSeriesDTO raceGroupSeriesDTO = raceGroup.getSeries().get(0);
|
||||
EventRegattaRacesPhase regattaPhase = new EventRegattaRacesPhase(leaderboard, raceGroupSeriesDTO, timerForClientServerOffset, getPageNavigator());
|
||||
regattaPhasesPanel.getElement().appendChild(regattaPhase.getElement());
|
||||
phaseElements.add(regattaPhase);
|
||||
}
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<g:HTMLPanel ui:field="rootPanel">
|
||||
|
||||
<!-- The races of races for a day-->
|
||||
<s:regatta.Regatta ui:field="regatta" />
|
||||
<div class="{local_res.css.regattanavigation}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<g:HTMLPanel ui:field="regattaPhasesNavigationPanel" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.eventregattaraces}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventregattaraces_legend}">
|
||||
<div class="{local_res.css.eventregattaraces_legend_item} {local_res.css.eventregattaraces_legend_itemgps}"><ui:text from='{i18n.eventRegattaRacesLegendGps}'/></div>
|
||||
<div class="{local_res.css.eventregattaraces_legend_item} {local_res.css.eventregattaraces_legend_itemwind}"><ui:text from='{i18n.eventRegattaRacesLegendWind}'/></div>
|
||||
<div class="{local_res.css.eventregattaraces_legend_item} {local_res.css.eventregattaraces_legend_itemvideo}"><ui:text from='{i18n.eventRegattaRacesLegendVideo}'/></div>
|
||||
<div class="{local_res.css.eventregattaraces_legend_item} {local_res.css.eventregattaraces_legend_itemaudio}"><ui:text from='{i18n.eventRegattaRacesLegendAudio}'/></div>
|
||||
</div>
|
||||
<g:HTMLPanel ui:field="regattaPhasesPanel" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.ui.UIObject;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
|
||||
public class EventRegattaRacesFleet extends UIObject {
|
||||
private static EventRegattaRacesFleetUiBinder uiBinder = GWT.create(EventRegattaRacesFleetUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesFleetUiBinder extends UiBinder<DivElement, EventRegattaRacesFleet> {
|
||||
}
|
||||
|
||||
@UiField SpanElement fleetName;
|
||||
@UiField DivElement fleetCountAndColor;
|
||||
|
||||
public EventRegattaRacesFleet(FleetDTO fleet, int maxNumberOfCompetitorsInFleetRace) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
fleetName.setInnerText(fleet.getName());
|
||||
if(fleet.getColor() != null) {
|
||||
fleetCountAndColor.getStyle().setBackgroundColor(fleet.getColor().getAsHtml());
|
||||
}
|
||||
if(maxNumberOfCompetitorsInFleetRace > 0) {
|
||||
fleetCountAndColor.setInnerText(String.valueOf(maxNumberOfCompetitorsInFleetRace));
|
||||
}
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<div class="{local_res.css.eventregattaraces_phase_fleet}">
|
||||
<div ui:field="fleetCountAndColor" class="{local_res.css.eventregattaraces_phase_fleet_count}"></div>
|
||||
<div class="{local_res.css.eventregattaraces_phase_fleet_name}"><span ui:field="fleetName" /></div>
|
||||
</div>
|
||||
</ui:UiBinder>
|
||||
-96
@@ -1,96 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
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.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.shared.EventDatesFormatterUtil;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaRacesFleetGroup extends Composite {
|
||||
private static EventRegattaRacesFleetGroupUiBinder uiBinder = GWT.create(EventRegattaRacesFleetGroupUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesFleetGroupUiBinder extends UiBinder<Widget, EventRegattaRacesFleetGroup> {
|
||||
}
|
||||
|
||||
@UiField DivElement fleetsPanel;
|
||||
@UiField DivElement racesFromToDate;
|
||||
@UiField DivElement racesFleetPanel;
|
||||
|
||||
public EventRegattaRacesFleetGroup(StrippedLeaderboardDTO leaderboard, RaceGroupSeriesDTO series, List<FleetDTO> fleetsToShow, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
for(FleetDTO fleet: fleetsToShow) {
|
||||
EventRegattaRacesFleet eventRegattaRacesFleet = new EventRegattaRacesFleet(fleet, 0);
|
||||
fleetsPanel.appendChild(eventRegattaRacesFleet.getElement());
|
||||
|
||||
updateFleetRacesUI(leaderboard, series, fleet, timerForClientServerOffset, pageNavigator);
|
||||
}
|
||||
}
|
||||
|
||||
public EventRegattaRacesFleetGroup(StrippedLeaderboardDTO leaderboard, RaceGroupSeriesDTO series, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
fleetsPanel.getStyle().setDisplay(Display.NONE);
|
||||
|
||||
FleetDTO defaultFleet = series.getFleets().get(0);
|
||||
updateFleetRacesUI(leaderboard, series, defaultFleet, timerForClientServerOffset, pageNavigator);
|
||||
}
|
||||
|
||||
private void updateFleetRacesUI(StrippedLeaderboardDTO leaderboard, RaceGroupSeriesDTO series, FleetDTO fleet, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
Date fromDate = null;
|
||||
Date toDate = null;
|
||||
|
||||
List<RaceColumnDTO> racesOfFleet = getRacesOfFleet(leaderboard, series, fleet);
|
||||
for(RaceColumnDTO raceColumn: racesOfFleet) {
|
||||
RaceColumnDTO raceColumnFromLeaderboard = leaderboard.getRaceColumnByName(raceColumn.getName());
|
||||
EventRegattaRacesRace race = new EventRegattaRacesRace(leaderboard, fleet, raceColumnFromLeaderboard, timerForClientServerOffset, pageNavigator);
|
||||
racesFleetPanel.appendChild(race.getElement());
|
||||
|
||||
Date startDate = raceColumnFromLeaderboard.getStartDate(fleet);
|
||||
if(startDate != null) {
|
||||
if(fromDate == null || startDate.before(fromDate)) {
|
||||
fromDate = startDate;
|
||||
}
|
||||
if(toDate == null || startDate.after(toDate)) {
|
||||
toDate = startDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fromDate != null && toDate != null) {
|
||||
racesFromToDate.setInnerText(EventDatesFormatterUtil.formatDateRangeWithYear(fromDate, toDate));
|
||||
} else {
|
||||
// no single race with a date
|
||||
racesFromToDate.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
}
|
||||
|
||||
private List<RaceColumnDTO> getRacesOfFleet(StrippedLeaderboardDTO leaderboard, RaceGroupSeriesDTO series, FleetDTO fleet) {
|
||||
List<RaceColumnDTO> racesColumnsOfFleet = new ArrayList<RaceColumnDTO>();
|
||||
for (RaceColumnDTO raceColumn : series.getRaceColumns()) {
|
||||
for (FleetDTO fleetOfRaceColumn : series.getFleets()) {
|
||||
if (fleet.equals(fleetOfRaceColumn)) {
|
||||
// We have to get the race column from the leaderboard, because the race column of the series
|
||||
// have no tracked race and would be displayed as inactive race.
|
||||
racesColumnsOfFleet.add(leaderboard.getRaceColumnByName(raceColumn.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return racesColumnsOfFleet;
|
||||
}
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<g:HTMLPanel>
|
||||
<div ui:field="fleetsPanel" class="{local_res.css.eventregattaraces_phase_fleets}"></div>
|
||||
<div ui:field="racesFromToDate" class="{local_res.css.eventregattaraces_phase_day}"></div>
|
||||
<div ui:field="racesFleetPanel" class="{local_res.css.eventregattaraces_phase_races}"></div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
|
||||
public class EventRegattaRacesNavigationLink extends Composite {
|
||||
private static EventRegattaRacesNavigationLinkUiBinder uiBinder = GWT.create(EventRegattaRacesNavigationLinkUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesNavigationLinkUiBinder extends UiBinder<Widget, EventRegattaRacesNavigationLink> {
|
||||
}
|
||||
|
||||
@UiField SpanElement phaseName;
|
||||
|
||||
public EventRegattaRacesNavigationLink(RaceGroupSeriesDTO series) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
phaseName.setInnerText(series.getName());
|
||||
}
|
||||
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<g:HTMLPanel>
|
||||
<a href="#phaseName" class="{local_res.css.regattanavigation_link}"><span ui:field="phaseName" /></a>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.ui.UIObject;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaRacesPhase extends UIObject {
|
||||
private static EventRegattaRacesPhaseUiBinder uiBinder = GWT.create(EventRegattaRacesPhaseUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesPhaseUiBinder extends UiBinder<DivElement, EventRegattaRacesPhase> {
|
||||
}
|
||||
|
||||
@UiField SpanElement phaseName;
|
||||
@UiField DivElement fleetGroupsPanel;
|
||||
|
||||
public EventRegattaRacesPhase(StrippedLeaderboardDTO leaderboard, RaceGroupSeriesDTO series, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
setElement(uiBinder.createAndBindUi(this));
|
||||
|
||||
if(series.getName().equals(LeaderboardNameConstants.DEFAULT_SERIES_NAME)) {
|
||||
phaseName.setInnerText(TextMessages.INSTANCE.races());
|
||||
} else {
|
||||
phaseName.setInnerText(series.getName());
|
||||
}
|
||||
|
||||
int numberOfFleets = series.getFleets().size();
|
||||
if(numberOfFleets > 1) {
|
||||
if(series.hasOrderedFleets()) {
|
||||
for(FleetDTO fleet: series.getFleets()) {
|
||||
// ordered fleets are splitted into different fleet groups -> e.g. Gold Silver
|
||||
List<FleetDTO> fleetsToShow = new ArrayList<FleetDTO>();
|
||||
fleetsToShow.add(fleet);
|
||||
EventRegattaRacesFleetGroup fleetGroup = new EventRegattaRacesFleetGroup(leaderboard, series, fleetsToShow, timerForClientServerOffset, pageNavigator);
|
||||
fleetGroupsPanel.appendChild(fleetGroup.getElement());
|
||||
}
|
||||
} else {
|
||||
// unordered fleets are NOT splitted into different fleet groups -> e.g. Blue, Yellow
|
||||
List<FleetDTO> fleetsToShow = new ArrayList<FleetDTO>(series.getFleets());
|
||||
EventRegattaRacesFleetGroup fleetGroup = new EventRegattaRacesFleetGroup(leaderboard, series, fleetsToShow, timerForClientServerOffset, pageNavigator);
|
||||
fleetGroupsPanel.appendChild(fleetGroup.getElement());
|
||||
}
|
||||
} else {
|
||||
// single fleet
|
||||
EventRegattaRacesFleetGroup fleetGroup = new EventRegattaRacesFleetGroup(leaderboard, series, timerForClientServerOffset, pageNavigator);
|
||||
fleetGroupsPanel.appendChild(fleetGroup.getElement());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<div class="{local_res.css.eventregattaraces_phase}">
|
||||
<h3 id="phaseName" class="{local_res.css.eventregattaraces_phase_name}"><span ui:field="phaseName" /></h3>
|
||||
<div ui:field="fleetGroupsPanel" />
|
||||
</div>
|
||||
</ui:UiBinder>
|
||||
-203
@@ -1,203 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
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.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.dto.CompetitorDTO;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class EventRegattaRacesRace extends Composite {
|
||||
private static EventRegattaRacesRaceUiBinder uiBinder = GWT.create(EventRegattaRacesRaceUiBinder.class);
|
||||
|
||||
private enum SimpleRaceStates { NOT_TRACKED, TRACKED, TRACKED_AND_LIVE, TRACKED_BUT_NOT_SCHEDULED };
|
||||
|
||||
interface EventRegattaRacesRaceUiBinder extends UiBinder<Widget, EventRegattaRacesRace> {
|
||||
}
|
||||
|
||||
@UiField DivElement fleetColor;
|
||||
@UiField SpanElement raceName;
|
||||
@UiField SpanElement raceName2;
|
||||
@UiField SpanElement raceState;
|
||||
@UiField SpanElement raceTime;
|
||||
@UiField SpanElement averageRaceWind;
|
||||
|
||||
@UiField DivElement raceNotTrackedDiv;
|
||||
@UiField DivElement raceNotScheduledDiv;
|
||||
@UiField DivElement watchRaceDiv;
|
||||
@UiField DivElement analyzeRaceDiv;
|
||||
@UiField Anchor watchRaceLink;
|
||||
@UiField Anchor analyzeRaceLink;
|
||||
|
||||
@UiField DivElement raceWinnerDiv;
|
||||
@UiField SpanElement raceWinner;
|
||||
@UiField DivElement raceLeaderDiv;
|
||||
@UiField SpanElement raceLeader;
|
||||
|
||||
@UiField DivElement raceFeaturesDiv;
|
||||
@UiField DivElement legProgressDiv;
|
||||
@UiField DivElement raceFlagDiv;
|
||||
@UiField DivElement windStatusDiv;
|
||||
|
||||
@UiField DivElement featureGPS;
|
||||
@UiField DivElement featureWind;
|
||||
@UiField DivElement featureAudio;
|
||||
@UiField DivElement featureVideo;
|
||||
|
||||
@UiField SpanElement currentLegNo;
|
||||
@UiField SpanElement totalLegsCount;
|
||||
|
||||
private final DateTimeFormat raceTimeFormat = DateTimeFormat.getFormat("EEE, h:mm a");
|
||||
|
||||
private final FleetDTO fleet;
|
||||
private final RaceColumnDTO raceColumn;
|
||||
private final RaceDTO race;
|
||||
private final Timer timerForClientServerOffset;
|
||||
|
||||
private Element[] allConditionalElements;
|
||||
|
||||
public EventRegattaRacesRace(StrippedLeaderboardDTO leaderboard, FleetDTO fleet, RaceColumnDTO raceColumn, Timer timerForClientServerOffset, EventPlaceNavigator pageNavigator) {
|
||||
this.fleet = fleet;
|
||||
this.raceColumn = raceColumn;
|
||||
this.timerForClientServerOffset = timerForClientServerOffset;
|
||||
race = raceColumn.getRace(fleet);
|
||||
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
allConditionalElements = new Element[] {raceWinnerDiv, raceLeaderDiv, watchRaceDiv, analyzeRaceDiv, raceNotTrackedDiv, raceNotScheduledDiv,
|
||||
raceFeaturesDiv, legProgressDiv, raceFlagDiv, windStatusDiv };
|
||||
|
||||
if(fleet.getColor() != null) {
|
||||
fleetColor.getStyle().setBackgroundColor(fleet.getColor().getAsHtml());
|
||||
}
|
||||
|
||||
raceName.setInnerText(raceColumn.getName());
|
||||
raceName2.setInnerText(raceColumn.getName());
|
||||
|
||||
if(race != null && race.trackedRace != null) {
|
||||
String raceViewerURL = pageNavigator.getRaceViewerURL(leaderboard, race);
|
||||
analyzeRaceLink.setHref(raceViewerURL);
|
||||
watchRaceLink.setHref(raceViewerURL);
|
||||
}
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private SimpleRaceStates getSimpleRaceState() {
|
||||
SimpleRaceStates simpleRaceState = SimpleRaceStates.NOT_TRACKED;
|
||||
|
||||
if(race != null && race.trackedRace != null && race.trackedRace.hasGPSData && race.trackedRace.hasWindData) {
|
||||
simpleRaceState = SimpleRaceStates.TRACKED;
|
||||
if(isLive()) {
|
||||
simpleRaceState = SimpleRaceStates.TRACKED_AND_LIVE;
|
||||
if(race.startOfRace == null) {
|
||||
simpleRaceState = SimpleRaceStates.TRACKED_BUT_NOT_SCHEDULED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return simpleRaceState;
|
||||
}
|
||||
|
||||
private boolean isLive() {
|
||||
return raceColumn.isLive(fleet, timerForClientServerOffset.getLiveTimePointInMillis());
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
averageRaceWind.setInnerText("tbd.");
|
||||
|
||||
for(Element el: allConditionalElements) {
|
||||
hideElement(el);
|
||||
}
|
||||
|
||||
switch(getSimpleRaceState()) {
|
||||
case NOT_TRACKED:
|
||||
showElement(raceNotTrackedDiv);
|
||||
break;
|
||||
case TRACKED_BUT_NOT_SCHEDULED:
|
||||
showElement(raceNotScheduledDiv);
|
||||
break;
|
||||
case TRACKED_AND_LIVE:
|
||||
showElement(watchRaceDiv);
|
||||
|
||||
if(race.startOfRace != null) {
|
||||
raceTime.setInnerText(raceTimeFormat.format(race.startOfRace));
|
||||
}
|
||||
if(race.trackedRaceStatistics.hasLegProgressData) {
|
||||
showElement(legProgressDiv);
|
||||
currentLegNo.setInnerText(String.valueOf(race.trackedRaceStatistics.currentLegNo));
|
||||
totalLegsCount.setInnerText(String.valueOf(race.trackedRaceStatistics.totalLegsCount));
|
||||
}
|
||||
if(race.trackedRaceStatistics.hasLeaderOrWinnerData && race.trackedRaceStatistics.leaderOrWinner != null) {
|
||||
showElement(raceLeaderDiv);
|
||||
updateWinnerOrLeader(raceLeader, race.trackedRaceStatistics.leaderOrWinner);
|
||||
}
|
||||
|
||||
break;
|
||||
case TRACKED:
|
||||
showElement(analyzeRaceDiv);
|
||||
|
||||
if(race.trackedRaceStatistics.hasLeaderOrWinnerData && race.trackedRaceStatistics.leaderOrWinner != null) {
|
||||
showElement(raceWinnerDiv);
|
||||
updateWinnerOrLeader(raceWinner, race.trackedRaceStatistics.leaderOrWinner);
|
||||
}
|
||||
if(race.startOfRace != null) {
|
||||
raceTime.setInnerText(raceTimeFormat.format(race.startOfRace));
|
||||
}
|
||||
showElement(raceFeaturesDiv);
|
||||
updateRaceFeatures();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateWinnerOrLeader(SpanElement winnerOrLeaderElement, CompetitorDTO winnerOrLeader) {
|
||||
String winnerOrLeaderName = winnerOrLeader.getName();
|
||||
if(winnerOrLeader.getThreeLetterIocCountryCode() != null) {
|
||||
winnerOrLeaderName += " (" + winnerOrLeader.getThreeLetterIocCountryCode() + ")";
|
||||
}
|
||||
winnerOrLeaderElement.setInnerText(winnerOrLeaderName);
|
||||
}
|
||||
|
||||
private void updateRaceFeatures() {
|
||||
if(!race.trackedRaceStatistics.hasGPSData) {
|
||||
featureGPS.addClassName(EventRegattaRacesResources.INSTANCE.css().eventregattarace_featureunavailable());
|
||||
}
|
||||
if(!race.trackedRaceStatistics.hasMeasuredWindData) {
|
||||
featureWind.addClassName(EventRegattaRacesResources.INSTANCE.css().eventregattarace_featureunavailable());
|
||||
}
|
||||
if(!race.trackedRaceStatistics.hasVideoData) {
|
||||
featureVideo.addClassName(EventRegattaRacesResources.INSTANCE.css().eventregattarace_featureunavailable());
|
||||
} else {
|
||||
featureVideo.setTitle(String.valueOf(race.trackedRaceStatistics.videoTracksCount));
|
||||
}
|
||||
if(!race.trackedRaceStatistics.hasAudioData) {
|
||||
featureAudio.addClassName(EventRegattaRacesResources.INSTANCE.css().eventregattarace_featureunavailable());
|
||||
} else {
|
||||
featureAudio.setTitle(String.valueOf(race.trackedRaceStatistics.audioTracksCount));
|
||||
}
|
||||
}
|
||||
|
||||
private void hideElement(Element el) {
|
||||
el.getStyle().setVisibility(Visibility.HIDDEN);
|
||||
el.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
private void showElement(Element el) {
|
||||
el.getStyle().setVisibility(Visibility.VISIBLE);
|
||||
el.getStyle().setDisplay(Display.INLINE_BLOCK);
|
||||
}
|
||||
}
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<g:HTMLPanel styleName="{local_res.css.eventregattarace}">
|
||||
<div ui:field="fleetColor" class="{local_res.css.eventregattarace_fleetindicator}"></div>
|
||||
<!-- race name -->
|
||||
<div class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_name}">
|
||||
<span ui:field="raceName" class="{local_res.css.eventregattarace_nameshort}"></span>
|
||||
<ui:text from='{i18n.eventRegattaRaceRace}'/> <span ui:field="raceName2" /><br></br>
|
||||
<span ui:field="raceState" /> <span ui:field="raceTime" />
|
||||
</div>
|
||||
<!-- race state if race.isScheduled and race.isTracked -->
|
||||
<div ui:field="raceFlagDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_flag}">
|
||||
<img src="raceFlag"></img>
|
||||
</div>
|
||||
<div ui:field="windStatusDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_wind}">
|
||||
<ui:text from='{i18n.eventRegattaRaceWind}'/><br></br>
|
||||
<span class="{local_res.css.eventregattarace_wind_strength}"><span ui:field="averageRaceWind" /></span>
|
||||
</div>
|
||||
<div ui:field="raceWinnerDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_leader}">
|
||||
<ui:text from="{i18n.eventRegattaRaceWinner}"/><br></br><span ui:field="raceWinner" class="{local_res.css.eventregattarace_leader_name}"></span>
|
||||
</div>
|
||||
<div ui:field="raceLeaderDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_leader}">
|
||||
<ui:text from="{i18n.eventRegattaRaceLeader}"/><br></br><span ui:field="raceLeader" class="{local_res.css.eventregattarace_leader_name}"></span>
|
||||
</div>
|
||||
<div ui:field="legProgressDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_legs}"><ui:text from='{i18n.leg}'/> <span ui:field="currentLegNo" />/<span ui:field="totalLegsCount" />
|
||||
<div class="{local_res.css.eventregattarace_legs_list}">
|
||||
<div data-status="r" class="{local_res.css.eventregattarace_legs_leg}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div ui:field="raceFeaturesDiv" class="{local_res.css.eventregattarace_details} {local_res.css.eventregattarace_features}">
|
||||
<div ui:field="featureGPS" class="{local_res.css.eventregattarace_feature} {local_res.css.eventregattarace_featuregps}"></div>
|
||||
<div ui:field="featureWind" class="{local_res.css.eventregattarace_feature} {local_res.css.eventregattarace_featurewind}"></div>
|
||||
<div ui:field="featureVideo" class="{local_res.css.eventregattarace_feature} {local_res.css.eventregattarace_featurevideo}"></div>
|
||||
<div ui:field="featureAudio" class="{local_res.css.eventregattarace_feature} {local_res.css.eventregattarace_featureaudio}"></div>
|
||||
</div>
|
||||
<div ui:field="raceNotTrackedDiv" class="{local_res.css.eventregattarace_action} {local_res.css.eventregattarace_actiondisabled}">
|
||||
<ui:text from='{i18n.eventRegattaRaceNotTracked}'/>
|
||||
</div>
|
||||
<div ui:field="raceNotScheduledDiv" class="{local_res.css.eventregattarace_action} {local_res.css.eventregattarace_actiondisabled}">
|
||||
<ui:text from='{i18n.raceNotScheduled}'/>
|
||||
</div>
|
||||
<div ui:field="watchRaceDiv" class="{local_res.css.eventregattarace_action}">
|
||||
<g:Anchor ui:field="watchRaceLink" target="_blank" styleName="{res.mainCss.button} {local_res.css.eventregattarace_action_watch}"><ui:text from='{i18n.eventRegattaRaceWatch}'/></g:Anchor>
|
||||
</div>
|
||||
<div ui:field="analyzeRaceDiv" class="{local_res.css.eventregattarace_action}">
|
||||
<g:Anchor ui:field="analyzeRaceLink" target="_blank" styleName="{res.mainCss.button} {local_res.css.eventregattarace_action_analyze}"><ui:text from='{i18n.eventRegattaRaceAnalyse}'/></g:Anchor>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
|
||||
|
||||
/**
|
||||
* Not used yet
|
||||
* @author Frank
|
||||
*
|
||||
*/
|
||||
public class EventRegattaRacesRaceday extends Composite {
|
||||
private static EventRegattaRacesRacedayUiBinder uiBinder = GWT.create(EventRegattaRacesRacedayUiBinder.class);
|
||||
|
||||
interface EventRegattaRacesRacedayUiBinder extends UiBinder<Widget, EventRegattaRacesRaceday> {
|
||||
}
|
||||
|
||||
@UiField DivElement raceDayDate;
|
||||
@UiField HTMLPanel racesPanel;
|
||||
|
||||
public EventRegattaRacesRaceday(RaceGroupSeriesDTO series) {
|
||||
EventRegattaRacesResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
raceDayDate.setInnerText("A date to fill in here");
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRacesResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<div ui:field="raceDayDate" class="{local_res.css.eventregattaraces_phase_day}"></div>
|
||||
<div class="{local_res.css.eventregattaraces_phase_races}">
|
||||
<g:HTMLPanel ui:field="racesPanel" />
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.CssResource.Shared;
|
||||
|
||||
public interface EventRegattaRacesResources extends ClientBundle {
|
||||
public static final EventRegattaRacesResources INSTANCE = GWT.create(EventRegattaRacesResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regattaraces/EventRegattaRaces.gss")
|
||||
LocalCss css();
|
||||
|
||||
@Shared
|
||||
public interface LocalCss extends CssResource {
|
||||
String eventregattaraces();
|
||||
String eventregattaraces_phase();
|
||||
String eventregattaraces_phase_name();
|
||||
String eventregattaraces_phase_day();
|
||||
String eventregattaraces_phase_races();
|
||||
String eventregattaraces_phase_fleets();
|
||||
String eventregattaraces_phase_fleet();
|
||||
String eventregattaraces_phase_fleet_name();
|
||||
String eventregattaraces_phase_fleet_count();
|
||||
String eventregattaraces_legend();
|
||||
String eventregattaraces_legend_item();
|
||||
String eventregattaraces_legend_itemgps();
|
||||
String eventregattaraces_legend_itemwind();
|
||||
String eventregattaraces_legend_itemvideo();
|
||||
String eventregattaraces_legend_itemaudio();
|
||||
String eventregattarace();
|
||||
String eventregattarace_fleetindicator();
|
||||
String eventregattarace_details();
|
||||
String eventregattarace_name();
|
||||
String eventregattarace_nameshort();
|
||||
String eventregattarace_flag();
|
||||
String eventregattarace_wind();
|
||||
String eventregattarace_wind_strength();
|
||||
String eventregattarace_leader();
|
||||
String eventregattarace_leader_name();
|
||||
String eventregattarace_features();
|
||||
String eventregattarace_legs();
|
||||
String eventregattarace_features_list();
|
||||
String eventregattarace_legs_list();
|
||||
String eventregattarace_legs_leg();
|
||||
String eventregattarace_action();
|
||||
String eventregattarace_action_watch();
|
||||
String eventregattarace_action_analyze();
|
||||
String eventregattarace_actiondisabled();
|
||||
String eventregattarace_feature();
|
||||
String eventregattarace_featuregps();
|
||||
String eventregattarace_featurewind();
|
||||
String eventregattarace_featurevideo();
|
||||
String eventregattarace_featureaudio();
|
||||
String eventregattarace_featureunavailable();
|
||||
String regattanavigation();
|
||||
String regattanavigation_link();
|
||||
String regattanavigation_linkactive();
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
-23
@@ -1,23 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.schedule;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class EventSchedule extends AbstractEventComposite {
|
||||
private static EventScheduleUiBinder uiBinder = GWT.create(EventScheduleUiBinder.class);
|
||||
|
||||
interface EventScheduleUiBinder extends UiBinder<Widget, EventSchedule> {
|
||||
}
|
||||
|
||||
public EventSchedule(EventDTO event, EventPlaceNavigator placeNavigator) {
|
||||
super(event, placeNavigator);
|
||||
|
||||
EventScheduleResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.schedule.EventScheduleResources" />
|
||||
<g:HTMLPanel>
|
||||
Event Media
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.schedule;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventScheduleResources extends ClientBundle {
|
||||
public static final EventScheduleResources INSTANCE = GWT.create(EventScheduleResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/schedule/EventSchedule.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
|
||||
}
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
.oldLeaderboardPanel {
|
||||
background-color:#f8f8f8;
|
||||
padding: 0 10px 10px 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.oldMultiLeaderboardPanel {
|
||||
background-color:#f8f8f8;
|
||||
padding: 0 10px 10px 10px;
|
||||
width: 100%;
|
||||
}
|
||||
-243
@@ -1,243 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.seriesanalytics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Visibility;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.History;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.domain.common.DetailType;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.domain.common.RaceIdentifier;
|
||||
import com.sap.sailing.domain.common.dto.FleetDTO;
|
||||
import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.CompactEventHeader;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldcompetitorcharts.OldCompetitorCharts;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldleaderboard.OldLeaderboard;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldmultileaderboard.OldMultiLeaderboard;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.ui.client.LeaderboardUpdateListener;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.leaderboard.LeaderboardSettings;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.gwt.client.ErrorReporter;
|
||||
import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||
|
||||
public class EventSeriesAnalytics extends Composite implements LeaderboardUpdateListener {
|
||||
private static EventSeriesAnalyticsUiBinder uiBinder = GWT.create(EventSeriesAnalyticsUiBinder.class);
|
||||
|
||||
interface EventSeriesAnalyticsUiBinder extends UiBinder<Widget, EventSeriesAnalytics> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
@UiField OldLeaderboard oldOverallLeaderboardComposite;
|
||||
@UiField OldCompetitorCharts oldCompetitorChartsComposite;
|
||||
@UiField OldMultiLeaderboard oldRegattaLeaderboardsComposite;
|
||||
@UiField(provided=true) CompactEventHeader eventHeader;
|
||||
|
||||
@UiField SpanElement title;
|
||||
@UiField DivElement liveRaceDiv;
|
||||
|
||||
@UiField HTMLPanel overallLeaderboardTabPanel;
|
||||
@UiField HTMLPanel regattaLeaderboardsTabPanel;
|
||||
@UiField HTMLPanel competitorChartsTabPanel;
|
||||
@UiField Anchor overallLeaderboardAnchor;
|
||||
@UiField Anchor regattaLeaderboardsAnchor;
|
||||
@UiField Anchor competitorChartsAnchor;
|
||||
|
||||
private final PlaceNavigation<SeriesPlace> overallLeaderboardNavigation;
|
||||
private final PlaceNavigation<SeriesPlace> regattaLeaderboardsNavigation;
|
||||
private final PlaceNavigation<SeriesPlace> competitorChartsNavigation;
|
||||
|
||||
private HTMLPanel activeTabPanel;
|
||||
private Widget activeContentWidget;
|
||||
private Anchor activeAnchor;
|
||||
private EventSeriesAnalyticsDataManager eventSeriesAnalyticsManager;
|
||||
private Timer autoRefreshTimer;
|
||||
private SeriesNavigationTabs navigationTab;
|
||||
|
||||
public EventSeriesAnalytics(EventDTO event, String leaderboardName, SeriesNavigationTabs navigationTab, Timer timerForClientServerOffset, HomePlacesNavigator placesNavigator) {
|
||||
this.navigationTab = navigationTab;
|
||||
|
||||
eventHeader = new CompactEventHeader(event, leaderboardName, placesNavigator);
|
||||
|
||||
EventRegattaLeaderboardResources.INSTANCE.css().ensureInjected();
|
||||
EventSeriesAnalyticsResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
String seriesTitle = leaderboardName;
|
||||
if(seriesTitle.endsWith(LeaderboardNameConstants.OVERALL)) {
|
||||
seriesTitle = seriesTitle.substring(0, seriesTitle.length() - LeaderboardNameConstants.OVERALL.length());
|
||||
seriesTitle = seriesTitle.trim();
|
||||
}
|
||||
title.setInnerText(seriesTitle);
|
||||
|
||||
overallLeaderboardTabPanel.setVisible(false);
|
||||
regattaLeaderboardsTabPanel.setVisible(false);
|
||||
competitorChartsTabPanel.setVisible(false);
|
||||
liveRaceDiv.getStyle().setVisibility(Visibility.HIDDEN);
|
||||
|
||||
overallLeaderboardNavigation = placesNavigator.getSeriesAnalyticsNavigation(event.id.toString(), SeriesNavigationTabs.OverallLeaderboard, leaderboardName,
|
||||
event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattaLeaderboardsNavigation = placesNavigator.getSeriesAnalyticsNavigation(event.id.toString(), SeriesNavigationTabs.RegattaLeaderboards, leaderboardName,
|
||||
event.getBaseURL(), event.isOnRemoteServer());
|
||||
competitorChartsNavigation = placesNavigator.getSeriesAnalyticsNavigation(event.id.toString(), SeriesNavigationTabs.CompetitorAnalytics, leaderboardName,
|
||||
event.getBaseURL(), event.isOnRemoteServer());
|
||||
|
||||
overallLeaderboardAnchor.setHref(overallLeaderboardNavigation.getTargetUrl());
|
||||
regattaLeaderboardsAnchor.setHref(regattaLeaderboardsNavigation.getTargetUrl());
|
||||
competitorChartsAnchor.setHref(competitorChartsNavigation.getTargetUrl());
|
||||
}
|
||||
|
||||
public void createSeriesAnalyticsViewer(SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor,
|
||||
Timer timer, LeaderboardSettings leaderboardSettings, String preselectedLeaderboardName, RaceIdentifier preselectedRace,
|
||||
String leaderboardGroupName, String metaLeaderboardName, ErrorReporter errorReporter,
|
||||
UserAgentDetails userAgent, boolean showRaceDetails,
|
||||
boolean autoExpandLastRaceColumn, boolean showSeriesLeaderboards) {
|
||||
this.autoRefreshTimer = timer;
|
||||
eventSeriesAnalyticsManager = new EventSeriesAnalyticsDataManager(sailingService, asyncActionsExecutor, timer, errorReporter, userAgent);
|
||||
eventSeriesAnalyticsManager.createOverallLeaderboardPanel(leaderboardSettings, preselectedRace, leaderboardGroupName, metaLeaderboardName, showRaceDetails, autoExpandLastRaceColumn);
|
||||
eventSeriesAnalyticsManager.createMultiLeaderboardPanel(leaderboardSettings, null /*preSelectedLeaderboardName */, preselectedRace, leaderboardGroupName, metaLeaderboardName, showRaceDetails, autoExpandLastRaceColumn);
|
||||
|
||||
DetailType initialDetailType = DetailType.OVERALL_RANK;
|
||||
List<DetailType> availableDetailsTypes = new ArrayList<DetailType>();
|
||||
availableDetailsTypes.add(DetailType.OVERALL_RANK);
|
||||
availableDetailsTypes.add(DetailType.REGATTA_TOTAL_POINTS_SUM);
|
||||
|
||||
eventSeriesAnalyticsManager.createMultiCompetitorChart(metaLeaderboardName, DetailType.OVERALL_RANK);
|
||||
|
||||
oldOverallLeaderboardComposite.setLeaderboard(eventSeriesAnalyticsManager.getLeaderboardPanel(), timer);
|
||||
oldRegattaLeaderboardsComposite.setMultiLeaderboard(eventSeriesAnalyticsManager.getMultiLeaderboardPanel(), timer);
|
||||
|
||||
oldCompetitorChartsComposite.setChart(eventSeriesAnalyticsManager.getMultiCompetitorChart(), availableDetailsTypes, initialDetailType);
|
||||
eventSeriesAnalyticsManager.hideCompetitorChart();
|
||||
|
||||
eventSeriesAnalyticsManager.getLeaderboardPanel().addLeaderboardUpdateListener(this);
|
||||
eventSeriesAnalyticsManager.getMultiLeaderboardPanel().addLeaderboardUpdateListener(this);
|
||||
|
||||
switch(navigationTab) {
|
||||
case OverallLeaderboard:
|
||||
setActiveTabPanel(overallLeaderboardTabPanel, eventSeriesAnalyticsManager.getLeaderboardPanel(), overallLeaderboardAnchor);
|
||||
break;
|
||||
case RegattaLeaderboards:
|
||||
setActiveTabPanel(regattaLeaderboardsTabPanel, eventSeriesAnalyticsManager.getMultiLeaderboardPanel(), regattaLeaderboardsAnchor);
|
||||
break;
|
||||
case CompetitorAnalytics:
|
||||
setActiveTabPanel(competitorChartsTabPanel, eventSeriesAnalyticsManager.getMultiCompetitorChart(), competitorChartsAnchor);
|
||||
DetailType selectedChartDetailType = oldCompetitorChartsComposite.getSelectedChartDetailType();
|
||||
eventSeriesAnalyticsManager.showCompetitorChart(selectedChartDetailType);
|
||||
break;
|
||||
}
|
||||
|
||||
activeContentWidget = eventSeriesAnalyticsManager.getLeaderboardPanel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatedLeaderboard(LeaderboardDTO leaderboard) {
|
||||
if(activeTabPanel == overallLeaderboardTabPanel) {
|
||||
StringMessages stringMessages = StringMessages.INSTANCE;
|
||||
|
||||
if(leaderboard != null) {
|
||||
List<Pair<RaceColumnDTO, FleetDTO>> liveRaces = leaderboard.getLiveRaces(autoRefreshTimer.getLiveTimePointInMillis());
|
||||
boolean hasLiveRace = !liveRaces.isEmpty();
|
||||
if (hasLiveRace) {
|
||||
String liveRaceText = "";
|
||||
if(liveRaces.size() == 1) {
|
||||
Pair<RaceColumnDTO, FleetDTO> liveRace = liveRaces.get(0);
|
||||
liveRaceText = stringMessages.raceIsLive("'" + liveRace.getA().getRaceColumnName() + "'");
|
||||
} else {
|
||||
String raceNames = "";
|
||||
for (Pair<RaceColumnDTO, FleetDTO> liveRace : liveRaces) {
|
||||
raceNames += "'" + liveRace.getA().getRaceColumnName() + "', ";
|
||||
}
|
||||
// remove last ", "
|
||||
raceNames = raceNames.substring(0, raceNames.length() - 2);
|
||||
liveRaceText = stringMessages.racesAreLive(raceNames);
|
||||
}
|
||||
liveRaceDiv.setInnerText(liveRaceText);
|
||||
} else {
|
||||
liveRaceDiv.setInnerText("");
|
||||
}
|
||||
liveRaceDiv.getStyle().setVisibility(hasLiveRace ? Visibility.VISIBLE : Visibility.HIDDEN);
|
||||
|
||||
oldOverallLeaderboardComposite.updatedLeaderboard(leaderboard, hasLiveRace);
|
||||
}
|
||||
} else if(activeTabPanel == regattaLeaderboardsTabPanel) {
|
||||
oldRegattaLeaderboardsComposite.updatedMultiLeaderboard(leaderboard, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void currentRaceSelected(RaceIdentifier raceIdentifier, RaceColumnDTO raceColumn) {
|
||||
}
|
||||
|
||||
@UiHandler("overallLeaderboardAnchor")
|
||||
void overallLeaderboardTabClicked(ClickEvent event) {
|
||||
setActiveTabPanel(overallLeaderboardTabPanel, eventSeriesAnalyticsManager.getLeaderboardPanel(), overallLeaderboardAnchor);
|
||||
handleClickEvent(event, overallLeaderboardNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("regattaLeaderboardsAnchor")
|
||||
void regattaLeaderboardsTabClicked(ClickEvent event) {
|
||||
setActiveTabPanel(regattaLeaderboardsTabPanel, eventSeriesAnalyticsManager.getMultiLeaderboardPanel(), regattaLeaderboardsAnchor);
|
||||
handleClickEvent(event, regattaLeaderboardsNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("competitorChartsAnchor")
|
||||
void competitorChartsTabClicked(ClickEvent event) {
|
||||
setActiveTabPanel(competitorChartsTabPanel, eventSeriesAnalyticsManager.getMultiCompetitorChart(), competitorChartsAnchor);
|
||||
DetailType selectedChartDetailType = oldCompetitorChartsComposite.getSelectedChartDetailType();
|
||||
eventSeriesAnalyticsManager.showCompetitorChart(selectedChartDetailType);
|
||||
oldCompetitorChartsComposite.updateSelectionState(eventSeriesAnalyticsManager.getCompetitorSelectionProvider());
|
||||
handleClickEvent(event, competitorChartsNavigation);
|
||||
}
|
||||
|
||||
private void setActiveTabPanel(HTMLPanel newActivePanel, Widget newActiveContentWidget, Anchor newActiveAnchor) {
|
||||
if(activeTabPanel != null) {
|
||||
activeTabPanel.setVisible(false);
|
||||
activeAnchor.removeStyleName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
}
|
||||
if(activeContentWidget != null) {
|
||||
activeContentWidget.setVisible(false);
|
||||
}
|
||||
|
||||
activeTabPanel = newActivePanel;
|
||||
activeContentWidget = newActiveContentWidget;
|
||||
activeAnchor = newActiveAnchor;
|
||||
activeTabPanel.setVisible(true);
|
||||
activeContentWidget.setVisible(true);
|
||||
activeAnchor.addStyleName(SharedResources.INSTANCE.mainCss().navbar_buttonactive());
|
||||
}
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
// don't use the placecontroller for navigation here as we want to avoid a page reload
|
||||
History.newItem(placeNavigation.getHistoryUrl(), false);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.series"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources" />
|
||||
<ui:with field="local_res2" type="com.sap.sailing.gwt.home.client.place.event.seriesanalytics.EventSeriesAnalyticsResources" />
|
||||
<g:HTMLPanel>
|
||||
<s:header.CompactEventHeader ui:field='eventHeader'/>
|
||||
<div class="{res.mediaCss.grid} {local_res.css.regattaleaderboard}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta}">
|
||||
<h3 class="{local_res.css.regattaleaderboard_meta_title}">
|
||||
<span style="color:darkgrey;"><ui:text from='{i18n.series}'/></span>
|
||||
<span ui:field="title"></span>
|
||||
</h3>
|
||||
<div ui:field="liveRaceDiv" class="{res.mainCss.label} {local_res.css.regattaleaderboard_meta_status} {local_res.css.regattaleaderboard_meta_statuslive}">
|
||||
<ui:text from='{i18n.live}'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.regattaleaderboard_meta_navigation}">
|
||||
<g:Anchor ui:field="overallLeaderboardAnchor" styleName="{res.mainCss.navbar_button}"><ui:text from="{i18n.overallLeaderboard}" /></g:Anchor>
|
||||
<g:Anchor ui:field="regattaLeaderboardsAnchor" styleName="{res.mainCss.navbar_button}"><ui:text from="{i18n.regattaLeaderboards}" /></g:Anchor>
|
||||
<g:Anchor ui:field="competitorChartsAnchor" styleName="{res.mainCss.navbar_button}"><ui:text from="{i18n.competitorsAnalytics}" /></g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
<g:HTMLPanel ui:field="overallLeaderboardTabPanel">
|
||||
<s:oldleaderboard.OldLeaderboard ui:field='oldOverallLeaderboardComposite'/>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="regattaLeaderboardsTabPanel">
|
||||
<s:oldmultileaderboard.OldMultiLeaderboard ui:field='oldRegattaLeaderboardsComposite'/>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="competitorChartsTabPanel">
|
||||
<s:oldcompetitorcharts.OldCompetitorCharts ui:field='oldCompetitorChartsComposite'/>
|
||||
</g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.seriesanalytics;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventSeriesAnalyticsResources extends ClientBundle {
|
||||
public static final EventSeriesAnalyticsResources INSTANCE = GWT.create(EventSeriesAnalyticsResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/seriesanalytics/EventSeriesAnalytics.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String oldLeaderboardPanel();
|
||||
String oldMultiLeaderboardPanel();
|
||||
}
|
||||
}
|
||||
-1
@@ -16,7 +16,6 @@ import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.app.ApplicationHistoryMapper;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.AbstractMultiregattaEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event2;
|
||||
|
||||
import com.sap.sailing.gwt.ui.client.SailingClientFactory;
|
||||
|
||||
public interface EventClientFactory extends SailingClientFactory {
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.sap.sailing.gwt.home.client.place.event2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
package com.sap.sailing.gwt.home.client.place.event2.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.regatta;
|
||||
package com.sap.sailing.gwt.home.client.place.event2.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event2.legacy;
|
||||
|
||||
import com.sap.sailing.gwt.ui.client.SailingClientFactory;
|
||||
|
||||
public interface SeriesClientFactory extends SailingClientFactory {
|
||||
|
||||
// SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs
|
||||
// navigationTab, Timer timerForClientServerOffset);
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.series;
|
||||
package com.sap.sailing.gwt.home.client.place.event2.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
+1
-1
@@ -3,8 +3,8 @@ package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventView.PlaceCallback;
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.common.client.i18n.TextMessages"/>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.regattalist.EventRegattaListResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event2.partials.eventregatta.EventRegattaListResources" />
|
||||
<g:HTMLPanel>
|
||||
<!-- A list of regattas-->
|
||||
<div class="{local_res.css.eventregattalist}">
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.google.gwt.resources.client.CssResource;
|
||||
public interface EventRegattaListResources extends ClientBundle {
|
||||
public static final EventRegattaListResources INSTANCE = GWT.create(EventRegattaListResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/regattalist/EventRegattaList.css")
|
||||
@Source("EventRegattaList.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
|
||||
+1
-2
@@ -5,9 +5,8 @@ import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventView.PlaceCallback;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.regattaanalytics;
|
||||
package com.sap.sailing.gwt.home.client.place.event2.regatta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
+1
-1
@@ -13,8 +13,8 @@ import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.sap.sailing.domain.common.DetailType;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldcompetitorcharts.OldCompetitorCharts;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.EventRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.EventRegattaView.Presenter;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.RegattaTabView;
|
||||
import com.sap.sailing.gwt.home.client.shared.placeholder.Placeholder;
|
||||
|
||||
+1
-1
@@ -13,8 +13,8 @@ import com.sap.sailing.domain.common.dto.LeaderboardDTO;
|
||||
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.oldleaderboard.OldLeaderboard;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.EventRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.EventRegattaView.Presenter;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.regatta.RegattaTabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.utils.EventParamUtils;
|
||||
|
||||
+1
-1
@@ -13,8 +13,8 @@ import com.sap.sailing.gwt.home.client.app.ApplicationHistoryMapper;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event2.legacy.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sse.gwt.client.mvp.ErrorView;
|
||||
|
||||
Loaded 100 of 120 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user