Merge branch 'design2015-cleanup' into design2015

* design2015-cleanup:
  Cleaned up, renamed packages
  Removed unused old event/ series/ regatta implementation
This commit is contained in:
Papick Garcia Taboada committed 2015-03-17 18:34:20 +01:00
commit 377549ba13
208 files changed
+437 -6355

No files matched your search

@@ -9,17 +9,19 @@ 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.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;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaLeaderboardPlace;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventActivityProxy;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.EventPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.RegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.SeriesPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.events.EventsActivityProxy;
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
import com.sap.sailing.gwt.home.client.place.fakeseries.AbstractSeriesPlace;
@@ -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;
@@ -4,10 +4,9 @@ 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.event.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();
}
@@ -4,14 +4,16 @@ 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.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;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaLeaderboardPlace;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.EventPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.RegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.legacy.SeriesPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
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.fakeseries.tabs.EventSeriesCompetitorAnalyticsPlace;
@@ -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;
@@ -3,18 +3,16 @@ package com.sap.sailing.gwt.home.client.app;
import com.google.gwt.place.shared.PlaceController;
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.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventDefaultPlace;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs.MultiregattaRegattasPlace;
import com.sap.sailing.gwt.home.client.place.event2.regatta.AbstractEventRegattaPlace;
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.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
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));
}
@@ -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());
@@ -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() {
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2;
package com.sap.sailing.gwt.home.client.place.event;
import java.util.HashMap;
import java.util.List;
@@ -16,9 +16,8 @@ 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.event.regatta.AbstractEventRegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
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.start.StartPlace;
@@ -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;
}
}
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2;
package com.sap.sailing.gwt.home.client.place.event;
import java.util.HashMap;
import java.util.Map;
@@ -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);
}
}));
}
}
}
@@ -1,25 +1,136 @@
package com.sap.sailing.gwt.home.client.place.event;
import java.util.UUID;
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.multiregatta.AbstractMultiregattaEventPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaActivity;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.EventRegattaActivity;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
import com.sap.sse.gwt.client.mvp.AbstractActivityProxy;
public class EventActivityProxy extends AbstractActivityProxy {
private final EventClientFactory clientFactory;
private final EventPlace place;
private AbstractEventPlace place;
private EventContext ctx;
private EventClientFactory clientFactory;
private HomePlacesNavigator homePlacesNavigator;
public EventActivityProxy(EventPlace place, EventClientFactory clientFactory) {
public EventActivityProxy(AbstractEventPlace place, EventClientFactory clientFactory,
HomePlacesNavigator homePlacesNavigator) {
this.place = place;
this.homePlacesNavigator = homePlacesNavigator;
this.ctx = this.place.getCtx();
this.clientFactory = clientFactory;
}
@Override
protected void startAsync() {
if (ctx.getEventDTO() != null) {
afterEventLoad();
} else {
final UUID eventUUID = UUID.fromString(ctx.getEventId());
clientFactory.getSailingService().getEventViewById(eventUUID, new AsyncCallback<EventViewDTO>() {
@Override
public void onSuccess(final EventViewDTO event) {
ctx.updateContext(event);
afterEventLoad();
}
@Override
public void onFailure(Throwable caught) {
// TODO @FM: extract text?
ErrorPlace errorPlace = new ErrorPlace("Error while loading the event with service getEventViewById()");
// TODO @FM: reload sinnvoll hier?
errorPlace.setComingFrom(place);
clientFactory.getPlaceController().goTo(errorPlace);
}
});
}
}
private void afterEventLoad() {
if(place instanceof EventDefaultPlace) {
place = getRealPlace();
}
place = verifyAndAdjustPlace();
afterLoad();
}
private void afterLoad() {
GWT.runAsync(new AbstractRunAsyncCallback() {
@Override
public void onSuccess() {
super.onSuccess(new EventActivity(place, clientFactory));
if(place instanceof AbstractEventRegattaPlace) {
super.onSuccess(new EventRegattaActivity((AbstractEventRegattaPlace) place, clientFactory,
homePlacesNavigator));
}
if(place instanceof AbstractMultiregattaEventPlace) {
super.onSuccess(new EventMultiregattaActivity((AbstractMultiregattaEventPlace) place,
clientFactory, homePlacesNavigator));
}
}
});
}
private AbstractEventPlace getRealPlace() {
EventViewDTO event = ctx.getEventDTO();
if(event.getType() == EventType.SERIES_EVENT || event.getType() == EventType.SINGLE_REGATTA) {
// TODO Overview isn't implemented yet
// return new RegattaOverviewPlace(new EventContext(ctx.getEventDTO()));
return new RegattaRacesPlace(new EventContext(ctx).withRegattaId(null));
}
// TODO Overview isn't implemented yet
// return new MultiregattaOverviewPlace(place.getCtx());
return new MultiregattaRegattasPlace(place.getCtx());
}
/**
* Checks if the place is valid for the given event.
* If not, the place is automatically being adjusted.
*/
private AbstractEventPlace verifyAndAdjustPlace() {
EventContext contextWithoutRegatta = new EventContext(ctx).withRegattaId(null);
// TODO check if regatta ID is valid
if(place instanceof AbstractMultiregattaEventPlace && ctx.getEventDTO().getType() != EventType.MULTI_REGATTA) {
// Events with a type other than multi regatta only have regatta level pages
if(place instanceof MultiregattaRegattasPlace) {
return new RegattaRacesPlace(contextWithoutRegatta);
}
if(place instanceof MultiregattaMediaPlace) {
return new RegattaMediaPlace(contextWithoutRegatta);
}
// TODO Overview isn't implemented yet
// return new RegattaOverviewPlace(ctxToUse);
return new RegattaRacesPlace(contextWithoutRegatta);
}
if(place instanceof AbstractEventRegattaPlace) {
boolean regattaKnown = ctx.getEventDTO().isRegattaIDKnown(ctx.getRegattaId());
if(ctx.getEventDTO().getType() != EventType.MULTI_REGATTA && ctx.getRegattaId() != null && !regattaKnown) {
// Regatta ID unknown but unnecessary ...
ctx.withRegattaId(null);
} else if(ctx.getEventDTO().getType() == EventType.MULTI_REGATTA && !regattaKnown) {
return new MultiregattaRegattasPlace(contextWithoutRegatta);
}
}
if(place instanceof RegattaMediaPlace && ctx.getEventDTO().getType() == EventType.MULTI_REGATTA) {
// The media page for multi regatta events is on event level only but not on regatta level
return new MultiregattaMediaPlace(new EventContext(ctx).withRegattaId(null));
}
// no adjustment necessary
return place;
}
}
@@ -1,15 +1,6 @@
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);
}
@@ -1,8 +1,8 @@
package com.sap.sailing.gwt.home.client.place.event2;
package com.sap.sailing.gwt.home.client.place.event;
import java.util.List;
import com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsDataManager;
import com.sap.sailing.gwt.home.client.place.event.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,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2;
package com.sap.sailing.gwt.home.client.place.event;
import com.google.gwt.place.shared.Prefix;
@@ -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);
}
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2;
package com.sap.sailing.gwt.home.client.place.event;
public class EventPrefixes {
@@ -2,11 +2,79 @@ 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;
import com.google.gwt.place.shared.Place;
import com.google.gwt.safehtml.shared.SafeUri;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.IsWidget;
import com.sap.sailing.domain.common.dto.RaceDTO;
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
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.start.StartPlace;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sailing.gwt.ui.shared.eventview.HasRegattaMetadata;
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
import com.sap.sse.gwt.client.player.Timer;
public interface EventView {
Widget asWidget();
public interface EventView<PLACE extends AbstractEventPlace, PRES extends EventView.Presenter> extends IsWidget {
public interface Presenter {
EventContext getCtx();
void handleTabPlaceSelection(TabView<?, ? extends Presenter> selectedActivity);
SafeUri getUrl(AbstractEventPlace place);
void navigateTo(Place place);
boolean needsSelectionInHeader();
void forPlaceSelection(PlaceCallback callback);
Timer getTimerForClientServerOffset();
SailingServiceAsync getSailingService();
AbstractEventRegattaPlace getPlaceForRegatta(String regattaId);
AbstractEventRegattaPlace getPlaceForRegattaRaces(String regattaId);
PlaceNavigation<StartPlace> getHomeNavigation();
PlaceNavigation<EventsPlace> getEventsNavigation();
PlaceNavigation<EventDefaultPlace> getCurrentEventNavigation();
PlaceNavigation<SeriesDefaultPlace> getCurrentEventSeriesNavigation();
boolean showRegattaMetadata();
HasRegattaMetadata getRegattaMetadata();
String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race);
PlaceNavigation<RegattaRacesPlace> getRegattaRacesNavigation(String regattaName);
PlaceNavigation<RegattaRacesPlace> getRegattaNavigation(String regattaName);
void ensureRegattaStructure(AsyncCallback<List<RaceGroupDTO>> callback);
void ensureMedia(AsyncCallback<MediaDTO> asyncCallback);
boolean hasMedia();
}
void updateEventRaceStates(List<RegattaOverviewEntryDTO> racesStateEntries);
public interface PlaceCallback {
void forPlace(AbstractEventPlace place, String title, boolean active);
}
/**
* This is the presenter the view can talk to.
*
* @param currentPresenter
*/
void registerPresenter(PRES currentPresenter);
/**
* Tell the view to process tabbar place navigation
*
* @param place
*/
void navigateTabsTo(PLACE place);
void showErrorInCurrentTab(IsWidget errorView);
}
@@ -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();
}
@@ -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;
}
}
@@ -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>
@@ -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));
}
}
@@ -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>
@@ -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();
}
}
}
@@ -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>
@@ -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;
}
@@ -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);
// }
// }
// }
}
@@ -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>
@@ -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();
}
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event;
package com.sap.sailing.gwt.home.client.place.event.legacy;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.regatta;
package com.sap.sailing.gwt.home.client.place.event.legacy;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
@@ -0,0 +1,9 @@
package com.sap.sailing.gwt.home.client.place.event.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,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.series;
package com.sap.sailing.gwt.home.client.place.event.legacy;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
@@ -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));
}
}
@@ -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>
@@ -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,7 +1,7 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
public abstract class AbstractMultiregattaEventPlace extends AbstractEventPlace {
@@ -1,12 +1,12 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
package com.sap.sailing.gwt.home.client.place.event.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.AbstractEventActivity;
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.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.PlaceCallback;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.PlaceCallback;
public class EventMultiregattaActivity extends AbstractEventActivity<AbstractMultiregattaEventPlace> implements EventMultiregattaView.Presenter {
@@ -1,6 +1,6 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView;
public interface EventMultiregattaView extends EventView<AbstractMultiregattaEventPlace, EventMultiregattaView.Presenter> {
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta;
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -14,7 +14,7 @@ import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
import com.sap.sailing.gwt.home.client.app.ApplicationHistoryMapper;
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
import com.sap.sailing.gwt.home.client.place.event2.partials.header.EventHeader;
import com.sap.sailing.gwt.home.client.place.event.partials.header.EventHeader;
import com.sap.sailing.gwt.ui.client.StringMessages;
public class TabletAndDesktopEventView extends Composite implements EventMultiregattaView {
@@ -2,8 +2,8 @@
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:c="urn:import:com.sap.sailing.gwt.common.client.controls.tabbar"
xmlns:tabs="urn:import:com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs"
xmlns:h="urn:import:com.sap.sailing.gwt.home.client.place.event2.partials.header">
xmlns:tabs="urn:import:com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs"
xmlns:h="urn:import:com.sap.sailing.gwt.home.client.place.event.partials.header">
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<ui:style>
.header {
@@ -1,10 +1,10 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import com.google.gwt.place.shared.Prefix;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
import com.sap.sailing.gwt.home.client.place.event2.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.AbstractMultiregattaEventPlace;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
public class MultiregattaMediaPlace extends AbstractMultiregattaEventPlace {
public MultiregattaMediaPlace(String id) {
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -7,9 +7,9 @@ import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
import com.sap.sailing.gwt.home.client.shared.media.MediaPage;
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
@@ -1,10 +1,10 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import com.google.gwt.place.shared.Prefix;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
import com.sap.sailing.gwt.home.client.place.event2.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.AbstractMultiregattaEventPlace;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
public class MultiregattaOverviewPlace extends AbstractMultiregattaEventPlace {
public MultiregattaOverviewPlace(String id) {
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -6,9 +6,9 @@ import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
/**
* Created by pgtaboada on 25.11.14.
@@ -1,10 +1,10 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import com.google.gwt.place.shared.Prefix;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
import com.sap.sailing.gwt.home.client.place.event2.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.AbstractMultiregattaEventPlace;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
public class MultiregattaRegattasPlace extends AbstractMultiregattaEventPlace {
public MultiregattaRegattasPlace(String id) {
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.multiregatta.tabs;
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
import java.util.HashMap;
import java.util.List;
@@ -13,10 +13,10 @@ import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.EventMultiregattaView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event2.partials.eventregatta.EventRegattaList;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.partials.eventregatta.EventRegattaList;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
@@ -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}">
@@ -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;
}
@@ -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() {
}
}
@@ -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&nbsp;{result.totalRaces}&nbsp;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:&nbsp;{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&nbsp;{result.totalRaces}&nbsp;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&nbsp;<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&nbsp;<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}&nbsp;-&nbsp;{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&nbsp;&nbsp;hrs and&nbsp;&nbsp;minutes&nbsp;
</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}">&nbsp;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>
@@ -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();
}
}
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials;
package com.sap.sailing.gwt.home.client.place.event.partials;
import java.util.ArrayList;
import java.util.List;
@@ -21,9 +21,9 @@ import com.sap.sailing.gwt.common.client.BoatClassImageResolver;
import com.sap.sailing.gwt.common.client.BoatClassImageResources;
import com.sap.sailing.gwt.common.client.LinkUtil;
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
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;
@@ -4,7 +4,7 @@
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.event2.partials.RegattaResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.RegattaResources" />
<g:HTMLPanel>
<!-- A view, introducing a regatta-->
<div ui:field="regattaDiv" class="{local_res.css.regatta}" data-labeltype="">
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials;
package com.sap.sailing.gwt.home.client.place.event.partials;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.AnchorElement;
@@ -13,8 +13,8 @@ import com.sap.sailing.domain.common.LeaderboardNameConstants;
import com.sap.sailing.domain.common.dto.RaceColumnDTO;
import com.sap.sailing.gwt.common.client.LinkUtil;
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
@@ -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.regatta.RegattaResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.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:;">
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event.regatta;
package com.sap.sailing.gwt.home.client.place.event.partials;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
@@ -4,6 +4,6 @@
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:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.RegattaResources" />
<div ui:field="raceStatus" class="{local_res.css.regatta_intro_phases_phase_races_race}"></div>
</ui:UiBinder>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials;
package com.sap.sailing.gwt.home.client.place.event.partials;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.eventregatta;
package com.sap.sailing.gwt.home.client.place.event.partials.eventregatta;
import java.util.ArrayList;
import java.util.HashMap;
@@ -20,9 +20,9 @@ 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.common.client.SharedResources;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.partials.Regatta;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.partials.Regatta;
import com.sap.sailing.gwt.home.client.shared.LongNamesUtil;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
@@ -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.event.partials.eventregatta.EventRegattaListResources" />
<g:HTMLPanel>
<!-- A list of regattas-->
<div class="{local_res.css.eventregattalist}">
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event.regattalist;
package com.sap.sailing.gwt.home.client.place.event.partials.eventregatta;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
@@ -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,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.header;
package com.sap.sailing.gwt.home.client.place.event.partials.header;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.AnchorElement;
@@ -2,7 +2,7 @@
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder">
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<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.event2.partials.header.EventHeaderResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.header.EventHeaderResources" />
<ui:style>
.important {
font-weight: bold;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.header;
package com.sap.sailing.gwt.home.client.place.event.partials.header;
import java.util.Date;
@@ -25,10 +25,10 @@ import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.event.shared.HandlerRegistration;
import com.sap.sailing.gwt.common.client.LinkUtil;
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.PlaceCallback;
import com.sap.sailing.gwt.home.client.place.event2.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.PlaceCallback;
import com.sap.sailing.gwt.home.client.place.event.EventView.Presenter;
import com.sap.sailing.gwt.home.client.shared.EventDatesFormatterUtil;
import com.sap.sailing.gwt.home.client.shared.LabelTypeUtil;
import com.sap.sailing.gwt.home.client.shared.sharing.SharingButtons;
@@ -5,7 +5,7 @@
xmlns:sharing="urn:import:com.sap.sailing.gwt.home.client.shared.sharing">
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<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.event2.partials.header.EventHeaderResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.header.EventHeaderResources" />
<g:HTMLPanel addStyleNames="{res.mediaCss.grid}">
<div class="{res.mediaCss.small12} {res.mediaCss.large9} {res.mediaCss.columns}">
<div class="{local_res.css.eventheader_intro}">
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.header;
package com.sap.sailing.gwt.home.client.place.event.partials.header;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaHeader;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaHeader;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -2,12 +2,12 @@
<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.event2.partials"
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event.partials"
>
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<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.event2.partials.regattaHeader.RegattaHeaderResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.regattaHeader.RegattaHeaderResources" />
<g:HTMLPanel>
<!-- The regatta header contains basic regatta information-->
<div>
@@ -2,12 +2,12 @@
<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.event2.ui"
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event.ui"
>
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<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.event2.ui.regattaHeader.RegattaHeaderResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.ui.regattaHeader.RegattaHeaderResources" />
<g:HTMLPanel>
<div class="{local_res.css.regattaheader_logo}">
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaHeader;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaHeader;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import java.util.ArrayList;
import java.util.List;
@@ -9,9 +9,9 @@ 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.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event2.partials.Regatta;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.partials.Regatta;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
@@ -1,10 +1,10 @@
<!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.event2.partials">
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.place.event.partials">
<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.event2.partials.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.regattaraces.EventRegattaRacesResources" />
<g:HTMLPanel ui:field="rootPanel">
<!-- The races of races for a day-->
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.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>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import java.util.ArrayList;
import java.util.Date;
@@ -13,7 +13,7 @@ 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.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView;
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;
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.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>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.SpanElement;
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.regattaraces.EventRegattaRacesResources" />
<g:HTMLPanel>
<a href="#phaseName" class="{local_res.css.regattanavigation_link}"><span ui:field="phaseName" /></a>
</g:HTMLPanel>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import java.util.ArrayList;
import java.util.List;
@@ -12,7 +12,7 @@ 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.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.ui.shared.RaceGroupSeriesDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.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" />
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
@@ -16,8 +16,8 @@ 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.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.Presenter;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.Presenter;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
public class EventRegattaRacesRace extends Composite {
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.regattaraces.EventRegattaRacesResources" />
<g:HTMLPanel styleName="{local_res.css.eventregattarace}">
<div ui:field="fleetColor" class="{local_res.css.eventregattarace_fleetindicator}"></div>
<!-- race name -->
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
@@ -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.regattaraces.EventRegattaRacesResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.client.place.event.partials.regattaraces.EventRegattaRacesResources" />
<g:HTMLPanel>
<div ui:field="raceDayDate" class="{local_res.css.eventregattaraces_phase_day}"></div>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.client.place.event2.partials.regattaraces;
package com.sap.sailing.gwt.home.client.place.event.partials.regattaraces;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
@@ -1,7 +1,7 @@
package com.sap.sailing.gwt.home.client.place.event2.regatta;
package com.sap.sailing.gwt.home.client.place.event.regatta;
import com.sap.sailing.gwt.home.client.place.event2.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event2.EventContext;
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
public abstract class AbstractEventRegattaPlace extends AbstractEventPlace {
@@ -1,17 +1,16 @@
package com.sap.sailing.gwt.home.client.place.event2.regatta;
package com.sap.sailing.gwt.home.client.place.event.regatta;
import com.google.gwt.event.shared.EventBus;
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.AbstractEventActivity;
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.EventContext;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.EventView.PlaceCallback;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.EventContext;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.EventView.PlaceCallback;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
import com.sap.sailing.gwt.ui.shared.eventview.RegattaReferenceDTO;
@@ -1,8 +1,8 @@
package com.sap.sailing.gwt.home.client.place.event2.regatta;
package com.sap.sailing.gwt.home.client.place.event.regatta;
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
import com.sap.sailing.gwt.home.client.place.event2.EventView;
import com.sap.sailing.gwt.home.client.place.event2.regatta.tabs.RegattaRacesPlace;
import com.sap.sailing.gwt.home.client.place.event.EventView;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
import com.sap.sse.gwt.client.player.Timer;
public interface EventRegattaView extends EventView<AbstractEventRegattaPlace, EventRegattaView.Presenter> {
@@ -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();
}
}
}
@@ -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}'/>&nbsp;<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}'/>&nbsp;<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}'/>&nbsp;<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}'/>:&nbsp;<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>
Loaded 100 of 208 files, more files were not shown because too many files have changed in this diff. Show more