mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-15 08:41:01 +00:00
Merge branch 'design2015' of ssh://sapsailing.com/home/trac/git into design2015
# By Steffen Schaefer # Via Steffen Schaefer * 'design2015' of ssh://sapsailing.com/home/trac/git: Resolved TODOs Updated style Implemented error page for new series UI if service call fails
This commit is contained in:
commit
d236f48cd4
7 files changed
+26
-15
No files matched your search
+1
-1
@@ -51,7 +51,7 @@ public class EventActivityProxy extends AbstractActivityProxy {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO @FM: extract text?
|
||||
ErrorPlace errorPlace = new ErrorPlace("Error while loading the event with service getEventById()");
|
||||
ErrorPlace errorPlace = new ErrorPlace("Error while loading the event with service getEventViewById()");
|
||||
// TODO @FM: reload sinnvoll hier?
|
||||
errorPlace.setComingFrom(place);
|
||||
clientFactory.getPlaceController().goTo(errorPlace);
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@
|
||||
}
|
||||
@media (min-width: 61em) {
|
||||
.eventsoverviewupcoming_header_ticker {
|
||||
/* TODO breaks the layout: width: 77%;*/
|
||||
width: 77%;
|
||||
}
|
||||
}
|
||||
.eventsoverviewupcoming_header_tickerhide {
|
||||
|
||||
+8
-1
@@ -17,6 +17,7 @@ import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sse.gwt.client.mvp.ErrorView;
|
||||
|
||||
public abstract class AbstractSeriesActivity<PLACE extends AbstractSeriesPlace> extends AbstractActivity implements SeriesView.Presenter {
|
||||
|
||||
@@ -85,7 +86,11 @@ public abstract class AbstractSeriesActivity<PLACE extends AbstractSeriesPlace>
|
||||
clientFactory.getSailingService().getMediaForEventSeries(ctx.getSeriesDTO().getId(), new AsyncCallback<MediaDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
callback.onFailure(caught);
|
||||
// TODO @FM: extract error message
|
||||
ErrorView errorView = clientFactory.createErrorView("Load media failure for series", caught);
|
||||
getView().showErrorInCurrentTab(errorView);
|
||||
// TODO: notify callback of failure?
|
||||
// callback.onFailure(caught);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -100,4 +105,6 @@ public abstract class AbstractSeriesActivity<PLACE extends AbstractSeriesPlace>
|
||||
public boolean hasMedia() {
|
||||
return ctx.getSeriesDTO().isHasMedia();
|
||||
}
|
||||
|
||||
protected abstract SeriesView<PLACE, ?> getView();
|
||||
}
|
||||
+8
-9
@@ -5,6 +5,7 @@ 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.fakeseries.tabs.SeriesEventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.ui.shared.fakeseries.EventSeriesViewDTO;
|
||||
@@ -35,19 +36,17 @@ public class SeriesActivityProxy extends AbstractActivityProxy {
|
||||
clientFactory.getSailingService().getEventSeriesViewById(seriesUUID, new AsyncCallback<EventSeriesViewDTO>() {
|
||||
@Override
|
||||
public void onSuccess(final EventSeriesViewDTO event) {
|
||||
if (event != null) {
|
||||
ctx.updateContext(event);
|
||||
afterLoad();
|
||||
} else {
|
||||
// TODO
|
||||
// createErrorView("No such event with UUID " + eventUUID, null, panel);
|
||||
}
|
||||
ctx.updateContext(event);
|
||||
afterLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO
|
||||
// createErrorView("Error while loading the event with service getEventById()", caught, panel);
|
||||
// TODO @FM: extract text?
|
||||
ErrorPlace errorPlace = new ErrorPlace("Error while loading the series with service getEventSeriesViewById()");
|
||||
// TODO @FM: reload sinnvoll hier?
|
||||
errorPlace.setComingFrom(place);
|
||||
clientFactory.getPlaceController().goTo(errorPlace);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+2
@@ -50,4 +50,6 @@ public interface SeriesView<PLACE extends AbstractSeriesPlace, PRES extends Seri
|
||||
*/
|
||||
void navigateTabsTo(PLACE place);
|
||||
|
||||
void showErrorInCurrentTab(IsWidget errorView);
|
||||
|
||||
}
|
||||
+6
@@ -6,6 +6,7 @@ import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabPanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabPanelPlaceSelectionEvent;
|
||||
@@ -83,4 +84,9 @@ public class TabletAndDesktopSeriesView extends Composite implements SeriesView<
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showErrorInCurrentTab(IsWidget errorView) {
|
||||
tabPanelUi.overrideCurrentContentInTab(errorView);
|
||||
}
|
||||
}
|
||||
-3
@@ -5443,8 +5443,6 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
dto.setHasMedia(!o.getPhotoGalleryImageURLs().isEmpty() || !o.getVideoURLs().isEmpty());
|
||||
dto.getLeaderboardGroups().addAll(o.getLeaderboardGroups());
|
||||
dto.setState(calculateEventState(o));
|
||||
|
||||
// TODO @Frank: is this correct
|
||||
dto.setHasAnalytics(EventState.RUNNING.compareTo(dto.getState()) <= 0);
|
||||
|
||||
if (o.isFakeSeries()) {
|
||||
@@ -5610,7 +5608,6 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
dto.setState(EventSeriesState.IN_PROGRESS);
|
||||
}
|
||||
|
||||
// TODO @Frank: is this correct
|
||||
dto.setHasAnalytics(oneEventStarted);
|
||||
return dto;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user