mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Added navigations to quickfinder on user profile pages
This commit is contained in:
1 parent
94a85e9332
commit
96552195e2
6 files changed
+46
-8
No files matched your search
+5
@@ -10,6 +10,7 @@ import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.quickfinder.Quickfinder;
|
||||
import com.sap.sailing.gwt.home.shared.usermanagement.decorator.AuthorizedContentDecoratorMobile;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sse.security.ui.authentication.app.AuthenticationContext;
|
||||
import com.sap.sse.security.ui.userprofile.mobile.userheader.UserHeader;
|
||||
|
||||
@@ -32,11 +33,15 @@ public class AbstractUserProfileView extends Composite implements UserProfileVie
|
||||
}
|
||||
}
|
||||
|
||||
protected final StringMessages i18n = StringMessages.INSTANCE;
|
||||
private final AbstractUserProfileViewLayout layout;
|
||||
|
||||
protected AbstractUserProfileView(UserProfileViewBase.Presenter presenter) {
|
||||
this.layout = new AbstractUserProfileViewLayout(presenter);
|
||||
initWidget(uiBinder.createAndBindUi(this.layout));
|
||||
this.layout.quickfinderUi.addPlaceholderItem(i18n.profileQuickfinder());
|
||||
this.layout.quickfinderUi.addItem(i18n.details(), presenter.getUserProfileNavigation());
|
||||
this.layout.quickfinderUi.addItem(i18n.favoritesAndNotifications(), presenter.getUserPreferencesNavigation());
|
||||
}
|
||||
|
||||
protected final void setViewContent(IsWidget content) {
|
||||
|
||||
+11
-3
@@ -4,13 +4,21 @@
|
||||
xmlns:uh="urn:import:com.sap.sse.security.ui.userprofile.mobile.userheader"
|
||||
xmlns:um="urn:import:com.sap.sailing.gwt.home.shared.usermanagement.decorator">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:style>
|
||||
.headerWrapper {
|
||||
background-color: #f2f2f2;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:FlowPanel>
|
||||
<uh:UserHeader ui:field="userHeaderUi" />
|
||||
<mp:quickfinder.Quickfinder ui:field="quickfinderUi" />
|
||||
<g:FlowPanel addStyleNames="{style.headerWrapper}">
|
||||
<uh:UserHeader ui:field="userHeaderUi" />
|
||||
<mp:quickfinder.Quickfinder ui:field="quickfinderUi" />
|
||||
</g:FlowPanel>
|
||||
<um:AuthorizedContentDecoratorMobile ui:field="decoratorUi">
|
||||
<um:content>
|
||||
<g:SimplePanel ui:field="contentContainerUi"/>
|
||||
</um:content>
|
||||
</um:AuthorizedContentDecoratorMobile>
|
||||
</g:FlowPanel>
|
||||
</ui:UiBinder>
|
||||
</ui:UiBinder>
|
||||
+5
-2
@@ -1,12 +1,15 @@
|
||||
package com.sap.sailing.gwt.home.mobile.places.user.profile;
|
||||
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.shared.places.user.profile.AbstractUserProfilePlace;
|
||||
import com.sap.sse.security.ui.authentication.app.NeedsAuthenticationContext;
|
||||
import com.sap.sse.security.ui.authentication.decorator.NotLoggedInPresenter;
|
||||
|
||||
public interface UserProfileViewBase extends IsWidget, NeedsAuthenticationContext {
|
||||
|
||||
|
||||
public interface Presenter extends NotLoggedInPresenter {
|
||||
|
||||
PlaceNavigation<? extends AbstractUserProfilePlace> getUserProfileNavigation();
|
||||
PlaceNavigation<? extends AbstractUserProfilePlace> getUserPreferencesNavigation();
|
||||
}
|
||||
}
|
||||
+13
-1
@@ -4,6 +4,7 @@ import com.google.gwt.activity.shared.AbstractActivity;
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.mobile.app.MobileApplicationClientFactory;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.shared.places.user.profile.AbstractUserProfilePlace;
|
||||
import com.sap.sse.security.ui.authentication.AuthenticationContextEvent;
|
||||
import com.sap.sse.security.ui.userprofile.shared.userdetails.UserDetailsPresenter;
|
||||
@@ -12,12 +13,13 @@ public class UserProfileDetailsActivity extends AbstractActivity implements User
|
||||
|
||||
private final MobileApplicationClientFactory clientFactory;
|
||||
|
||||
private final UserProfileDetailsView currentView = new UserProfileDetailsViewImpl(this);
|
||||
private final UserProfileDetailsView currentView;
|
||||
|
||||
private UserDetailsPresenter userDetailsPresenter;
|
||||
|
||||
public UserProfileDetailsActivity(AbstractUserProfilePlace place, MobileApplicationClientFactory clientFactory) {
|
||||
this.clientFactory = clientFactory;
|
||||
this.currentView = new UserProfileDetailsViewImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,4 +44,14 @@ public class UserProfileDetailsActivity extends AbstractActivity implements User
|
||||
public void doTriggerLoginForm() {
|
||||
clientFactory.getNavigator().getSignInNavigation().goToPlace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<? extends AbstractUserProfilePlace> getUserProfileNavigation() {
|
||||
return clientFactory.getNavigator().getUserProfileNavigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<? extends AbstractUserProfilePlace> getUserPreferencesNavigation() {
|
||||
return clientFactory.getNavigator().getUserPreferencesNavigation();
|
||||
}
|
||||
}
|
||||
+12
@@ -19,6 +19,8 @@ import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.AbstractSu
|
||||
import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.SuggestedMultiSelectionBoatClassDataProvider;
|
||||
import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.SuggestedMultiSelectionCompetitorDataProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.app.MobileApplicationClientFactory;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.shared.places.user.profile.AbstractUserProfilePlace;
|
||||
import com.sap.sailing.gwt.home.shared.places.user.profile.UserProfilePreferencesPlace;
|
||||
import com.sap.sse.gwt.dispatch.shared.commands.VoidResult;
|
||||
import com.sap.sse.security.ui.authentication.AuthenticationContextEvent;
|
||||
@@ -132,4 +134,14 @@ public class UserProfilePreferencesActivity extends AbstractActivity implements
|
||||
public void onSuccess(VoidResult result) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<? extends AbstractUserProfilePlace> getUserProfileNavigation() {
|
||||
return clientFactory.getNavigator().getUserProfileNavigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<? extends AbstractUserProfilePlace> getUserPreferencesNavigation() {
|
||||
return clientFactory.getNavigator().getUserPreferencesNavigation();
|
||||
}
|
||||
}
|
||||
-2
@@ -15,7 +15,6 @@ import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.SuggestedM
|
||||
import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.SuggestedMultiSelectionBoatClassDataProvider;
|
||||
import com.sap.sailing.gwt.home.desktop.places.user.profile.selection.SuggestedMultiSelectionCompetitorDataProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.user.profile.AbstractUserProfileView;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class UserProfilePreferencesViewImpl extends AbstractUserProfileView implements UserProfilePreferencesView {
|
||||
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
|
||||
@@ -23,7 +22,6 @@ public class UserProfilePreferencesViewImpl extends AbstractUserProfileView impl
|
||||
interface MyUiBinder extends UiBinder<Widget, UserProfilePreferencesViewImpl> {
|
||||
}
|
||||
|
||||
private final StringMessages i18n = StringMessages.INSTANCE;
|
||||
@UiField(provided = true) SuggestedMultiSelection<SimpleCompetitorWithIdDTO> favoriteCompetitorsSelctionUi;
|
||||
@UiField(provided = true) SuggestedMultiSelection<BoatClassDTO> favoriteBoatClassesSelctionUi;
|
||||
@UiField DivElement notificationsTextUi;
|
||||
|
||||
Reference in new issue
Block a user