changeset 6437:0341504e9deb

Info-Button now leads to $WIKI_URL/Info. Ticket for authentication not implemented yet.
author Christian Lins <christian.lins@intevation.de>
date Wed, 26 Jun 2013 14:42:16 +0200
parents 402e9eb2922d
children b9c5bb510b39
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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 <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 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<Void>() {
+                    @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();

http://dive4elements.wald.intevation.org