78bd4f84cb8f0a69ce81b7404e961aa7029fee9e
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/autoplay/client/app/AutoPlayMainViewImpl.java
| ... | ... | @@ -12,11 +12,11 @@ import com.google.gwt.user.client.ui.ResizeComposite; |
| 12 | 12 | import com.google.gwt.user.client.ui.Widget; |
| 13 | 13 | import com.google.web.bindery.event.shared.EventBus; |
| 14 | 14 | import com.sap.sailing.gwt.autoplay.client.events.AutoPlayHeaderEvent; |
| 15 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 15 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 16 | 16 | import com.sap.sailing.gwt.ui.client.StringMessages; |
| 17 | 17 | import com.sap.sse.gwt.client.DefaultErrorReporter; |
| 18 | 18 | import com.sap.sse.gwt.client.ErrorReporter; |
| 19 | -import com.sap.sse.gwt.client.sapheader.SAPHeader; |
|
| 19 | +import com.sap.sse.gwt.client.sapheader.BrandedSailingHeader; |
|
| 20 | 20 | |
| 21 | 21 | public class AutoPlayMainViewImpl extends ResizeComposite |
| 22 | 22 | implements ApplicationTopLevelView, AcceptsOneWidget { |
| ... | ... | @@ -29,8 +29,8 @@ public class AutoPlayMainViewImpl extends ResizeComposite |
| 29 | 29 | |
| 30 | 30 | protected AnimationPanel animationPanel = new AnimationPanel(); |
| 31 | 31 | |
| 32 | - protected SAPHeader sapHeader = new SAPHeader(SAPSailingHeaderWithAuthentication.SAP_SAILING_APP_NAME, |
|
| 33 | - SAPSailingHeaderWithAuthentication.SAP_SAILING_URL); |
|
| 32 | + protected BrandedSailingHeader sapHeader = new BrandedSailingHeader(SailingHeaderWithAuthentication.SAP_SAILING_APP_NAME, |
|
| 33 | + SailingHeaderWithAuthentication.SAP_SAILING_URL); |
|
| 34 | 34 | |
| 35 | 35 | private static ErrorReporter errorReporter = new DefaultErrorReporter<StringMessages>(StringMessages.INSTANCE); |
| 36 | 36 |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/autoplay/client/shared/header/SAPHeaderComponent.java
| ... | ... | @@ -4,7 +4,7 @@ import com.google.gwt.core.client.Scheduler; |
| 4 | 4 | import com.google.gwt.core.client.Scheduler.RepeatingCommand; |
| 5 | 5 | import com.google.gwt.user.client.ui.Widget; |
| 6 | 6 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 7 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 7 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 8 | 8 | import com.sap.sailing.gwt.common.client.FullscreenUtil; |
| 9 | 9 | import com.sap.sailing.gwt.ui.client.StringMessages; |
| 10 | 10 | import com.sap.sse.gwt.client.shared.components.AbstractCompositeComponent; |
| ... | ... | @@ -17,7 +17,7 @@ public class SAPHeaderComponent extends AbstractCompositeComponent<SAPHeaderComp |
| 17 | 17 | private SAPHeaderComponentSettings settings; |
| 18 | 18 | private final SAPHeaderComponentLifecycle componentLifecycle; |
| 19 | 19 | |
| 20 | - private final SAPSailingHeaderWithAuthentication sapHeader; |
|
| 20 | + private final SailingHeaderWithAuthentication sapHeader; |
|
| 21 | 21 | |
| 22 | 22 | public SAPHeaderComponent(Component<?> parent, ComponentContext<?> context, |
| 23 | 23 | SAPHeaderComponentLifecycle componentLifecycle, |
| ... | ... | @@ -26,7 +26,7 @@ public class SAPHeaderComponent extends AbstractCompositeComponent<SAPHeaderComp |
| 26 | 26 | super(parent, context); |
| 27 | 27 | this.componentLifecycle = componentLifecycle; |
| 28 | 28 | this.settings = settings; |
| 29 | - this.sapHeader = new SAPSailingHeaderWithAuthentication(settings.getTitle()); |
|
| 29 | + this.sapHeader = new SailingHeaderWithAuthentication(settings.getTitle()); |
|
| 30 | 30 | new FixedSailingAuthentication(userService, paywallResolver, sapHeader.getAuthenticationMenuView()); |
| 31 | 31 | |
| 32 | 32 | initWidget(sapHeader); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/authentication/SAPSailingHeaderWithAuthentication.java
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -package com.sap.sailing.gwt.common.authentication; |
|
| 2 | - |
|
| 3 | -import com.sap.sailing.gwt.ui.client.StringMessages; |
|
| 4 | -import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication; |
|
| 5 | - |
|
| 6 | -public class SAPSailingHeaderWithAuthentication extends SAPHeaderWithAuthentication { |
|
| 7 | - |
|
| 8 | - public static final String SAP_SAILING_URL = "http://www.sapsailing.com"; |
|
| 9 | - public static final String SAP_SAILING_APP_NAME = StringMessages.INSTANCE.sailingAnalytics(); |
|
| 10 | - |
|
| 11 | - |
|
| 12 | - public SAPSailingHeaderWithAuthentication() { |
|
| 13 | - super(SAP_SAILING_APP_NAME, SAP_SAILING_URL); |
|
| 14 | - } |
|
| 15 | - |
|
| 16 | - public SAPSailingHeaderWithAuthentication(String headerText) { |
|
| 17 | - super(SAP_SAILING_APP_NAME, SAP_SAILING_URL, headerText); |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | -} |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/common/authentication/SailingHeaderWithAuthentication.java
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | +package com.sap.sailing.gwt.common.authentication; |
|
| 2 | + |
|
| 3 | +import com.sap.sailing.gwt.ui.client.StringMessages; |
|
| 4 | +import com.sap.sse.security.ui.authentication.generic.sapheader.BrandedHeaderWithAuthentication; |
|
| 5 | + |
|
| 6 | +public class SailingHeaderWithAuthentication extends BrandedHeaderWithAuthentication { |
|
| 7 | + |
|
| 8 | + public static final String SAP_SAILING_URL = "http://www.sapsailing.com"; |
|
| 9 | + public static final String SAP_SAILING_APP_NAME = StringMessages.INSTANCE.sailingAnalytics(); |
|
| 10 | + |
|
| 11 | + |
|
| 12 | + public SailingHeaderWithAuthentication() { |
|
| 13 | + super(SAP_SAILING_APP_NAME, SAP_SAILING_URL); |
|
| 14 | + } |
|
| 15 | + |
|
| 16 | + public SailingHeaderWithAuthentication(String headerText) { |
|
| 17 | + super(SAP_SAILING_APP_NAME, SAP_SAILING_URL, headerText); |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | +} |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/footer/Footer.java
| ... | ... | @@ -87,11 +87,12 @@ public class Footer extends Composite { |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | private static boolean hideIfBlank(DivElement el, String text) { |
| 90 | + boolean flag = false; |
|
| 90 | 91 | if (!Util.hasLength(text)) { |
| 91 | 92 | el.getStyle().setDisplay(Display.NONE); |
| 92 | - return true; |
|
| 93 | + flag = true; |
|
| 93 | 94 | } |
| 94 | - return false; |
|
| 95 | + return flag; |
|
| 95 | 96 | } |
| 96 | 97 | |
| 97 | 98 | private static void setHrefOrHide(AnchorElement el, String url) { |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/mobile/partials/solutions/SolutionsItem.java
| ... | ... | @@ -10,8 +10,4 @@ public class SolutionsItem extends AccordionItem { |
| 10 | 10 | public SolutionsItem(String title, boolean showInitial) { |
| 11 | 11 | super(title, /* image URL to be set through setImageUrl */ (ImageResource) null, title, showInitial); |
| 12 | 12 | } |
| 13 | - |
|
| 14 | - public void setHeaderText(String text) { |
|
| 15 | - super.setHeaderText(text); |
|
| 16 | - } |
|
| 17 | 13 | } |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/regattaoverview/client/RegattaOverviewEntryPoint.java
| ... | ... | @@ -13,7 +13,7 @@ import com.google.gwt.user.client.ui.Panel; |
| 13 | 13 | import com.google.gwt.user.client.ui.RootLayoutPanel; |
| 14 | 14 | import com.google.gwt.user.client.ui.ScrollPanel; |
| 15 | 15 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 16 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 16 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 17 | 17 | import com.sap.sailing.gwt.common.client.SharedResources; |
| 18 | 18 | import com.sap.sailing.gwt.regattaoverview.client.RegattaRaceStatesComponent.EntryHandler; |
| 19 | 19 | import com.sap.sailing.gwt.settings.client.regattaoverview.RegattaOverviewContextDefinition; |
| ... | ... | @@ -36,7 +36,7 @@ public class RegattaOverviewEntryPoint extends AbstractSailingReadEntryPoint { |
| 36 | 36 | private final Label clockLabel = new Label(); |
| 37 | 37 | |
| 38 | 38 | private final RegattaOverviewResources.LocalCss style = RegattaOverviewResources.INSTANCE.css(); |
| 39 | - private SAPSailingHeaderWithAuthentication siteHeader; |
|
| 39 | + private SailingHeaderWithAuthentication siteHeader; |
|
| 40 | 40 | |
| 41 | 41 | @Override |
| 42 | 42 | public void doOnModuleLoad() { |
| ... | ... | @@ -53,7 +53,7 @@ public class RegattaOverviewEntryPoint extends AbstractSailingReadEntryPoint { |
| 53 | 53 | |
| 54 | 54 | clockLabel.addStyleName(style.clockLabel()); |
| 55 | 55 | |
| 56 | - siteHeader = new SAPSailingHeaderWithAuthentication(); |
|
| 56 | + siteHeader = new SailingHeaderWithAuthentication(); |
|
| 57 | 57 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 58 | 58 | new FixedSailingAuthentication(getUserService(), paywallResolver, siteHeader.getAuthenticationMenuView()); |
| 59 | 59 |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/places/AdminConsoleViewImpl.java
| ... | ... | @@ -10,7 +10,7 @@ import com.google.gwt.user.client.ui.Widget; |
| 10 | 10 | import com.sap.sailing.domain.common.security.SecuredDomainType; |
| 11 | 11 | import com.sap.sailing.domain.common.security.SecuredDomainType.TrackedRaceActions; |
| 12 | 12 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 13 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 13 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 14 | 14 | import com.sap.sailing.gwt.ui.adminconsole.AIAgentConfigurationPanel; |
| 15 | 15 | import com.sap.sailing.gwt.ui.adminconsole.AIAgentConfigurationPanelSupplier; |
| 16 | 16 | import com.sap.sailing.gwt.ui.adminconsole.BoatPanel; |
| ... | ... | @@ -181,7 +181,7 @@ public class AdminConsoleViewImpl extends Composite implements AdminConsoleView |
| 181 | 181 | |
| 182 | 182 | @Override |
| 183 | 183 | public HeaderPanel createUI(final ServerInfoDTO serverInfo) { |
| 184 | - SAPSailingHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(stringMessages.administration()); |
|
| 184 | + SailingHeaderWithAuthentication header = new SailingHeaderWithAuthentication(stringMessages.administration()); |
|
| 185 | 185 | GenericAuthentication genericSailingAuthentication = new FixedSailingAuthentication(userService, paywallResolver, header.getAuthenticationMenuView()); |
| 186 | 186 | AuthorizedContentDecorator authorizedContentDecorator = new GenericAuthorizedContentDecorator(genericSailingAuthentication); |
| 187 | 187 | authorizedContentDecorator.setContentWidgetFactory(() -> createAdminConsolePanel(serverInfo)); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/datamining/DataMiningEntryPoint.java
| ... | ... | @@ -27,7 +27,7 @@ import com.google.gwt.user.client.ui.RootLayoutPanel; |
| 27 | 27 | import com.google.gwt.user.client.ui.SplitLayoutPanel; |
| 28 | 28 | import com.google.gwt.user.client.ui.Widget; |
| 29 | 29 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 30 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 30 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 31 | 31 | import com.sap.sailing.gwt.common.client.help.HelpButton; |
| 32 | 32 | import com.sap.sailing.gwt.ui.client.AbstractSailingReadEntryPoint; |
| 33 | 33 | import com.sap.sailing.gwt.ui.datamining.presentation.TabbedSailingResultsPresenter; |
| ... | ... | @@ -68,7 +68,7 @@ import com.sap.sse.security.ui.authentication.decorator.AuthorizedContentDecorat |
| 68 | 68 | import com.sap.sse.security.ui.authentication.decorator.WidgetFactory; |
| 69 | 69 | import com.sap.sse.security.ui.authentication.generic.GenericAuthentication; |
| 70 | 70 | import com.sap.sse.security.ui.authentication.generic.GenericAuthorizedContentDecorator; |
| 71 | -import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication; |
|
| 71 | +import com.sap.sse.security.ui.authentication.generic.sapheader.BrandedHeaderWithAuthentication; |
|
| 72 | 72 | import com.sap.sse.security.ui.client.premium.PaywallResolver; |
| 73 | 73 | import com.sap.sse.security.ui.client.premium.PaywallResolverImpl; |
| 74 | 74 | |
| ... | ... | @@ -279,7 +279,7 @@ public class DataMiningEntryPoint extends AbstractSailingReadEntryPoint implemen |
| 279 | 279 | |
| 280 | 280 | private void createDataminingPanel(ServerInfoDTO serverInfo, final String queryIdentifier) { |
| 281 | 281 | removeUrlParameter(); |
| 282 | - final SAPHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(getStringMessages().dataMining()); |
|
| 282 | + final BrandedHeaderWithAuthentication header = new SailingHeaderWithAuthentication(getStringMessages().dataMining()); |
|
| 283 | 283 | final PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 284 | 284 | final GenericAuthentication genericSailingAuthentication = new FixedSailingAuthentication(getUserService(), paywallResolver, |
| 285 | 285 | header.getAuthenticationMenuView()); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardEntryPoint.java
| ... | ... | @@ -17,7 +17,7 @@ import com.google.gwt.user.client.ui.Widget; |
| 17 | 17 | import com.sap.sailing.domain.common.DetailType; |
| 18 | 18 | import com.sap.sailing.domain.common.dto.AbstractLeaderboardDTO; |
| 19 | 19 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 20 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 20 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 21 | 21 | import com.sap.sailing.gwt.common.communication.routing.ProvidesLeaderboardRouting; |
| 22 | 22 | import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardContextDefinition; |
| 23 | 23 | import com.sap.sailing.gwt.settings.client.leaderboard.LeaderboardPerspectiveLifecycle; |
| ... | ... | @@ -251,7 +251,7 @@ public class LeaderboardEntryPoint extends AbstractSailingReadEntryPoint impleme |
| 251 | 251 | if (leaderboardDisplayName == null || leaderboardDisplayName.isEmpty()) { |
| 252 | 252 | leaderboardDisplayName = leaderboardName; |
| 253 | 253 | } |
| 254 | - SAPSailingHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(leaderboardDisplayName); |
|
| 254 | + SailingHeaderWithAuthentication header = new SailingHeaderWithAuthentication(leaderboardDisplayName); |
|
| 255 | 255 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 256 | 256 | new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
| 257 | 257 | mainPanel.addNorth(header, 75); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboardedit/LeaderboardEditPage.java
| ... | ... | @@ -14,7 +14,7 @@ import com.google.gwt.user.client.ui.ScrollPanel; |
| 14 | 14 | import com.google.gwt.user.client.ui.Widget; |
| 15 | 15 | import com.sap.sailing.domain.common.DetailType; |
| 16 | 16 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 17 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 17 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 18 | 18 | import com.sap.sailing.gwt.common.communication.routing.ProvidesLeaderboardRouting; |
| 19 | 19 | import com.sap.sailing.gwt.settings.client.leaderboard.EditableLeaderboardLifecycle; |
| 20 | 20 | import com.sap.sailing.gwt.settings.client.leaderboard.EditableLeaderboardSettings; |
| ... | ... | @@ -33,7 +33,7 @@ import com.sap.sse.security.ui.authentication.decorator.AuthorizedContentDecorat |
| 33 | 33 | import com.sap.sse.security.ui.authentication.decorator.WidgetFactory; |
| 34 | 34 | import com.sap.sse.security.ui.authentication.generic.GenericAuthentication; |
| 35 | 35 | import com.sap.sse.security.ui.authentication.generic.GenericAuthorizedContentDecorator; |
| 36 | -import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication; |
|
| 36 | +import com.sap.sse.security.ui.authentication.generic.sapheader.BrandedHeaderWithAuthentication; |
|
| 37 | 37 | import com.sap.sse.security.ui.client.premium.PaywallResolver; |
| 38 | 38 | import com.sap.sse.security.ui.client.premium.PaywallResolverImpl; |
| 39 | 39 | import com.sap.sse.security.ui.settings.ComponentContextWithSettingsStorage; |
| ... | ... | @@ -46,7 +46,7 @@ public class LeaderboardEditPage extends AbstractSailingWriteEntryPoint implemen |
| 46 | 46 | |
| 47 | 47 | private String leaderboardName; |
| 48 | 48 | private EditableLeaderboardContextDefinition editableLeaderboardContextDefinition; |
| 49 | - private SAPSailingHeaderWithAuthentication header; |
|
| 49 | + private SailingHeaderWithAuthentication header; |
|
| 50 | 50 | |
| 51 | 51 | @Override |
| 52 | 52 | protected void doOnModuleLoad() { |
| ... | ... | @@ -85,7 +85,7 @@ public class LeaderboardEditPage extends AbstractSailingWriteEntryPoint implemen |
| 85 | 85 | |
| 86 | 86 | @Override |
| 87 | 87 | public void onSuccess(Iterable<DetailType> result) { |
| 88 | - SAPHeaderWithAuthentication header = initHeader(); |
|
| 88 | + BrandedHeaderWithAuthentication header = initHeader(); |
|
| 89 | 89 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 90 | 90 | GenericAuthentication genericSailingAuthentication = new FixedSailingAuthentication(getUserService(), |
| 91 | 91 | paywallResolver, header.getAuthenticationMenuView()); |
| ... | ... | @@ -100,11 +100,11 @@ public class LeaderboardEditPage extends AbstractSailingWriteEntryPoint implemen |
| 100 | 100 | private class GetLeaderboardWithSecurityCallback implements AsyncCallback<StrippedLeaderboardDTO> { |
| 101 | 101 | private final AuthorizedContentDecorator authorizedContentDecorator; |
| 102 | 102 | private final Iterable<DetailType> getAvailableDetailTypesForLeaderboardResult; |
| 103 | - private final SAPHeaderWithAuthentication header; |
|
| 103 | + private final BrandedHeaderWithAuthentication header; |
|
| 104 | 104 | |
| 105 | 105 | GetLeaderboardWithSecurityCallback(AuthorizedContentDecorator authorizedContentDecorator, |
| 106 | 106 | Iterable<DetailType> getAvailableDetailTypesForLeaderboardResult, |
| 107 | - SAPHeaderWithAuthentication header) { |
|
| 107 | + BrandedHeaderWithAuthentication header) { |
|
| 108 | 108 | this.authorizedContentDecorator = authorizedContentDecorator; |
| 109 | 109 | this.getAvailableDetailTypesForLeaderboardResult = getAvailableDetailTypesForLeaderboardResult; |
| 110 | 110 | this.header = header; |
| ... | ... | @@ -166,8 +166,8 @@ public class LeaderboardEditPage extends AbstractSailingWriteEntryPoint implemen |
| 166 | 166 | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - private SAPHeaderWithAuthentication initHeader() { |
|
| 170 | - header = new SAPSailingHeaderWithAuthentication(getHeaderTitle(leaderboardName)); |
|
| 169 | + private BrandedHeaderWithAuthentication initHeader() { |
|
| 170 | + header = new SailingHeaderWithAuthentication(getHeaderTitle(leaderboardName)); |
|
| 171 | 171 | header.getElement().getStyle().setWidth(100, Unit.PCT); |
| 172 | 172 | return header; |
| 173 | 173 | } |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/pairinglist/PairingListEntryPoint.java
| ... | ... | @@ -17,7 +17,7 @@ import com.google.gwt.user.client.ui.VerticalPanel; |
| 17 | 17 | import com.google.gwt.user.client.ui.Widget; |
| 18 | 18 | import com.sap.sailing.domain.common.dto.PairingListDTO; |
| 19 | 19 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 20 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 20 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 21 | 21 | import com.sap.sailing.gwt.common.communication.routing.ProvidesLeaderboardRouting; |
| 22 | 22 | import com.sap.sailing.gwt.ui.adminconsole.PairingListPreviewDialog; |
| 23 | 23 | import com.sap.sailing.gwt.ui.client.AbstractSailingReadEntryPoint; |
| ... | ... | @@ -63,7 +63,7 @@ public class PairingListEntryPoint extends AbstractSailingReadEntryPoint impleme |
| 63 | 63 | RootLayoutPanel.get().add(mainPanel); |
| 64 | 64 | mainPanel.setWidth("100%"); |
| 65 | 65 | mainPanel.setHeight("100%"); |
| 66 | - SAPSailingHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication( |
|
| 66 | + SailingHeaderWithAuthentication header = new SailingHeaderWithAuthentication( |
|
| 67 | 67 | pairingListContextDefinition.getLeaderboardName()); |
| 68 | 68 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 69 | 69 | new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/EmbeddedMapAndWindChartEntryPoint.java
| ... | ... | @@ -28,7 +28,7 @@ import com.sap.sailing.domain.common.RegattaAndRaceIdentifier; |
| 28 | 28 | import com.sap.sailing.domain.common.dto.BoatDTO; |
| 29 | 29 | import com.sap.sailing.domain.common.dto.CompetitorDTO; |
| 30 | 30 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 31 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 31 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 32 | 32 | import com.sap.sailing.gwt.common.communication.routing.ProvidesLeaderboardRouting; |
| 33 | 33 | import com.sap.sailing.gwt.settings.client.embeddedmapandwindchart.EmbeddedMapAndWindChartContextDefinition; |
| 34 | 34 | import com.sap.sailing.gwt.settings.client.embeddedmapandwindchart.EmbeddedMapAndWindChartSettings; |
| ... | ... | @@ -69,7 +69,7 @@ import com.sap.sse.gwt.client.player.Timer; |
| 69 | 69 | import com.sap.sse.gwt.client.player.Timer.PlayModes; |
| 70 | 70 | import com.sap.sse.gwt.settings.SettingsToUrlSerializer; |
| 71 | 71 | import com.sap.sse.security.shared.dto.SecuredDTO; |
| 72 | -import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication; |
|
| 72 | +import com.sap.sse.security.ui.authentication.generic.sapheader.BrandedHeaderWithAuthentication; |
|
| 73 | 73 | import com.sap.sse.security.ui.client.premium.PaywallResolver; |
| 74 | 74 | import com.sap.sse.security.ui.client.premium.PaywallResolverImpl; |
| 75 | 75 | |
| ... | ... | @@ -159,14 +159,14 @@ public class EmbeddedMapAndWindChartEntryPoint extends AbstractSailingReadEntryP |
| 159 | 159 | |
| 160 | 160 | private void createErrorPage(String message, PaywallResolver paywallResolver) { |
| 161 | 161 | final DockLayoutPanel vp = new DockLayoutPanel(Unit.PX); |
| 162 | - final SAPHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(); |
|
| 162 | + final BrandedHeaderWithAuthentication header = new SailingHeaderWithAuthentication(); |
|
| 163 | 163 | new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
| 164 | 164 | RootLayoutPanel.get().add(vp); |
| 165 | 165 | vp.addNorth(header, 100); |
| 166 | 166 | final Label infoText = new Label(message); |
| 167 | 167 | infoText.getElement().getStyle().setMargin(1, Unit.EM); |
| 168 | 168 | vp.add(infoText); |
| 169 | - // TODO: Styling of error page slightly differs from the other usages of SAPSailingHeaderWithAuthentication |
|
| 169 | + // TODO: Styling of error page slightly differs from the other usages of SailingHeaderWithAuthentication |
|
| 170 | 170 | // because of the root font-size. Adjustments are postponed because they might affect the whole page content. |
| 171 | 171 | } |
| 172 | 172 |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/RaceBoardEntryPoint.java
| ... | ... | @@ -20,7 +20,7 @@ import com.google.gwt.user.client.ui.RootLayoutPanel; |
| 20 | 20 | import com.sap.sailing.domain.common.DetailType; |
| 21 | 21 | import com.sap.sailing.domain.common.dto.CompetitorDTO; |
| 22 | 22 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 23 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 23 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 24 | 24 | import com.sap.sailing.gwt.common.communication.routing.ProvidesLeaderboardRouting; |
| 25 | 25 | import com.sap.sailing.gwt.settings.client.raceboard.RaceBoardPerspectiveOwnSettings; |
| 26 | 26 | import com.sap.sailing.gwt.settings.client.raceboard.RaceboardContextDefinition; |
| ... | ... | @@ -45,7 +45,7 @@ import com.sap.sse.gwt.client.player.Timer.PlayModes; |
| 45 | 45 | import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings; |
| 46 | 46 | import com.sap.sse.gwt.client.shared.settings.DefaultOnSettingsLoadedCallback; |
| 47 | 47 | import com.sap.sse.gwt.settings.SettingsToUrlSerializer; |
| 48 | -import com.sap.sse.security.ui.authentication.generic.sapheader.SAPHeaderWithAuthentication; |
|
| 48 | +import com.sap.sse.security.ui.authentication.generic.sapheader.BrandedHeaderWithAuthentication; |
|
| 49 | 49 | import com.sap.sse.security.ui.client.premium.PaywallResolver; |
| 50 | 50 | import com.sap.sse.security.ui.client.premium.PaywallResolverImpl; |
| 51 | 51 | import com.sap.sse.security.ui.settings.ComponentContextWithSettingsStorage; |
| ... | ... | @@ -142,7 +142,7 @@ public class RaceBoardEntryPoint extends AbstractSailingReadEntryPoint implement |
| 142 | 142 | |
| 143 | 143 | private void createErrorPage(String message) { |
| 144 | 144 | final DockLayoutPanel vp = new DockLayoutPanel(Unit.PX); |
| 145 | - final SAPHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(); |
|
| 145 | + final BrandedHeaderWithAuthentication header = new SailingHeaderWithAuthentication(); |
|
| 146 | 146 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 147 | 147 | new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
| 148 | 148 | RootLayoutPanel.get().add(vp); |
| ... | ... | @@ -150,7 +150,7 @@ public class RaceBoardEntryPoint extends AbstractSailingReadEntryPoint implement |
| 150 | 150 | final Label infoText = new Label(message); |
| 151 | 151 | infoText.getElement().getStyle().setMargin(1, Unit.EM); |
| 152 | 152 | vp.add(infoText); |
| 153 | - // TODO: Styling of error page slightly differs from the other usages of SAPSailingHeaderWithAuthentication |
|
| 153 | + // TODO: Styling of error page slightly differs from the other usages of SailingHeaderWithAuthentication |
|
| 154 | 154 | // because of the root font-size. Adjustments are postponed because they might affect the whole page content. |
| 155 | 155 | } |
| 156 | 156 |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java
| ... | ... | @@ -6118,21 +6118,20 @@ public class SailingServiceImpl extends ResultCachingProxiedRemoteServiceServlet |
| 6118 | 6118 | } |
| 6119 | 6119 | |
| 6120 | 6120 | public String getBrandAffiliationWithSailing(String locale) { |
| 6121 | + String result = ""; |
|
| 6121 | 6122 | Optional<String> optLocale = Optional.ofNullable(locale).filter(s -> !s.isEmpty() && !"default".equalsIgnoreCase(s)); |
| 6122 | - if (brandingConfigurationServiceTracker == null) { |
|
| 6123 | - return ""; |
|
| 6124 | - } |
|
| 6125 | - BrandingConfigurationService brandingConfigurationService; |
|
| 6126 | - try { |
|
| 6127 | - brandingConfigurationService = brandingConfigurationServiceTracker.waitForService(0); |
|
| 6128 | - } catch (InterruptedException e) { |
|
| 6129 | - return ""; |
|
| 6130 | - } |
|
| 6131 | - BrandingConfiguration configuration = brandingConfigurationService.getActiveBrandingConfiguration(); |
|
| 6132 | - if (configuration == null) { |
|
| 6133 | - return ""; |
|
| 6134 | - } else { |
|
| 6135 | - return configuration.getInSailingContent(optLocale); |
|
| 6123 | + if (brandingConfigurationServiceTracker != null) { |
|
| 6124 | + try { |
|
| 6125 | + BrandingConfigurationService brandingConfigurationService = brandingConfigurationServiceTracker.waitForService(0); |
|
| 6126 | + if (brandingConfigurationService != null) { |
|
| 6127 | + BrandingConfiguration configuration = brandingConfigurationService.getActiveBrandingConfiguration(); |
|
| 6128 | + if (configuration != null) { |
|
| 6129 | + result = configuration.getInSailingContent(optLocale); |
|
| 6130 | + } |
|
| 6131 | + } |
|
| 6132 | + } catch (InterruptedException e) { |
|
| 6133 | + } |
|
| 6136 | 6134 | } |
| 6135 | + return result; |
|
| 6137 | 6136 | } |
| 6138 | 6137 | } |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/simulator/SimulatorEntryPoint.java
| ... | ... | @@ -13,7 +13,7 @@ import com.google.gwt.user.client.ui.RootLayoutPanel; |
| 13 | 13 | import com.google.gwt.user.client.ui.Widget; |
| 14 | 14 | import com.sap.sailing.domain.common.security.SecuredDomainType; |
| 15 | 15 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 16 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 16 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 17 | 17 | import com.sap.sailing.gwt.ui.client.AbstractSailingReadEntryPoint; |
| 18 | 18 | import com.sap.sailing.gwt.ui.client.SimulatorService; |
| 19 | 19 | import com.sap.sailing.gwt.ui.client.SimulatorServiceAsync; |
| ... | ... | @@ -192,7 +192,7 @@ public class SimulatorEntryPoint extends AbstractSailingReadEntryPoint { |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | private void createSimulatorPanel(ServerInfoDTO serverInfo) { |
| 195 | - SAPSailingHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(getStringMessages().strategySimulatorTitle()); |
|
| 195 | + SailingHeaderWithAuthentication header = new SailingHeaderWithAuthentication(getStringMessages().strategySimulatorTitle()); |
|
| 196 | 196 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 197 | 197 | GenericAuthentication genericSailingAuthentication = new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
| 198 | 198 | AuthorizedContentDecorator authorizedContentDecorator = new GenericAuthorizedContentDecorator(genericSailingAuthentication); |
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/spectator/SpectatorEntryPoint.java
| ... | ... | @@ -11,7 +11,7 @@ import com.google.gwt.user.client.ui.FlowPanel; |
| 11 | 11 | import com.google.gwt.user.client.ui.RootPanel; |
| 12 | 12 | import com.google.gwt.user.client.ui.SimplePanel; |
| 13 | 13 | import com.sap.sailing.gwt.common.authentication.FixedSailingAuthentication; |
| 14 | -import com.sap.sailing.gwt.common.authentication.SAPSailingHeaderWithAuthentication; |
|
| 14 | +import com.sap.sailing.gwt.common.authentication.SailingHeaderWithAuthentication; |
|
| 15 | 15 | import com.sap.sailing.gwt.settings.client.spectator.SpectatorContextDefinition; |
| 16 | 16 | import com.sap.sailing.gwt.settings.client.spectator.SpectatorSettings; |
| 17 | 17 | import com.sap.sailing.gwt.ui.client.AbstractSailingReadEntryPoint; |
| ... | ... | @@ -72,7 +72,7 @@ public class SpectatorEntryPoint extends AbstractSailingReadEntryPoint { |
| 72 | 72 | if (!embedded) { |
| 73 | 73 | String title = groupNameParam != null ? groupNameParam : getStringMessages().overview(); |
| 74 | 74 | Window.setTitle(title); |
| 75 | - SAPSailingHeaderWithAuthentication header = getHeader(title); |
|
| 75 | + SailingHeaderWithAuthentication header = getHeader(title); |
|
| 76 | 76 | RootPanel.get().add(header); |
| 77 | 77 | } else { |
| 78 | 78 | RootPanel.getBodyElement().getStyle().setPadding(0, Unit.PX); |
| ... | ... | @@ -80,8 +80,8 @@ public class SpectatorEntryPoint extends AbstractSailingReadEntryPoint { |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - private SAPSailingHeaderWithAuthentication getHeader(String title) { |
|
| 84 | - SAPSailingHeaderWithAuthentication header = new SAPSailingHeaderWithAuthentication(title); |
|
| 83 | + private SailingHeaderWithAuthentication getHeader(String title) { |
|
| 84 | + SailingHeaderWithAuthentication header = new SailingHeaderWithAuthentication(title); |
|
| 85 | 85 | PaywallResolver paywallResolver = new PaywallResolverImpl(getUserService(), getSubscriptionServiceFactory()); |
| 86 | 86 | new FixedSailingAuthentication(getUserService(), paywallResolver, header.getAuthenticationMenuView()); |
| 87 | 87 | header.getElement().getStyle().setPosition(Position.FIXED); |
java/com.sap.sse.branding.sap/src/com/sap/sse/branding/sap/SAPBrandingConfiguration.java
| ... | ... | @@ -13,11 +13,16 @@ public class SAPBrandingConfiguration implements BrandingConfiguration { |
| 13 | 13 | private String greyTransparentLogoURL; |
| 14 | 14 | private final ResourceBundleStringMessages sailingServerStringMessages; |
| 15 | 15 | private static final String STRING_MESSAGES_BASE_NAME = "stringmessages/SAPBrandingStringMessages"; |
| 16 | + private static final String IMAGES_ROOT = "/sap-branding/images"; |
|
| 16 | 17 | |
| 17 | 18 | public SAPBrandingConfiguration() { |
| 18 | 19 | sailingServerStringMessages = ResourceBundleStringMessages.create(STRING_MESSAGES_BASE_NAME, getClass().getClassLoader(), |
| 19 | 20 | StandardCharsets.UTF_8.name()); |
| 20 | 21 | } |
| 22 | + |
|
| 23 | + private static String image(String fileName) { |
|
| 24 | + return IMAGES_ROOT + "/" + fileName; |
|
| 25 | + } |
|
| 21 | 26 | |
| 22 | 27 | @Override |
| 23 | 28 | public String getId() { |
| ... | ... | @@ -41,47 +46,47 @@ public class SAPBrandingConfiguration implements BrandingConfiguration { |
| 41 | 46 | |
| 42 | 47 | @Override |
| 43 | 48 | public String getSolutionsInSailingImageURL() { |
| 44 | - return "/sap-branding/images/solutions-sap-in-sailing.jpg"; |
|
| 49 | + return image("solutions-sap-in-sailing.jpg"); |
|
| 45 | 50 | } |
| 46 | 51 | |
| 47 | 52 | @Override |
| 48 | 53 | public String getSoutionsInSailingTrimmedImageURL() { |
| 49 | - return "/sap-branding/images/solutions-sap-trimmed.png"; |
|
| 54 | + return image("solutions-sap-trimmed.png"); |
|
| 50 | 55 | } |
| 51 | 56 | |
| 52 | 57 | @Override |
| 53 | 58 | public String getSailingRaceManagerAppImageURL() { |
| 54 | - return "/sap-branding/images/solutions-sap-sailing-race-manager.png"; |
|
| 59 | + return image("solutions-sap-sailing-race-manager.png"); |
|
| 55 | 60 | } |
| 56 | 61 | |
| 57 | 62 | @Override |
| 58 | 63 | public String getSailingRaceManagerAppTrimmedImageURL() { |
| 59 | - return "/sap-branding/images/solutions-race.png"; |
|
| 64 | + return image("solutions-race.png"); |
|
| 60 | 65 | } |
| 61 | 66 | |
| 62 | 67 | @Override |
| 63 | 68 | public String getSailInSightAppImageURL() { |
| 64 | - return "/sap-branding/images/solutions-sap-sailing-insight.png"; |
|
| 69 | + return image("solutions-sap-sailing-insight.png"); |
|
| 65 | 70 | } |
| 66 | 71 | |
| 67 | 72 | @Override |
| 68 | 73 | public String getSailingSimulatorImageURL() { |
| 69 | - return "/sap-branding/images/solutions-simulator.png"; |
|
| 74 | + return image("solutions-simulator.png"); |
|
| 70 | 75 | } |
| 71 | 76 | |
| 72 | 77 | @Override |
| 73 | 78 | public String getSailingSimulatorTrimmedImageURL() { |
| 74 | - return "/sap-branding/images/solutions-simulator-trimmed.png"; |
|
| 79 | + return image("solutions-simulator-trimmed.png"); |
|
| 75 | 80 | } |
| 76 | 81 | |
| 77 | 82 | @Override |
| 78 | 83 | public String getBuoyPingerAppImageURL() { |
| 79 | - return "/sap-branding/images/solutions-sap-sailing-buoy-pinger.png"; |
|
| 84 | + return image("solutions-sap-sailing-buoy-pinger.png"); |
|
| 80 | 85 | } |
| 81 | 86 | |
| 82 | 87 | @Override |
| 83 | 88 | public String getSailingAnalyticsImageURL() { |
| 84 | - return "/sap-branding/images/solutions-sap.png"; |
|
| 89 | + return image("solutions-sap.png"); |
|
| 85 | 90 | } |
| 86 | 91 | |
| 87 | 92 | @Override |
| ... | ... | @@ -160,22 +165,22 @@ public class SAPBrandingConfiguration implements BrandingConfiguration { |
| 160 | 165 | |
| 161 | 166 | @Override |
| 162 | 167 | public String getMoreLoginInformationNotificationsURL() { |
| 163 | - return "/sap-branding/images/notifications.png"; |
|
| 168 | + return image("notifications.png"); |
|
| 164 | 169 | } |
| 165 | 170 | |
| 166 | 171 | @Override |
| 167 | 172 | public String getMoreLoginInformationSettingsURL() { |
| 168 | - return "/sap-branding/images/settings.png"; |
|
| 173 | + return image("settings.png"); |
|
| 169 | 174 | } |
| 170 | 175 | |
| 171 | 176 | @Override |
| 172 | 177 | public String getMoreLoginInformationSailorProfilesURL() { |
| 173 | - return " /sap-branding/images/sailorprofiles.png"; |
|
| 178 | + return image("sailorprofiles.png"); |
|
| 174 | 179 | } |
| 175 | 180 | |
| 176 | 181 | @Override |
| 177 | 182 | public String getMoreLoginInformationSimulatorURL() { |
| 178 | - return "/sap-branding/images/simulator.png"; |
|
| 183 | + return image("simulator.png"); |
|
| 179 | 184 | } |
| 180 | 185 | @Override |
| 181 | 186 | public String getInSailingContent(Optional<String> locale) { |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/BrandedHeaderResources.java
| ... | ... | @@ -0,0 +1,28 @@ |
| 1 | +package com.sap.sse.gwt.client.sapheader; |
|
| 2 | + |
|
| 3 | +import com.google.gwt.core.client.GWT; |
|
| 4 | +import com.google.gwt.resources.client.ClientBundle; |
|
| 5 | +import com.google.gwt.resources.client.CssResource; |
|
| 6 | +import com.google.gwt.resources.client.ImageResource; |
|
| 7 | + |
|
| 8 | +public interface BrandedHeaderResources extends ClientBundle { |
|
| 9 | + public static final BrandedHeaderResources INSTANCE = GWT.create(BrandedHeaderResources.class); |
|
| 10 | + |
|
| 11 | + @Source("BrandedSailingHeader.gss") |
|
| 12 | + LocalCss css(); |
|
| 13 | + |
|
| 14 | + public interface LocalCss extends CssResource { |
|
| 15 | + String siteheader(); |
|
| 16 | + String siteheaderLeft(); |
|
| 17 | + String siteHeaderTitle(); |
|
| 18 | + String siteHeaderSubTitle(); |
|
| 19 | + String siteheader2ndCol(); |
|
| 20 | + String siteheaderRight(); |
|
| 21 | + String logo(); |
|
| 22 | + String logotitle(); |
|
| 23 | + String pagetitle(); |
|
| 24 | + } |
|
| 25 | + |
|
| 26 | + @Source("logo-small@2x.png") |
|
| 27 | + ImageResource logo(); |
|
| 28 | +} |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/BrandedSailingHeader.gss
| ... | ... | @@ -0,0 +1,80 @@ |
| 1 | +.siteheader { |
|
| 2 | + font-size: 1rem; |
|
| 3 | + line-height: 1.333; |
|
| 4 | + background: #000; |
|
| 5 | + height: 70px; |
|
| 6 | + width: 100%; |
|
| 7 | + overflow: hidden; |
|
| 8 | + vertical-align: top; |
|
| 9 | + position: relative; |
|
| 10 | +} |
|
| 11 | + |
|
| 12 | +.siteHeaderTitle { |
|
| 13 | + color: #fff; |
|
| 14 | + vertical-align: top; |
|
| 15 | + font-size: 20px; |
|
| 16 | + font-weight: 700; |
|
| 17 | +} |
|
| 18 | + |
|
| 19 | +.siteHeaderSubTitle { |
|
| 20 | + color: #fff; |
|
| 21 | + font-size: 18px; |
|
| 22 | + vertical-align: top; |
|
| 23 | +} |
|
| 24 | + |
|
| 25 | +.siteheaderLeft { |
|
| 26 | + position: relative; top:10px;left:10px; |
|
| 27 | + display: inline-block; |
|
| 28 | + text-align: left; |
|
| 29 | + height: 50px; |
|
| 30 | + vertical-align: top; |
|
| 31 | +} |
|
| 32 | + |
|
| 33 | +.siteheader2ndCol { |
|
| 34 | + position: absolute; top:10px;left:235px; |
|
| 35 | + display: inline-block; |
|
| 36 | + text-align: left; |
|
| 37 | + height:50px; |
|
| 38 | + vertical-align: top; |
|
| 39 | +} |
|
| 40 | + |
|
| 41 | +.siteheaderRight { |
|
| 42 | + position: absolute; top:10px;right:10px; |
|
| 43 | + text-align: right; |
|
| 44 | + display: inline-block; |
|
| 45 | + height:50px; |
|
| 46 | + vertical-align: top; |
|
| 47 | +} |
|
| 48 | + |
|
| 49 | +.logo, .logo:hover, .logo:visited { |
|
| 50 | + margin: 0px; |
|
| 51 | + display: inline-block; |
|
| 52 | + gwt-sprite: "logo"; |
|
| 53 | + background-size: cover; |
|
| 54 | + width: 80px; |
|
| 55 | + height: 40px; |
|
| 56 | + border: none; |
|
| 57 | + text-decoration: none; |
|
| 58 | +} |
|
| 59 | + |
|
| 60 | +.logotitle, .logotitle:hover, .logotitle:visited { |
|
| 61 | + font-size: 1rem; |
|
| 62 | + display: inline-block; |
|
| 63 | + color: #fff; |
|
| 64 | + width: 150px; |
|
| 65 | + height: 100%; |
|
| 66 | + padding: 17px 15px 0 0; |
|
| 67 | + vertical-align: top; |
|
| 68 | + text-align: right; |
|
| 69 | + border: none; |
|
| 70 | + border-right: 1px solid rgb(180,180,180); |
|
| 71 | + margin: 0px; |
|
| 72 | + margin-left: -25px; |
|
| 73 | + box-sizing: border-box; |
|
| 74 | + text-decoration: none; |
|
| 75 | +} |
|
| 76 | +.pagetitle { |
|
| 77 | + color: #ffffff; |
|
| 78 | + font-size: 1.1rem; |
|
| 79 | + font-weight: bold; |
|
| 80 | +} |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/BrandedSailingHeader.java
| ... | ... | @@ -0,0 +1,84 @@ |
| 1 | +package com.sap.sse.gwt.client.sapheader; |
|
| 2 | + |
|
| 3 | +import com.google.gwt.core.client.GWT; |
|
| 4 | +import com.google.gwt.dom.client.AnchorElement; |
|
| 5 | +import com.google.gwt.dom.client.DivElement; |
|
| 6 | +import com.google.gwt.dom.client.Style.Display; |
|
| 7 | +import com.google.gwt.dom.client.Style.Unit; |
|
| 8 | +import com.google.gwt.i18n.client.LocaleInfo; |
|
| 9 | +import com.google.gwt.uibinder.client.UiBinder; |
|
| 10 | +import com.google.gwt.uibinder.client.UiField; |
|
| 11 | +import com.google.gwt.user.client.ui.Composite; |
|
| 12 | +import com.google.gwt.user.client.ui.SimplePanel; |
|
| 13 | +import com.google.gwt.user.client.ui.Widget; |
|
| 14 | +import com.sap.sse.gwt.client.StringMessages; |
|
| 15 | +import com.sap.sse.gwt.shared.ClientConfiguration; |
|
| 16 | +import com.sap.sse.gwt.shared.DebugConstants; |
|
| 17 | + |
|
| 18 | +/** |
|
| 19 | + * Generic header widget that is designed with a SAP logo and SAP color scheme. |
|
| 20 | + * |
|
| 21 | + * The header has the following elements: |
|
| 22 | + * <ul> |
|
| 23 | + * <li>SAP Logo with an application title (like "Sailing Analytics")</li> |
|
| 24 | + * <li>Page title</li> |
|
| 25 | + * <li>Optional Subtitle</li> |
|
| 26 | + * <li>Optional widget to show on the right side of the header</li> |
|
| 27 | + * </ul> |
|
| 28 | + */ |
|
| 29 | +public class BrandedSailingHeader extends Composite { |
|
| 30 | + private static final StringMessages stringMessages = GWT.create(StringMessages.class); |
|
| 31 | + private static final String LOGO_URL = stringMessages.sapAnalyticsURL(); |
|
| 32 | + |
|
| 33 | + private static SailingHeaderUiBinder uiBinder = GWT.create(SailingHeaderUiBinder.class); |
|
| 34 | + |
|
| 35 | + interface SailingHeaderUiBinder extends UiBinder<Widget, BrandedSailingHeader> { |
|
| 36 | + } |
|
| 37 | + |
|
| 38 | + @UiField |
|
| 39 | + AnchorElement applicationNameAnchor; |
|
| 40 | + @UiField |
|
| 41 | + DivElement pageTitleUi; |
|
| 42 | + @UiField |
|
| 43 | + DivElement titleUi; |
|
| 44 | + @UiField |
|
| 45 | + DivElement subTitleUi; |
|
| 46 | + @UiField |
|
| 47 | + SimplePanel rightSideUi; |
|
| 48 | + @UiField |
|
| 49 | + AnchorElement logoAnchor; |
|
| 50 | + |
|
| 51 | + public BrandedSailingHeader(String applicationName, String applicationBaseUrl) { |
|
| 52 | + BrandedHeaderResources.INSTANCE.css().ensureInjected(); |
|
| 53 | + initWidget(uiBinder.createAndBindUi(this)); |
|
| 54 | + applicationNameAnchor.setInnerText(applicationName != null ? applicationName : " "); |
|
| 55 | + logoAnchor.setHref(LOGO_URL); |
|
| 56 | + String sapSailingUrl = applicationBaseUrl + "?locale=" + LocaleInfo.getCurrentLocale().getLocaleName(); |
|
| 57 | + applicationNameAnchor.setHref(sapSailingUrl); |
|
| 58 | + if (!ClientConfiguration.getInstance().isBrandingActive()) { |
|
| 59 | + logoAnchor.getStyle().setDisplay(Display.NONE); |
|
| 60 | + applicationNameAnchor.setHref(""); |
|
| 61 | + } |
|
| 62 | + logoAnchor.setAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, "logoAnchor"); |
|
| 63 | + applicationNameAnchor.setAttribute(DEBUG_ID_PREFIX, "applicationNameAnchor"); |
|
| 64 | + } |
|
| 65 | + |
|
| 66 | + public void setHeaderTitle(String title) { |
|
| 67 | + titleUi.setInnerText(title); |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + public void setHeaderSubTitle(String subtitle) { |
|
| 71 | + if (subtitle == null || subtitle.isEmpty()) { |
|
| 72 | + subTitleUi.getStyle().setDisplay(Display.NONE); |
|
| 73 | + titleUi.getStyle().setMarginTop(14, Unit.PX); |
|
| 74 | + } else { |
|
| 75 | + subTitleUi.setInnerText(subtitle); |
|
| 76 | + subTitleUi.getStyle().clearDisplay(); |
|
| 77 | + titleUi.getStyle().clearMarginTop(); |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | + |
|
| 81 | + public void addWidgetToRightSide(Widget widget) { |
|
| 82 | + rightSideUi.add(widget); |
|
| 83 | + } |
|
| 84 | +} |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/BrandedSailingHeader.ui.xml
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | +<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> |
|
| 2 | +<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" |
|
| 3 | + xmlns:g="urn:import:com.google.gwt.user.client.ui"> |
|
| 4 | + <ui:with field="local_res" |
|
| 5 | + type="com.sap.sse.gwt.client.sapheader.BrandedHeaderResources" /> |
|
| 6 | + |
|
| 7 | + <g:HTMLPanel> |
|
| 8 | + <header class="{local_res.css.siteheader}"> |
|
| 9 | + <div class="{local_res.css.siteheaderLeft}"> |
|
| 10 | + <a class="{local_res.css.logo}" ui:field="logoAnchor" target="_blank"></a> |
|
| 11 | + <a class="{local_res.css.logotitle}" target="_blank" ui:field="applicationNameAnchor"></a> |
|
| 12 | + </div> |
|
| 13 | + <div ui:field="pageTitleUi" class="{local_res.css.siteheader2ndCol}"> |
|
| 14 | + <div ui:field="titleUi" style="margin-top:14px;" class="{local_res.css.siteHeaderTitle}"></div> |
|
| 15 | + <div ui:field="subTitleUi" style="display:none;" class="{local_res.css.siteHeaderSubTitle}"></div> |
|
| 16 | + </div> |
|
| 17 | + <g:SimplePanel ui:field="rightSideUi" styleName="{local_res.css.siteheaderRight}" /> |
|
| 18 | + </header> |
|
| 19 | + </g:HTMLPanel> |
|
| 20 | +</ui:UiBinder> |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/SAPHeader.gss
| ... | ... | @@ -1,80 +0,0 @@ |
| 1 | -.siteheader { |
|
| 2 | - font-size: 1rem; |
|
| 3 | - line-height: 1.333; |
|
| 4 | - background: #000; |
|
| 5 | - height: 70px; |
|
| 6 | - width: 100%; |
|
| 7 | - overflow: hidden; |
|
| 8 | - vertical-align: top; |
|
| 9 | - position: relative; |
|
| 10 | -} |
|
| 11 | - |
|
| 12 | -.siteHeaderTitle { |
|
| 13 | - color: #fff; |
|
| 14 | - vertical-align: top; |
|
| 15 | - font-size: 20px; |
|
| 16 | - font-weight: 700; |
|
| 17 | -} |
|
| 18 | - |
|
| 19 | -.siteHeaderSubTitle { |
|
| 20 | - color: #fff; |
|
| 21 | - font-size: 18px; |
|
| 22 | - vertical-align: top; |
|
| 23 | -} |
|
| 24 | - |
|
| 25 | -.siteheaderLeft { |
|
| 26 | - position: relative; top:10px;left:10px; |
|
| 27 | - display: inline-block; |
|
| 28 | - text-align: left; |
|
| 29 | - height: 50px; |
|
| 30 | - vertical-align: top; |
|
| 31 | -} |
|
| 32 | - |
|
| 33 | -.siteheader2ndCol { |
|
| 34 | - position: absolute; top:10px;left:235px; |
|
| 35 | - display: inline-block; |
|
| 36 | - text-align: left; |
|
| 37 | - height:50px; |
|
| 38 | - vertical-align: top; |
|
| 39 | -} |
|
| 40 | - |
|
| 41 | -.siteheaderRight { |
|
| 42 | - position: absolute; top:10px;right:10px; |
|
| 43 | - text-align: right; |
|
| 44 | - display: inline-block; |
|
| 45 | - height:50px; |
|
| 46 | - vertical-align: top; |
|
| 47 | -} |
|
| 48 | - |
|
| 49 | -.logo, .logo:hover, .logo:visited { |
|
| 50 | - margin: 0px; |
|
| 51 | - display: inline-block; |
|
| 52 | - gwt-sprite: "logo"; |
|
| 53 | - background-size: cover; |
|
| 54 | - width: 80px; |
|
| 55 | - height: 40px; |
|
| 56 | - border: none; |
|
| 57 | - text-decoration: none; |
|
| 58 | -} |
|
| 59 | - |
|
| 60 | -.logotitle, .logotitle:hover, .logotitle:visited { |
|
| 61 | - font-size: 1rem; |
|
| 62 | - display: inline-block; |
|
| 63 | - color: #fff; |
|
| 64 | - width: 150px; |
|
| 65 | - height: 100%; |
|
| 66 | - padding: 17px 15px 0 0; |
|
| 67 | - vertical-align: top; |
|
| 68 | - text-align: right; |
|
| 69 | - border: none; |
|
| 70 | - border-right: 1px solid rgb(180,180,180); |
|
| 71 | - margin: 0px; |
|
| 72 | - margin-left: -25px; |
|
| 73 | - box-sizing: border-box; |
|
| 74 | - text-decoration: none; |
|
| 75 | -} |
|
| 76 | -.pagetitle { |
|
| 77 | - color: #ffffff; |
|
| 78 | - font-size: 1.1rem; |
|
| 79 | - font-weight: bold; |
|
| 80 | -} |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/SAPHeader.java
| ... | ... | @@ -1,84 +0,0 @@ |
| 1 | -package com.sap.sse.gwt.client.sapheader; |
|
| 2 | - |
|
| 3 | -import com.google.gwt.core.client.GWT; |
|
| 4 | -import com.google.gwt.dom.client.AnchorElement; |
|
| 5 | -import com.google.gwt.dom.client.DivElement; |
|
| 6 | -import com.google.gwt.dom.client.Style.Display; |
|
| 7 | -import com.google.gwt.dom.client.Style.Unit; |
|
| 8 | -import com.google.gwt.i18n.client.LocaleInfo; |
|
| 9 | -import com.google.gwt.uibinder.client.UiBinder; |
|
| 10 | -import com.google.gwt.uibinder.client.UiField; |
|
| 11 | -import com.google.gwt.user.client.ui.Composite; |
|
| 12 | -import com.google.gwt.user.client.ui.SimplePanel; |
|
| 13 | -import com.google.gwt.user.client.ui.Widget; |
|
| 14 | -import com.sap.sse.gwt.client.StringMessages; |
|
| 15 | -import com.sap.sse.gwt.shared.ClientConfiguration; |
|
| 16 | -import com.sap.sse.gwt.shared.DebugConstants; |
|
| 17 | - |
|
| 18 | -/** |
|
| 19 | - * Generic header widget that is designed with a SAP logo and SAP color scheme. |
|
| 20 | - * |
|
| 21 | - * The header has the following elements: |
|
| 22 | - * <ul> |
|
| 23 | - * <li>SAP Logo with an application title (like "Sailing Analytics")</li> |
|
| 24 | - * <li>Page title</li> |
|
| 25 | - * <li>Optional Subtitle</li> |
|
| 26 | - * <li>Optional widget to show on the right side of the header</li> |
|
| 27 | - * </ul> |
|
| 28 | - */ |
|
| 29 | -public class SAPHeader extends Composite { |
|
| 30 | - private static final StringMessages stringMessages = GWT.create(StringMessages.class); |
|
| 31 | - private static final String LOGO_URL = stringMessages.sapAnalyticsURL(); |
|
| 32 | - |
|
| 33 | - private static SAPHeaderUiBinder uiBinder = GWT.create(SAPHeaderUiBinder.class); |
|
| 34 | - |
|
| 35 | - interface SAPHeaderUiBinder extends UiBinder<Widget, SAPHeader> { |
|
| 36 | - } |
|
| 37 | - |
|
| 38 | - @UiField |
|
| 39 | - AnchorElement applicationNameAnchor; |
|
| 40 | - @UiField |
|
| 41 | - DivElement pageTitleUi; |
|
| 42 | - @UiField |
|
| 43 | - DivElement titleUi; |
|
| 44 | - @UiField |
|
| 45 | - DivElement subTitleUi; |
|
| 46 | - @UiField |
|
| 47 | - SimplePanel rightSideUi; |
|
| 48 | - @UiField |
|
| 49 | - AnchorElement logoAnchor; |
|
| 50 | - |
|
| 51 | - public SAPHeader(String applicationName, String applicationBaseUrl) { |
|
| 52 | - SAPHeaderResources.INSTANCE.css().ensureInjected(); |
|
| 53 | - initWidget(uiBinder.createAndBindUi(this)); |
|
| 54 | - applicationNameAnchor.setInnerText(applicationName != null ? applicationName : " "); |
|
| 55 | - logoAnchor.setHref(LOGO_URL); |
|
| 56 | - String sapSailingUrl = applicationBaseUrl + "?locale=" + LocaleInfo.getCurrentLocale().getLocaleName(); |
|
| 57 | - applicationNameAnchor.setHref(sapSailingUrl); |
|
| 58 | - if (!ClientConfiguration.getInstance().isBrandingActive()) { |
|
| 59 | - logoAnchor.getStyle().setDisplay(Display.NONE); |
|
| 60 | - applicationNameAnchor.setHref(""); |
|
| 61 | - } |
|
| 62 | - logoAnchor.setAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, "logoAnchor"); |
|
| 63 | - applicationNameAnchor.setAttribute(DEBUG_ID_PREFIX, "applicationNameAnchor"); |
|
| 64 | - } |
|
| 65 | - |
|
| 66 | - public void setHeaderTitle(String title) { |
|
| 67 | - titleUi.setInnerText(title); |
|
| 68 | - } |
|
| 69 | - |
|
| 70 | - public void setHeaderSubTitle(String subtitle) { |
|
| 71 | - if (subtitle == null || subtitle.isEmpty()) { |
|
| 72 | - subTitleUi.getStyle().setDisplay(Display.NONE); |
|
| 73 | - titleUi.getStyle().setMarginTop(14, Unit.PX); |
|
| 74 | - } else { |
|
| 75 | - subTitleUi.setInnerText(subtitle); |
|
| 76 | - subTitleUi.getStyle().clearDisplay(); |
|
| 77 | - titleUi.getStyle().clearMarginTop(); |
|
| 78 | - } |
|
| 79 | - } |
|
| 80 | - |
|
| 81 | - public void addWidgetToRightSide(Widget widget) { |
|
| 82 | - rightSideUi.add(widget); |
|
| 83 | - } |
|
| 84 | -} |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/SAPHeader.ui.xml
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> |
|
| 2 | -<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" |
|
| 3 | - xmlns:g="urn:import:com.google.gwt.user.client.ui"> |
|
| 4 | - <ui:with field="local_res" |
|
| 5 | - type="com.sap.sse.gwt.client.sapheader.SAPHeaderResources" /> |
|
| 6 | - |
|
| 7 | - <g:HTMLPanel> |
|
| 8 | - <header class="{local_res.css.siteheader}"> |
|
| 9 | - <div class="{local_res.css.siteheaderLeft}"> |
|
| 10 | - <a class="{local_res.css.logo}" ui:field="logoAnchor" target="_blank"></a> |
|
| 11 | - <a class="{local_res.css.logotitle}" target="_blank" ui:field="applicationNameAnchor"></a> |
|
| 12 | - </div> |
|
| 13 | - <div ui:field="pageTitleUi" class="{local_res.css.siteheader2ndCol}"> |
|
| 14 | - <div ui:field="titleUi" style="margin-top:14px;" class="{local_res.css.siteHeaderTitle}"></div> |
|
| 15 | - <div ui:field="subTitleUi" style="display:none;" class="{local_res.css.siteHeaderSubTitle}"></div> |
|
| 16 | - </div> |
|
| 17 | - <g:SimplePanel ui:field="rightSideUi" styleName="{local_res.css.siteheaderRight}" /> |
|
| 18 | - </header> |
|
| 19 | - </g:HTMLPanel> |
|
| 20 | -</ui:UiBinder> |
java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/sapheader/SAPHeaderResources.java
| ... | ... | @@ -1,28 +0,0 @@ |
| 1 | -package com.sap.sse.gwt.client.sapheader; |
|
| 2 | - |
|
| 3 | -import com.google.gwt.core.client.GWT; |
|
| 4 | -import com.google.gwt.resources.client.ClientBundle; |
|
| 5 | -import com.google.gwt.resources.client.CssResource; |
|
| 6 | -import com.google.gwt.resources.client.ImageResource; |
|
| 7 | - |
|
| 8 | -public interface SAPHeaderResources extends ClientBundle { |
|
| 9 | - public static final SAPHeaderResources INSTANCE = GWT.create(SAPHeaderResources.class); |
|
| 10 | - |
|
| 11 | - @Source("SAPHeader.gss") |
|
| 12 | - LocalCss css(); |
|
| 13 | - |
|
| 14 | - public interface LocalCss extends CssResource { |
|
| 15 | - String siteheader(); |
|
| 16 | - String siteheaderLeft(); |
|
| 17 | - String siteHeaderTitle(); |
|
| 18 | - String siteHeaderSubTitle(); |
|
| 19 | - String siteheader2ndCol(); |
|
| 20 | - String siteheaderRight(); |
|
| 21 | - String logo(); |
|
| 22 | - String logotitle(); |
|
| 23 | - String pagetitle(); |
|
| 24 | - } |
|
| 25 | - |
|
| 26 | - @Source("logo-small@2x.png") |
|
| 27 | - ImageResource logo(); |
|
| 28 | -} |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/BrandedHeaderWithAuthentication.java
| ... | ... | @@ -0,0 +1,60 @@ |
| 1 | +package com.sap.sse.security.ui.authentication.generic.sapheader; |
|
| 2 | + |
|
| 3 | +import com.google.gwt.user.client.ui.Anchor; |
|
| 4 | +import com.google.gwt.user.client.ui.FlowPanel; |
|
| 5 | +import com.google.gwt.user.client.ui.SimplePanel; |
|
| 6 | +import com.google.gwt.user.client.ui.Widget; |
|
| 7 | +import com.sap.sse.gwt.client.controls.languageselect.LanguageSelector; |
|
| 8 | +import com.sap.sse.gwt.client.sapheader.BrandedSailingHeader; |
|
| 9 | +import com.sap.sse.security.ui.authentication.generic.GenericAuthentication; |
|
| 10 | +import com.sap.sse.security.ui.authentication.view.AuthenticationMenuView; |
|
| 11 | +import com.sap.sse.security.ui.authentication.view.AuthenticationMenuViewImpl; |
|
| 12 | + |
|
| 13 | +/** |
|
| 14 | + * {@link BrandedSailingHeader} which is decorated by a authentication control on the right side. This is typically used to |
|
| 15 | + * integrate with {@link GenericAuthentication}. |
|
| 16 | + */ |
|
| 17 | +public class BrandedHeaderWithAuthentication extends BrandedSailingHeader { |
|
| 18 | + private static final HeaderWithAuthenticationResources res = HeaderWithAuthenticationResources.INSTANCE; |
|
| 19 | + |
|
| 20 | + private final SimplePanel rightWrapper; |
|
| 21 | + |
|
| 22 | + private AuthenticationMenuView authenticationMenuView; |
|
| 23 | + |
|
| 24 | + public BrandedHeaderWithAuthentication(String applicationName, String applicationBaseUrl, String headerTitle) { |
|
| 25 | + this(applicationName, applicationBaseUrl); |
|
| 26 | + setHeaderTitle(headerTitle); |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public BrandedHeaderWithAuthentication(String applicationName, String applicationBaseUrl) { |
|
| 30 | + super(applicationName, applicationBaseUrl); |
|
| 31 | + res.css().ensureInjected(); |
|
| 32 | + FlowPanel rightWithAuthentication = new FlowPanel(); |
|
| 33 | + rightWithAuthentication.addStyleName(res.css().header_right_wrapper()); |
|
| 34 | + final LanguageSelector languageSelector = new LanguageSelector(); |
|
| 35 | + languageSelector.addStyleName(res.css().languageSelector()); |
|
| 36 | + rightWithAuthentication.add(languageSelector); |
|
| 37 | + Anchor authenticationMenu = new Anchor(); |
|
| 38 | + authenticationMenu.addStyleName(res.css().usermanagement_icon()); |
|
| 39 | + rightWithAuthentication.add(authenticationMenu); |
|
| 40 | + authenticationMenuView = new AuthenticationMenuViewImpl(authenticationMenu, res.css().usermanagement_loggedin(), |
|
| 41 | + res.css().usermanagement_open(), res.css().user_menu_premium()); |
|
| 42 | + rightWrapper = new SimplePanel(); |
|
| 43 | + rightWrapper.addStyleName(res.css().header_right_extension()); |
|
| 44 | + rightWithAuthentication.add(rightWrapper); |
|
| 45 | + super.addWidgetToRightSide(rightWithAuthentication); |
|
| 46 | + } |
|
| 47 | + |
|
| 48 | + @Override |
|
| 49 | + public void addWidgetToRightSide(Widget widget) { |
|
| 50 | + rightWrapper.add(widget); |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * @return the {@link AuthenticationMenuView} associated with the authentication control on the right side of the |
|
| 55 | + * header. |
|
| 56 | + */ |
|
| 57 | + public AuthenticationMenuView getAuthenticationMenuView() { |
|
| 58 | + return authenticationMenuView; |
|
| 59 | + } |
|
| 60 | +} |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/FixedFlyoutAuthenticationView.java
| ... | ... | @@ -12,7 +12,7 @@ import com.sap.sse.gwt.common.CommonSharedResources; |
| 12 | 12 | import com.sap.sse.security.ui.authentication.view.FlyoutAuthenticationView; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * {@link FlyoutAuthenticationView} styled to work with {@link SAPHeaderWithAuthentication}. This is used in cases when |
|
| 15 | + * {@link FlyoutAuthenticationView} styled to work with {@link BrandedHeaderWithAuthentication}. This is used in cases when |
|
| 16 | 16 | * the header is positioned as fixed on top of the page. |
| 17 | 17 | */ |
| 18 | 18 | public class FixedFlyoutAuthenticationView extends GenericFlyoutAuthenticationView { |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/FixedLoginHintPopup.java
| ... | ... | @@ -11,6 +11,6 @@ public class FixedLoginHintPopup extends GenericLoginHintPopup { |
| 11 | 11 | |
| 12 | 12 | public FixedLoginHintPopup(AuthenticationManager authenticationManager, GenericAuthenticationLinkFactory linkFactory) { |
| 13 | 13 | super(authenticationManager, linkFactory); |
| 14 | - this.addStyleName(SAPHeaderWithAuthenticationResources.INSTANCE.css().fixed()); |
|
| 14 | + this.addStyleName(HeaderWithAuthenticationResources.INSTANCE.css().fixed()); |
|
| 15 | 15 | } |
| 16 | 16 | } |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/GenericFlyoutAuthenticationView.java
| ... | ... | @@ -5,11 +5,11 @@ import com.sap.sse.security.ui.authentication.view.AbstractFlyoutAuthenticationV |
| 5 | 5 | import com.sap.sse.security.ui.authentication.view.FlyoutAuthenticationView; |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | - * {@link FlyoutAuthenticationView} styled to work with {@link SAPHeaderWithAuthentication}. |
|
| 8 | + * {@link FlyoutAuthenticationView} styled to work with {@link BrandedHeaderWithAuthentication}. |
|
| 9 | 9 | * |
| 10 | 10 | */ |
| 11 | 11 | public class GenericFlyoutAuthenticationView extends AbstractFlyoutAuthenticationView { |
| 12 | - protected static final SAPHeaderWithAuthenticationResources res = SAPHeaderWithAuthenticationResources.INSTANCE; |
|
| 12 | + protected static final HeaderWithAuthenticationResources res = HeaderWithAuthenticationResources.INSTANCE; |
|
| 13 | 13 | |
| 14 | 14 | public GenericFlyoutAuthenticationView(CommonSharedResources resources) { |
| 15 | 15 | super(resources); |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/GenericLoginHintPopup.java
| ... | ... | @@ -13,6 +13,6 @@ public class GenericLoginHintPopup extends LoginHintPopup { |
| 13 | 13 | |
| 14 | 14 | public GenericLoginHintPopup(AuthenticationManager authenticationManager, GenericAuthenticationLinkFactory linkFactory) { |
| 15 | 15 | super(authenticationManager, () -> Window.open(linkFactory.createMoreInfoAboutLoginLink(), "_blank", ""), null); |
| 16 | - this.addStyleName(SAPHeaderWithAuthenticationResources.INSTANCE.css().usermanagement_view()); |
|
| 16 | + this.addStyleName(HeaderWithAuthenticationResources.INSTANCE.css().usermanagement_view()); |
|
| 17 | 17 | } |
| 18 | 18 | } |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/HeaderWithAuthenticationResources.java
| ... | ... | @@ -0,0 +1,25 @@ |
| 1 | +package com.sap.sse.security.ui.authentication.generic.sapheader; |
|
| 2 | + |
|
| 3 | +import com.google.gwt.core.client.GWT; |
|
| 4 | +import com.google.gwt.resources.client.CssResource; |
|
| 5 | +import com.sap.sse.security.ui.authentication.generic.resource.AuthenticationResources; |
|
| 6 | + |
|
| 7 | +public interface HeaderWithAuthenticationResources extends AuthenticationResources { |
|
| 8 | + public static final HeaderWithAuthenticationResources INSTANCE = GWT |
|
| 9 | + .create(HeaderWithAuthenticationResources.class); |
|
| 10 | + |
|
| 11 | + @Source("header-with-authentication.gss") |
|
| 12 | + HeaderWithAuthenticationCss css(); |
|
| 13 | + |
|
| 14 | + public interface HeaderWithAuthenticationCss extends CssResource { |
|
| 15 | + String header_right_wrapper(); |
|
| 16 | + String header_right_extension(); |
|
| 17 | + String fixed(); |
|
| 18 | + String usermanagement_icon(); |
|
| 19 | + String usermanagement_loggedin(); |
|
| 20 | + String usermanagement_view(); |
|
| 21 | + String usermanagement_open(); |
|
| 22 | + String user_menu_premium(); |
|
| 23 | + String languageSelector(); |
|
| 24 | + } |
|
| 25 | +} |
|
| ... | ... | \ No newline at end of file |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/SAPHeaderWithAuthentication.java
| ... | ... | @@ -1,60 +0,0 @@ |
| 1 | -package com.sap.sse.security.ui.authentication.generic.sapheader; |
|
| 2 | - |
|
| 3 | -import com.google.gwt.user.client.ui.Anchor; |
|
| 4 | -import com.google.gwt.user.client.ui.FlowPanel; |
|
| 5 | -import com.google.gwt.user.client.ui.SimplePanel; |
|
| 6 | -import com.google.gwt.user.client.ui.Widget; |
|
| 7 | -import com.sap.sse.gwt.client.controls.languageselect.LanguageSelector; |
|
| 8 | -import com.sap.sse.gwt.client.sapheader.SAPHeader; |
|
| 9 | -import com.sap.sse.security.ui.authentication.generic.GenericAuthentication; |
|
| 10 | -import com.sap.sse.security.ui.authentication.view.AuthenticationMenuView; |
|
| 11 | -import com.sap.sse.security.ui.authentication.view.AuthenticationMenuViewImpl; |
|
| 12 | - |
|
| 13 | -/** |
|
| 14 | - * {@link SAPHeader} which is decorated by a authentication control on the right side. This is typically used to |
|
| 15 | - * integrate with {@link GenericAuthentication}. |
|
| 16 | - */ |
|
| 17 | -public class SAPHeaderWithAuthentication extends SAPHeader { |
|
| 18 | - private static final SAPHeaderWithAuthenticationResources res = SAPHeaderWithAuthenticationResources.INSTANCE; |
|
| 19 | - |
|
| 20 | - private final SimplePanel rightWrapper; |
|
| 21 | - |
|
| 22 | - private AuthenticationMenuView authenticationMenuView; |
|
| 23 | - |
|
| 24 | - public SAPHeaderWithAuthentication(String applicationName, String applicationBaseUrl, String headerTitle) { |
|
| 25 | - this(applicationName, applicationBaseUrl); |
|
| 26 | - setHeaderTitle(headerTitle); |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public SAPHeaderWithAuthentication(String applicationName, String applicationBaseUrl) { |
|
| 30 | - super(applicationName, applicationBaseUrl); |
|
| 31 | - res.css().ensureInjected(); |
|
| 32 | - FlowPanel rightWithAuthentication = new FlowPanel(); |
|
| 33 | - rightWithAuthentication.addStyleName(res.css().header_right_wrapper()); |
|
| 34 | - final LanguageSelector languageSelector = new LanguageSelector(); |
|
| 35 | - languageSelector.addStyleName(res.css().languageSelector()); |
|
| 36 | - rightWithAuthentication.add(languageSelector); |
|
| 37 | - Anchor authenticationMenu = new Anchor(); |
|
| 38 | - authenticationMenu.addStyleName(res.css().usermanagement_icon()); |
|
| 39 | - rightWithAuthentication.add(authenticationMenu); |
|
| 40 | - authenticationMenuView = new AuthenticationMenuViewImpl(authenticationMenu, res.css().usermanagement_loggedin(), |
|
| 41 | - res.css().usermanagement_open(), res.css().user_menu_premium()); |
|
| 42 | - rightWrapper = new SimplePanel(); |
|
| 43 | - rightWrapper.addStyleName(res.css().header_right_extension()); |
|
| 44 | - rightWithAuthentication.add(rightWrapper); |
|
| 45 | - super.addWidgetToRightSide(rightWithAuthentication); |
|
| 46 | - } |
|
| 47 | - |
|
| 48 | - @Override |
|
| 49 | - public void addWidgetToRightSide(Widget widget) { |
|
| 50 | - rightWrapper.add(widget); |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - /** |
|
| 54 | - * @return the {@link AuthenticationMenuView} associated with the authentication control on the right side of the |
|
| 55 | - * header. |
|
| 56 | - */ |
|
| 57 | - public AuthenticationMenuView getAuthenticationMenuView() { |
|
| 58 | - return authenticationMenuView; |
|
| 59 | - } |
|
| 60 | -} |
java/com.sap.sse.security.ui/src/main/java/com/sap/sse/security/ui/authentication/generic/sapheader/SAPHeaderWithAuthenticationResources.java
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -package com.sap.sse.security.ui.authentication.generic.sapheader; |
|
| 2 | - |
|
| 3 | -import com.google.gwt.core.client.GWT; |
|
| 4 | -import com.google.gwt.resources.client.CssResource; |
|
| 5 | -import com.sap.sse.security.ui.authentication.generic.resource.AuthenticationResources; |
|
| 6 | - |
|
| 7 | -public interface SAPHeaderWithAuthenticationResources extends AuthenticationResources { |
|
| 8 | - public static final SAPHeaderWithAuthenticationResources INSTANCE = GWT |
|
| 9 | - .create(SAPHeaderWithAuthenticationResources.class); |
|
| 10 | - |
|
| 11 | - @Source("header-with-authentication.gss") |
|
| 12 | - HeaderWithAuthenticationCss css(); |
|
| 13 | - |
|
| 14 | - public interface HeaderWithAuthenticationCss extends CssResource { |
|
| 15 | - String header_right_wrapper(); |
|
| 16 | - String header_right_extension(); |
|
| 17 | - String fixed(); |
|
| 18 | - String usermanagement_icon(); |
|
| 19 | - String usermanagement_loggedin(); |
|
| 20 | - String usermanagement_view(); |
|
| 21 | - String usermanagement_open(); |
|
| 22 | - String user_menu_premium(); |
|
| 23 | - String languageSelector(); |
|
| 24 | - } |
|
| 25 | -} |
|
| ... | ... | \ No newline at end of file |