mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 22:37:15 +00:00
Extended features of abstraction for mobile event views
This commit is contained in:
1 parent
5287a8c73b
commit
d6dd620a79
3 files changed
+22
-2
No files matched your search
+17
@@ -4,6 +4,7 @@ import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
@@ -16,6 +17,7 @@ import com.sap.sailing.gwt.home.mobile.partials.simpleinfoblock.SimpleInfoBlock;
|
||||
import com.sap.sailing.gwt.home.mobile.places.QuickfinderPresenter;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
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.RegattaMetadataDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.general.EventReferenceDTO;
|
||||
|
||||
@@ -62,6 +64,10 @@ public abstract class AbstractEventView<P extends EventViewBase.Presenter> exten
|
||||
return currentPresenter.getCtx().getRegattaId();
|
||||
}
|
||||
|
||||
protected boolean isMultiRegattaEvent() {
|
||||
return currentPresenter.getCtx().getEventDTO().getType() == EventType.MULTI_REGATTA;
|
||||
}
|
||||
|
||||
protected void setQuickFinderValues(Quickfinder quickfinder, Collection<RegattaMetadataDTO> regattaMetadatas) {
|
||||
QuickfinderPresenter.getForRegattaLeaderboards(quickfinder, currentPresenter, regattaMetadatas);
|
||||
}
|
||||
@@ -81,4 +87,15 @@ public abstract class AbstractEventView<P extends EventViewBase.Presenter> exten
|
||||
layout.quickFinderUi.removeFromParent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSailorInfos(String description, String buttonLabel, String url) {
|
||||
layout.simpleInfoUi.setDescription(SafeHtmlUtils.fromString(description.replace("\n", " ")));
|
||||
layout.simpleInfoUi.setAction(buttonLabel, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSeriesNavigation(String buttonLabel, PlaceNavigation<?> placeNavigation) {
|
||||
layout.simpleInfoUi.setAction(buttonLabel, placeNavigation);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
<!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" xmlns:e="urn:import:com.sap.sailing.gwt.home.mobile.places.event"
|
||||
xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials">
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared" xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.home.mobile.resources.SharedResources" />
|
||||
<ui:style>
|
||||
.headerWrapper {
|
||||
|
||||
+4
@@ -18,6 +18,10 @@ public interface EventViewBase extends IsWidget {
|
||||
void setQuickFinderValues(String seriesName, Collection<EventReferenceDTO> eventsOfSeries);
|
||||
|
||||
void hideQuickfinder();
|
||||
|
||||
void setSailorInfos(String description, String buttonLabel, String url);
|
||||
|
||||
void setSeriesNavigation(String buttonLabel, PlaceNavigation<?> placeNavigation);
|
||||
|
||||
public interface Presenter extends RegattaLeaderboardNavigationProvider, SeriesLeaderboardNavigationProvider {
|
||||
|
||||
|
||||
Reference in new issue
Block a user