mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-28 14:57:12 +00:00
Added user management menu icon to desktop header
This commit is contained in:
1 parent
85398371e3
commit
4e97d314f6
5 files changed
+47
No files matched your search
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 40 30" style="enable-background:new 0 0 40 30;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#49639F;}
|
||||
.st1{fill:#DC4A38;}
|
||||
.st2{fill:#F0AB00;}
|
||||
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#333333;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st2" d="M12.8,15c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4s-4,1.8-4,4C8.8,13.2,10.6,15,12.8,15z M12.8,17c-2.7,0-8,1.3-8,4v2
|
||||
h16v-2C20.8,18.3,15.5,17,12.8,17z"/>
|
||||
<polygon class="st2" points="35.2,12.5 30.2,17.5 25.2,12.5 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 866 B |
+9
@@ -104,3 +104,12 @@
|
||||
.submit {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.user_menu_button {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
vertical-align: middle;
|
||||
background: url('images/home/loggedin.svg') no-repeat center;
|
||||
margin-left: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
+18
@@ -16,6 +16,7 @@ import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
@@ -31,6 +32,7 @@ import com.sap.sailing.gwt.home.shared.places.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.shared.places.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.shared.places.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.shared.places.start.StartPlace;
|
||||
import com.sap.sailing.gwt.home.shared.usermanagement.UserManagementFlyover;
|
||||
import com.sap.sse.gwt.client.mvp.PlaceChangedEvent;
|
||||
|
||||
public class Header extends Composite {
|
||||
@@ -41,6 +43,8 @@ public class Header extends Composite {
|
||||
|
||||
@UiField TextBox searchText;
|
||||
@UiField Button searchButton;
|
||||
|
||||
@UiField Anchor usermenu;
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
@@ -51,6 +55,8 @@ public class Header extends Composite {
|
||||
private final PlaceNavigation<EventsPlace> eventsNavigation;
|
||||
private final PlaceNavigation<SolutionsPlace> solutionsNavigation;
|
||||
|
||||
private final UserManagementFlyover userManagementFlyover;
|
||||
|
||||
interface HeaderUiBinder extends UiBinder<Widget, Header> {
|
||||
}
|
||||
|
||||
@@ -74,6 +80,7 @@ public class Header extends Composite {
|
||||
HeaderResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
userManagementFlyover = new UserManagementFlyover(usermenu.getElement());
|
||||
links = Arrays.asList(new Anchor[] { startPageLink, eventsPageLink, solutionsPageLink });
|
||||
|
||||
homeNavigation = navigator.getHomeNavigation();
|
||||
@@ -122,6 +129,17 @@ public class Header extends Composite {
|
||||
navigator.goToPlace(searchResultNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("usermenu")
|
||||
void toggleUsermenu(ClickEvent event) {
|
||||
if (userManagementFlyover.isShowing()) {
|
||||
userManagementFlyover.hide();
|
||||
} else {
|
||||
userManagementFlyover.show();
|
||||
// FIXME: Temporary dummy content for user management flyover
|
||||
userManagementFlyover.setWidget(new Label("TODO User Management"));
|
||||
}
|
||||
}
|
||||
|
||||
private void updateActiveLink(Place place) {
|
||||
if(place instanceof EventsPlace
|
||||
|| place instanceof AbstractEventPlace
|
||||
|
||||
+1
@@ -36,6 +36,7 @@
|
||||
<g:Button ui:field="searchButton" styleName="{res.mainCss.button} {res.mainCss.buttonsearch} {local_res.css.search_button}" />
|
||||
</span>
|
||||
<!-- IFEND siteNavigation.current -->
|
||||
<g:Anchor addStyleNames="{local_res.css.sitenavigation_link} {local_res.css.user_menu_button}" ui:field="usermenu"/>
|
||||
</nav>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
|
||||
+1
@@ -23,5 +23,6 @@ public interface HeaderResources extends ClientBundle {
|
||||
String search_textfield();
|
||||
String search_button();
|
||||
String submit();
|
||||
String user_menu_button();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user