mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-10 22:30:56 +00:00
Merge branch 'bug3729'
This commit is contained in:
commit
1e9de3fdbc
6 files changed
+26
-21
No files matched your search
+1
-1
@@ -13,7 +13,7 @@ public class AutoPlayEntryPoint extends AbstractMvpEntryPoint<StringMessages, Au
|
||||
@Override
|
||||
public void doOnModuleLoad() {
|
||||
AutoPlayAppClientFactory clientFactory = GWT.create(AutoPlayAppClientFactory.class);
|
||||
|
||||
|
||||
AutoPlayAppHistoryMapper applicationHistoryMapper = GWT.create(AutoPlayAppHistoryMapper.class);
|
||||
initMvp(clientFactory, applicationHistoryMapper, new AutoPlayAppActivityMapper(clientFactory));
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class DesktopApplicationClientFactory extends AbstractApplicationClientFa
|
||||
|
||||
@Override
|
||||
public StartView createStartView() {
|
||||
return new DesktopStartView(getPlaceNavigator(), getEventBus());
|
||||
return new DesktopStartView(getPlaceNavigator(), getEventBus(), getUserService());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ public class AutoPlayController implements RaceTimesInfoProviderListener, Leader
|
||||
playerView.clearContent();
|
||||
boolean withFullscreenButton = autoPlayerConfiguration.isFullscreenMode() && isInitialScreen;
|
||||
LeaderboardWithHeaderPerspective leaderboardPerspective = new LeaderboardWithHeaderPerspective(leaderboardPerspectiveLifecycleWithAllSettings,
|
||||
sailingService, asyncActionsExecutor,
|
||||
sailingService, userService, asyncActionsExecutor,
|
||||
new CompetitorSelectionModel(/* hasMultiSelection */ true), leaderboardTimer,
|
||||
autoPlayerConfiguration.getLeaderboardName(), errorReporter, StringMessages.INSTANCE,
|
||||
userAgent, withFullscreenButton);
|
||||
|
||||
+9
-6
@@ -27,6 +27,7 @@ import com.sap.sailing.gwt.autoplay.client.app.PlaceNavigator;
|
||||
import com.sap.sailing.gwt.autoplay.client.place.player.AutoPlayerConfiguration;
|
||||
import com.sap.sailing.gwt.autoplay.client.shared.leaderboard.LeaderboardWithHeaderPerspectiveLifecycle;
|
||||
import com.sap.sailing.gwt.autoplay.client.shared.leaderboard.LeaderboardWithHeaderPerspectiveSettings;
|
||||
import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardPerspectiveLifecycle;
|
||||
@@ -38,11 +39,12 @@ import com.sap.sse.common.settings.Settings;
|
||||
import com.sap.sse.gwt.client.GWTLocaleUtil;
|
||||
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
|
||||
import com.sap.sse.gwt.client.event.LocaleChangeEvent;
|
||||
import com.sap.sse.gwt.client.sapheader.SAPHeader;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeLifecycleTabbedSettingsDialog;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveLifecycle;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveLifecycleWithAllSettings;
|
||||
import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication;
|
||||
import com.sap.sse.security.ui.client.UserService;
|
||||
|
||||
public class DesktopStartView extends Composite implements StartView {
|
||||
private static StartPageViewUiBinder uiBinder = GWT.create(StartPageViewUiBinder.class);
|
||||
@@ -50,7 +52,7 @@ public class DesktopStartView extends Composite implements StartView {
|
||||
interface StartPageViewUiBinder extends UiBinder<Widget, DesktopStartView> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) SAPHeader sapHeader;
|
||||
@UiField(provided=true) SAPHeaderWithAuthentication sapHeader;
|
||||
@UiField(provided=true) ListBox localeSelectionBox;
|
||||
@UiField(provided=true) ListBox eventSelectionBox;
|
||||
@UiField(provided=true) ListBox leaderboardSelectionBox;
|
||||
@@ -73,15 +75,16 @@ public class DesktopStartView extends Composite implements StartView {
|
||||
|
||||
private final int defaultTimeToRaceStartTimeInSeconds = 180;
|
||||
|
||||
public DesktopStartView(PlaceNavigator navigator, EventBus eventBus) {
|
||||
public DesktopStartView(PlaceNavigator navigator, EventBus eventBus, UserService userService) {
|
||||
super();
|
||||
this.navigator = navigator;
|
||||
this.eventBus = eventBus;
|
||||
this.events = new ArrayList<EventDTO>();
|
||||
|
||||
sapHeader = new SAPHeaderWithAuthentication(StringMessages.INSTANCE.sapSailingAnalytics(),
|
||||
StringMessages.INSTANCE.autoplayConfiguration());
|
||||
new FixedSailingAuthentication(userService, sapHeader.getAuthenticationMenuView());
|
||||
|
||||
// sapHeader = new SAPHeaderWithAuthentication(StringMessages.INSTANCE.sapSailingAnalytics(), StringMessages.INSTANCE.autoplayConfiguration());
|
||||
sapHeader = new SAPHeader(StringMessages.INSTANCE.sapSailingAnalytics());
|
||||
sapHeader.setHeaderTitle(StringMessages.INSTANCE.autoplayConfiguration());
|
||||
eventSelectionBox = new ListBox();
|
||||
eventSelectionBox.setMultipleSelect(false);
|
||||
leaderboardSelectionBox = new ListBox();
|
||||
|
||||
+8
-6
@@ -3,24 +3,26 @@ package com.sap.sailing.gwt.autoplay.client.shared.header;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication;
|
||||
import com.sap.sailing.gwt.common.client.FullscreenUtil;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sse.gwt.client.sapheader.SAPHeader;
|
||||
import com.sap.sse.gwt.client.shared.components.AbstractCompositeComponent;
|
||||
import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication;
|
||||
import com.sap.sse.security.ui.client.UserService;
|
||||
|
||||
public class SAPHeaderComponent extends AbstractCompositeComponent<SAPHeaderComponentSettings> {
|
||||
private SAPHeaderComponentSettings settings;
|
||||
private final SAPHeaderComponentLifecycle componentLifecycle;
|
||||
|
||||
private final SAPHeader sapHeader;
|
||||
private final SAPHeaderWithAuthentication sapHeader;
|
||||
|
||||
public SAPHeaderComponent(SAPHeaderComponentLifecycle componentLifecycle, SAPHeaderComponentSettings settings,
|
||||
public SAPHeaderComponent(SAPHeaderComponentLifecycle componentLifecycle, UserService userService, SAPHeaderComponentSettings settings,
|
||||
StringMessages stringMessages, boolean startInAutoScreenMode) {
|
||||
this.componentLifecycle = componentLifecycle;
|
||||
this.settings = settings;
|
||||
this.sapHeader = new SAPHeader(stringMessages.sapSailingAnalytics());
|
||||
|
||||
sapHeader.setHeaderTitle(settings.getTitle());
|
||||
this.sapHeader = new SAPHeaderWithAuthentication(stringMessages.sapSailingAnalytics(), settings.getTitle());
|
||||
new FixedSailingAuthentication(userService, sapHeader.getAuthenticationMenuView());
|
||||
|
||||
initWidget(sapHeader);
|
||||
|
||||
if (startInAutoScreenMode) {
|
||||
|
||||
+6
-6
@@ -30,6 +30,7 @@ import com.sap.sse.gwt.client.shared.components.SettingsDialogComponent;
|
||||
import com.sap.sse.gwt.client.shared.perspective.AbstractPerspectiveComposite;
|
||||
import com.sap.sse.gwt.client.shared.perspective.PerspectiveLifecycleWithAllSettings;
|
||||
import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||
import com.sap.sse.security.ui.client.UserService;
|
||||
|
||||
/**
|
||||
* A perspective managing a header with a single leaderboard filling the rest of the screen.
|
||||
@@ -40,14 +41,14 @@ import com.sap.sse.gwt.client.useragent.UserAgentDetails;
|
||||
public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposite<LeaderboardWithHeaderPerspectiveLifecycle,
|
||||
LeaderboardWithHeaderPerspectiveSettings> implements LeaderboardUpdateProvider {
|
||||
private final DockLayoutPanel dockPanel;
|
||||
private final static int SAP_HEADER_HEIGHT = 70;
|
||||
private final static int SAP_HEADER_HEIGHT = 75;
|
||||
private final Widget currentContentWidget;
|
||||
private final LeaderboardPanel leaderboardPanel;
|
||||
private final StringMessages stringMessages;
|
||||
private final PerspectiveLifecycleWithAllSettings<LeaderboardWithHeaderPerspectiveLifecycle, LeaderboardWithHeaderPerspectiveSettings> componentLifecyclesAndSettings;
|
||||
|
||||
public LeaderboardWithHeaderPerspective(PerspectiveLifecycleWithAllSettings<LeaderboardWithHeaderPerspectiveLifecycle, LeaderboardWithHeaderPerspectiveSettings> perspectiveLifecycleWithAllSettings,
|
||||
SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor,
|
||||
SailingServiceAsync sailingService, UserService userService, AsyncActionsExecutor asyncActionsExecutor,
|
||||
CompetitorSelectionProvider competitorSelectionProvider, Timer timer,
|
||||
String leaderboardName, final ErrorReporter errorReporter, final StringMessages stringMessages,
|
||||
UserAgentDetails userAgent, boolean startInFullScreenMode) {
|
||||
@@ -62,9 +63,8 @@ public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposi
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SAPHeaderComponentLifecycle sapHeaderLifecycle = getPerspectiveLifecycle().getSapHeaderLifecycle();
|
||||
SAPHeaderComponent sapHeader = createSAPHeader(sapHeaderLifecycle,
|
||||
SAPHeaderComponent sapHeader = createSAPHeader(sapHeaderLifecycle, userService,
|
||||
perspectiveLifecycleWithAllSettings.findComponentSettingsByLifecycle(sapHeaderLifecycle),
|
||||
stringMessages, startInFullScreenMode);
|
||||
leaderboardPanel = createLeaderboardPanel(sailingService, asyncActionsExecutor,
|
||||
@@ -183,9 +183,9 @@ public class LeaderboardWithHeaderPerspective extends AbstractPerspectiveComposi
|
||||
leaderboardPanel.removeLeaderboardUpdateListener(listener);
|
||||
}
|
||||
|
||||
private SAPHeaderComponent createSAPHeader(SAPHeaderComponentLifecycle componentLifecycle, SAPHeaderComponentSettings settings,
|
||||
private SAPHeaderComponent createSAPHeader(SAPHeaderComponentLifecycle componentLifecycle, UserService userService, SAPHeaderComponentSettings settings,
|
||||
final StringMessages stringMessages, boolean withFullscreenButton) {
|
||||
return new SAPHeaderComponent(componentLifecycle, settings, stringMessages, withFullscreenButton);
|
||||
return new SAPHeaderComponent(componentLifecycle, userService, settings, stringMessages, withFullscreenButton);
|
||||
}
|
||||
|
||||
private LeaderboardPanel createLeaderboardPanel(SailingServiceAsync sailingService, AsyncActionsExecutor asyncActionsExecutor,
|
||||
|
||||
Reference in new issue
Block a user