# HG changeset patch # User Christian Lins # Date 1372250536 -7200 # Node ID 0341504e9debc8c50b5ec04b7c948d677678feb5 # Parent 402e9eb2922d89327c0b03ef852512fcf90b2905 Info-Button now leads to $WIKI_URL/Info. Ticket for authentication not implemented yet. diff -r 402e9eb2922d -r 0341504e9deb gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java Wed Jun 26 13:53:18 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java Wed Jun 26 14:42:16 2013 +0200 @@ -12,7 +12,6 @@ import com.google.gwt.i18n.client.LocaleInfo; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; - import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.VerticalAlignment; import com.smartgwt.client.util.BooleanCallback; @@ -20,10 +19,11 @@ import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Img; import com.smartgwt.client.widgets.Label; -import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; +import com.smartgwt.client.widgets.layout.HLayout; +import org.dive4elements.river.client.client.Config; import org.dive4elements.river.client.client.FLYS; import org.dive4elements.river.client.client.FLYSConstants; import org.dive4elements.river.client.client.services.UserService; @@ -32,12 +32,14 @@ /** + * Header of the FLYS webpage/app. + * * @author Ingo Weinzierl */ public class FLYSHeader extends HLayout { /** The interface that provides the message resources. */ - private FLYSConstants MESSAGES = GWT.create(FLYSConstants.class); + private final FLYSConstants MESSAGES = GWT.create(FLYSConstants.class); /** The height used for this header.*/ public static final int HEIGHT = 56; @@ -49,25 +51,25 @@ private User currentUser; /** The label that displays the current logged in user. */ - private Label userText; + private final Label userText; /** The button to log the current user out.*/ - private Button logout; + private final Button logout; /** The button to open the project list.*/ - private Button projectList; + private final Button projectList; /** The button to switch between the english and german version.*/ - private Button language; + private final Button language; /** The button to open an info panel.*/ - private Button info; + private final Button info; - private UserServiceAsync userService = + private final UserServiceAsync userService = GWT.create(UserService.class); /** An instance to FLYS.*/ - private FLYS flys; + private final FLYS flys; public FLYSHeader(FLYS flys) { @@ -94,9 +96,11 @@ public void onClick(ClickEvent event) { GWT.log("Clicked 'logout' button."); userService.logoutCurrentUser(new AsyncCallback() { + @Override public void onFailure(Throwable caught) { } + @Override public void onSuccess(Void result) { /* Just reload the page. GGInAFilter is goint to redirect * to the correct login page */ @@ -132,7 +136,8 @@ @Override public void onClick(ClickEvent event) { GWT.log("Clicked 'info' button."); - GWT.log("IMPLEMENT the 'open info panel' function."); + String wikiLink = Config.getInstance().getWikiUrl() + "/Info"; + Window.open(wikiLink, "_blank", null); } }); init();