mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-14 22:43:57 +00:00
Merge branch '60_inch' of ssh://trac@sapsailing.com/home/trac/git into 60_inch
This commit is contained in:
commit
90bbc4bbbe
13 files changed
+119
-79
No files matched your search
+6
-6
@@ -8,8 +8,8 @@ import com.sap.sailing.gwt.autoplay.client.places.autoplaystart.AutoPlayStartPre
|
||||
import com.sap.sailing.gwt.autoplay.client.places.autoplaystart.AutoPlayStartViewImpl;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithBoatsPresenterImpl;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithBoatsViewImpl;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithCompetitorsTop3Place;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithFlagesTop3Place;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithCompetitorsBoatsPlace;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.flags.RaceEndWithCompetitorFlagsPlace;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.idleloop.idleupnext.IdleNextUpViewImpl;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.idleloop.idleupnext.IdleUpNextPlace;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.idleloop.idleupnext.IdleUpNextPresenterImpl;
|
||||
@@ -85,12 +85,12 @@ public class AutoPlayActivityMapperImpl implements ActivityMapper {
|
||||
return new LiveRaceWithRacemapAndLeaderBoardPresenterImpl((LiveRaceWithRacemapAndLeaderBoardPlace) place,
|
||||
clientFactory, new LiveRaceWithRacemapAndLeaderBoardViewImpl());
|
||||
}
|
||||
if (place instanceof RaceEndWithCompetitorsTop3Place) {
|
||||
return new RaceEndWithBoatsPresenterImpl((RaceEndWithCompetitorsTop3Place) place, clientFactory,
|
||||
if (place instanceof RaceEndWithCompetitorsBoatsPlace) {
|
||||
return new RaceEndWithBoatsPresenterImpl((RaceEndWithCompetitorsBoatsPlace) place, clientFactory,
|
||||
new RaceEndWithBoatsViewImpl(new CompetitorImageProvider()));
|
||||
}
|
||||
if (place instanceof RaceEndWithFlagesTop3Place) {
|
||||
return new RaceEndWithBoatsPresenterImpl((RaceEndWithFlagesTop3Place) place, clientFactory,
|
||||
if (place instanceof RaceEndWithCompetitorFlagsPlace) {
|
||||
return new RaceEndWithBoatsPresenterImpl((RaceEndWithCompetitorFlagsPlace) place, clientFactory,
|
||||
new RaceEndWithBoatsViewImpl(new FlagImageProvider()));
|
||||
}
|
||||
if (place instanceof IdleOverallLeaderBoardPlace) {
|
||||
|
||||
+2
-1
@@ -31,9 +31,10 @@ public class IdleOverallLeaderBoardNode extends FiresPlaceNode {
|
||||
public void onStart() {
|
||||
List<DetailType> overallDetails = new ArrayList<>();
|
||||
overallDetails.add(DetailType.OVERALL_RANK);
|
||||
overallDetails.add(DetailType.REGATTA_RANK);
|
||||
|
||||
List<DetailType> raceDetails = new ArrayList<>();
|
||||
raceDetails.add(DetailType.RACE_RANK);
|
||||
// raceDetails.add(DetailType.RACE_RANK);
|
||||
|
||||
final LeaderboardSettings leaderboardSettings = new LeaderboardSettings(null, null, raceDetails, overallDetails , null, null,
|
||||
null, false, null, null, /* ascending */ true, /* updateUponPlayStateChange */ true,
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.nodes;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.gwt.autoplay.client.app.AutoPlayClientFactory;
|
||||
import com.sap.sailing.gwt.autoplay.client.events.AutoPlayHeaderEvent;
|
||||
import com.sap.sailing.gwt.autoplay.client.nodes.base.FiresPlaceNode;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithCompetitorsBoatsPlace;
|
||||
import com.sap.sailing.gwt.home.communication.event.sixtyinch.GetSixtyInchStatisticAction;
|
||||
import com.sap.sailing.gwt.home.communication.event.sixtyinch.GetSixtyInchStatisticDTO;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class RaceEndWithCompetitorsBoatsNode extends FiresPlaceNode {
|
||||
private final AutoPlayClientFactory cf;
|
||||
|
||||
public RaceEndWithCompetitorsBoatsNode(AutoPlayClientFactory cf) {
|
||||
this.cf = cf;
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
RaceEndWithCompetitorsBoatsPlace place = new RaceEndWithCompetitorsBoatsPlace();
|
||||
|
||||
RegattaAndRaceIdentifier lastRace = cf.getAutoPlayCtx().getLastRace();
|
||||
place.setLifeRace(lastRace);
|
||||
setPlaceToGo(place);
|
||||
|
||||
cf.getDispatch().execute(new GetSixtyInchStatisticAction(lastRace.getRaceName(), lastRace.getRegattaName()),
|
||||
new AsyncCallback<GetSixtyInchStatisticDTO>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("error getting data! " + caught.getMessage());
|
||||
caught.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(GetSixtyInchStatisticDTO result) {
|
||||
place.setStatistic(result);
|
||||
getBus().fireEvent(new AutoPlayHeaderEvent(lastRace.getRegattaName(),
|
||||
StringMessages.INSTANCE.results() + " " + lastRace.getRaceName()));
|
||||
firePlaceChangeAndStartTimer();
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
+4
-4
@@ -6,20 +6,20 @@ import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.gwt.autoplay.client.app.AutoPlayClientFactory;
|
||||
import com.sap.sailing.gwt.autoplay.client.events.AutoPlayHeaderEvent;
|
||||
import com.sap.sailing.gwt.autoplay.client.nodes.base.FiresPlaceNode;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.RaceEndWithCompetitorsTop3Place;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.flags.RaceEndWithCompetitorFlagsPlace;
|
||||
import com.sap.sailing.gwt.home.communication.event.sixtyinch.GetSixtyInchStatisticAction;
|
||||
import com.sap.sailing.gwt.home.communication.event.sixtyinch.GetSixtyInchStatisticDTO;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class RaceEndWithCompetitorsNode extends FiresPlaceNode {
|
||||
public class RaceEndWithCompetitorsFlagsNode extends FiresPlaceNode {
|
||||
private final AutoPlayClientFactory cf;
|
||||
|
||||
public RaceEndWithCompetitorsNode(AutoPlayClientFactory cf) {
|
||||
public RaceEndWithCompetitorsFlagsNode(AutoPlayClientFactory cf) {
|
||||
this.cf = cf;
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
RaceEndWithCompetitorsTop3Place place = new RaceEndWithCompetitorsTop3Place();
|
||||
RaceEndWithCompetitorFlagsPlace place = new RaceEndWithCompetitorFlagsPlace();
|
||||
|
||||
RegattaAndRaceIdentifier lastRace = cf.getAutoPlayCtx().getLastRace();
|
||||
place.setLifeRace(lastRace);
|
||||
+3
-1
@@ -19,11 +19,13 @@ public class RootNodeSixtyInch extends RootNodeBase {
|
||||
this.idleLoop = new AutoPlayLoopNode(30,new IdleUpNextNode(cf),new IdleOverallLeaderBoardNode(cf));
|
||||
this.preLiveRaceLoop = new AutoPlayLoopNode(90, new PreLeaderBoardWithCompetitorsNode(cf),new PreRaceWithRacemapNode(cf));
|
||||
this.liveRaceLoop = new AutoPlayLoopNode(30, new LiveRaceWithRacemapNode(cf));
|
||||
this.afterLiveRaceLoop = new AutoPlayLoopNode(30, new RaceEndWithCompetitorsNode(cf), idleLoop);
|
||||
this.afterLiveRaceLoop = new AutoPlayLoopNode(30, new RaceEndWithCompetitorsBoatsNode(cf),
|
||||
new RaceEndWithCompetitorsFlagsNode(cf), idleLoop);
|
||||
|
||||
afterLiveRaceLoop.setOnLoopEnd(new Command() {
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
transitionTo(idleLoop);
|
||||
}
|
||||
});
|
||||
|
||||
+2
-1
@@ -98,8 +98,9 @@ public class RaceEndWithBoatsViewImpl extends ResizeComposite implements RaceEnd
|
||||
|
||||
private void setImage(FlowPanel image, String imageUrl, boolean slightlyLarger) {
|
||||
image.getElement().getStyle().setBackgroundImage("url(" + imageUrl + ")");
|
||||
image.getElement().getStyle().setHeight(90, Unit.PCT);
|
||||
image.getElement().getStyle().setWidth(slightlyLarger ? 100 : 90, Unit.PCT);
|
||||
image.getElement().getStyle().setProperty("height", "90%");
|
||||
image.getElement().getStyle().setProperty("margin", "auto");
|
||||
image.getElement().getStyle().setProperty("backgroundPosition", "center bottom");
|
||||
image.getElement().getStyle().setProperty("backgroundSize", "contain");
|
||||
image.getElement().getStyle().setProperty("backgroundRepeat", "no-repeat");
|
||||
|
||||
+15
-29
@@ -3,7 +3,7 @@
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:rf="urn:import:com.sap.sse.gwt.client.panels">
|
||||
<ui:with field="res"
|
||||
type="com.sap.sailing.gwt.autoplay.client.resources.SixtyInchBundle" />
|
||||
<ui:style>
|
||||
<ui:style gss="true">
|
||||
.left {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
@@ -16,26 +16,25 @@
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
right: 0px;
|
||||
width: 58%;
|
||||
width: 60%;
|
||||
height: 93%;
|
||||
padding-left:1%;
|
||||
padding-right:1%;
|
||||
border-left: 1px solid #d6d6d6;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.image {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
height: calc(70% - 70px);
|
||||
margin-top: 15%;
|
||||
margin-bottom: calc(15% + 70px);
|
||||
margin-left: 1%;
|
||||
margin-right: 1%;
|
||||
width: 31.3%;
|
||||
height: 90%;
|
||||
border-radius: 4px;
|
||||
|
||||
}
|
||||
|
||||
.image img {
|
||||
display: block;
|
||||
height: auto;
|
||||
height: 90%;
|
||||
width: 100%;
|
||||
max-height: 90%;
|
||||
border-radius: 4px;
|
||||
@@ -51,36 +50,23 @@
|
||||
}
|
||||
|
||||
.subline1 {
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
margin-top: 10px;
|
||||
font-size: 35px;
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
height: 10%;
|
||||
font-weight: bold;
|
||||
bottom: 40px;
|
||||
left: 34%;
|
||||
}
|
||||
|
||||
.subline2 {
|
||||
margin-top: 10px;
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
height: 10%;
|
||||
font-weight: bold;
|
||||
bottom: 40px;
|
||||
left: 0%;
|
||||
}
|
||||
|
||||
.subline3 {
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 30%;
|
||||
height: 10%;
|
||||
font-weight: bold;
|
||||
bottom: 40px;
|
||||
right: 0%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.statistics {
|
||||
@@ -132,16 +118,16 @@
|
||||
styleName="{style.right}">
|
||||
<rf:ResizableFlowPanel styleName="{style.image}">
|
||||
<g:FlowPanel ui:field="image2" />
|
||||
<g:Label ui:field="subline2" styleName="{style.subline2}" />
|
||||
</rf:ResizableFlowPanel>
|
||||
<rf:ResizableFlowPanel styleName="{style.image}">
|
||||
<g:FlowPanel ui:field="image1" />
|
||||
<g:Label ui:field="subline1" styleName="{style.subline1}" />
|
||||
</rf:ResizableFlowPanel>
|
||||
<rf:ResizableFlowPanel styleName="{style.image}">
|
||||
<g:FlowPanel ui:field="image3" />
|
||||
<g:Label ui:field="subline3" styleName="{style.subline3}" />
|
||||
</rf:ResizableFlowPanel>
|
||||
<g:Label ui:field="subline1" styleName="{style.subline1}" />
|
||||
<g:Label ui:field="subline2" styleName="{style.subline2}" />
|
||||
<g:Label ui:field="subline3" styleName="{style.subline3}" />
|
||||
</rf:ResizableFlowPanel>
|
||||
<rf:ResizableFlowPanel styleName="{style.statistics}"
|
||||
ui:field="statistics">
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
|
||||
public class RaceEndWithCompetitorsBoatsPlace extends AbstractRaceEndWithImagesTop3Place {
|
||||
public static class Tokenizer implements PlaceTokenizer<RaceEndWithCompetitorsBoatsPlace> {
|
||||
@Override
|
||||
public String getToken(RaceEndWithCompetitorsBoatsPlace place) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceEndWithCompetitorsBoatsPlace getPlace(String token) {
|
||||
return new RaceEndWithCompetitorsBoatsPlace();
|
||||
}
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
|
||||
public class RaceEndWithCompetitorsTop3Place extends AbstractRaceEndWithImagesTop3Place {
|
||||
public static class Tokenizer implements PlaceTokenizer<RaceEndWithCompetitorsTop3Place> {
|
||||
@Override
|
||||
public String getToken(RaceEndWithCompetitorsTop3Place place) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceEndWithCompetitorsTop3Place getPlace(String token) {
|
||||
return new RaceEndWithCompetitorsTop3Place();
|
||||
}
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
|
||||
public class RaceEndWithFlagesTop3Place extends AbstractRaceEndWithImagesTop3Place {
|
||||
public static class Tokenizer implements PlaceTokenizer<RaceEndWithFlagesTop3Place> {
|
||||
@Override
|
||||
public String getToken(RaceEndWithFlagesTop3Place place) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceEndWithFlagesTop3Place getPlace(String token) {
|
||||
return new RaceEndWithFlagesTop3Place();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.flags;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.autoplay.client.places.screens.afterliveraceloop.boats.AbstractRaceEndWithImagesTop3Place;
|
||||
|
||||
public class RaceEndWithCompetitorFlagsPlace extends AbstractRaceEndWithImagesTop3Place {
|
||||
public static class Tokenizer implements PlaceTokenizer<RaceEndWithCompetitorFlagsPlace> {
|
||||
@Override
|
||||
public String getToken(RaceEndWithCompetitorFlagsPlace place) {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceEndWithCompetitorFlagsPlace getPlace(String token) {
|
||||
return new RaceEndWithCompetitorFlagsPlace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+3
-1
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
.cellTableHeader {
|
||||
position: relative;
|
||||
vertical-align: bottom;
|
||||
vertical-align: middle;
|
||||
background-color: #f2f2f2;
|
||||
border-right: 0px solid #c9caca !important;
|
||||
border-top: none !important;
|
||||
@@ -173,5 +173,7 @@
|
||||
|
||||
.cellTableSailIdColumn img {
|
||||
max-width: none;
|
||||
margin-right: 20px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -67,7 +67,8 @@ public class ClassicLeaderboardPanel extends LeaderboardPanel {
|
||||
|
||||
@Override
|
||||
protected void renderFlagImage(String flagImageURL, SafeHtmlBuilder sb,CompetitorDTO competitor) {
|
||||
sb.appendHtmlConstant("<img src=\"" + flagImageURL + "\" width=\"18px\" height=\"12px\" title=\"" + competitor.getName() + "\"/>");
|
||||
sb.appendHtmlConstant("<img src=\"" + flagImageURL
|
||||
+ "\" width=\"18px\" height=\"12px\" title=\"" + competitor.getName() + "\"/>");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user