Bug 2898: Adjusted styling of LeaderboardEditing to not use

CommonControls anymore, as this breaks the button and dialog styling.
Using new SAP header now as the old relies on CommonControls.css
This commit is contained in:
Steffen Schaefer committed 2015-05-26 16:17:05 +02:00
1 parent 526803ab78
commit c76d161fde
2 files changed
+59 -43

No files matched your search

@@ -1,43 +1,58 @@
package com.sap.sailing.gwt.ui.leaderboardedit; package com.sap.sailing.gwt.ui.leaderboardedit;
import java.util.List; import java.util.List;
import com.google.gwt.user.client.Window; import com.google.gwt.dom.client.Style.FontWeight;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.dom.client.Style.Position;
import com.google.gwt.user.client.ui.Label; import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.Window;
import com.sap.sailing.gwt.ui.client.AbstractSailingEntryPoint; import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sap.sailing.gwt.ui.client.LogoAndTitlePanel; import com.google.gwt.user.client.ui.Label;
import com.sap.sse.gwt.client.async.AsyncActionsExecutor; import com.google.gwt.user.client.ui.RootPanel;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback; import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.client.AbstractSailingEntryPoint;
public class LeaderboardEditPage extends AbstractSailingEntryPoint { import com.sap.sse.gwt.client.async.AsyncActionsExecutor;
@Override import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
protected void doOnModuleLoad() { import com.sap.sse.gwt.theme.client.component.sapheader2.SAPHeader2;
super.doOnModuleLoad();
public class LeaderboardEditPage extends AbstractSailingEntryPoint {
sailingService.getLeaderboardNames(new MarkedAsyncCallback<List<String>>( @Override
new AsyncCallback<List<String>>() { protected void doOnModuleLoad() {
@Override super.doOnModuleLoad();
public void onSuccess(List<String> leaderboardNames) {
String leaderboardName = Window.Location.getParameter("name"); sailingService.getLeaderboardNames(new MarkedAsyncCallback<List<String>>(
if (leaderboardNames.contains(leaderboardName)) { new AsyncCallback<List<String>>() {
LogoAndTitlePanel logoAndTitlePanel = new LogoAndTitlePanel(getStringMessages().editScores(), getStringMessages(), LeaderboardEditPage.this, getUserService()); @Override
logoAndTitlePanel.addStyleName("LogoAndTitlePanel"); public void onSuccess(List<String> leaderboardNames) {
EditableLeaderboardPanel leaderboardPanel = new EditableLeaderboardPanel(sailingService, new AsyncActionsExecutor(), leaderboardName, null, String leaderboardName = Window.Location.getParameter("name");
LeaderboardEditPage.this, getStringMessages(), userAgent); if (leaderboardNames.contains(leaderboardName)) {
leaderboardPanel.ensureDebugId("EditableLeaderboardPanel"); EditableLeaderboardPanel leaderboardPanel = new EditableLeaderboardPanel(sailingService, new AsyncActionsExecutor(), leaderboardName, null,
RootPanel.get().add(logoAndTitlePanel); LeaderboardEditPage.this, getStringMessages(), userAgent);
RootPanel.get().add(leaderboardPanel); leaderboardPanel.ensureDebugId("EditableLeaderboardPanel");
} else { RootPanel.get().add(initHeader());
RootPanel.get().add(new Label(getStringMessages().noSuchLeaderboard())); RootPanel.get().add(leaderboardPanel);
} } else {
} RootPanel.get().add(new Label(getStringMessages().noSuchLeaderboard()));
@Override }
public void onFailure(Throwable t) { }
reportError("Error trying to obtain list of leaderboard names: "+t.getMessage()); @Override
} public void onFailure(Throwable t) {
})); reportError("Error trying to obtain list of leaderboard names: "+t.getMessage());
} }
}));
} }
private Widget initHeader() {
Label title = new Label(getStringMessages().editScores());
title.getElement().getStyle().setColor("white");
title.getElement().getStyle().setFontSize(20, Unit.PX);
title.getElement().getStyle().setFontWeight(FontWeight.BOLD);
title.getElement().getStyle().setMarginTop(16, Unit.PX);
SAPHeader2 header = new SAPHeader2(getStringMessages().sapSailingAnalytics(), title, false);
header.getElement().getStyle().setPosition(Position.FIXED);
header.getElement().getStyle().setTop(0, Unit.PX);
header.getElement().getStyle().setWidth(100, Unit.PCT);
header.getElement().getStyle().setZIndex(1337);
return header;
}
}
@@ -9,6 +9,7 @@
<inherits name='com.google.gwt.debug.Debug'/> <inherits name='com.google.gwt.debug.Debug'/>
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name='com.sap.sse.gwt.theme.SSEThemeLibrary'/>
<inherits name="com.sap.sse.gwt.EmulatedJRE" /> <inherits name="com.sap.sse.gwt.EmulatedJRE" />
<inherits name="com.sap.sse.gwt.SSESharedGWT" /> <inherits name="com.sap.sse.gwt.SSESharedGWT" />
<inherits name="com.sap.sse.SSECommon" /> <inherits name="com.sap.sse.SSECommon" />