[PATCH 1 of 3] (issue1777) Hide logout button if it is configured
Wald Commits
scm-commit at wald.intevation.org
Tue Dec 16 14:16:28 CET 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1418730466 -3600
# Node ID 9f3ffb218bc0de8b2e9c418f0dfcd598100523b9
# Parent 7f63ad20d4f0ec590accf9d2056555b514409995
(issue1777) Hide logout button if it is configured.
diff -r 7f63ad20d4f0 -r 9f3ffb218bc0 gwt-client/src/main/java/org/dive4elements/river/client/client/Config.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/Config.java Tue Dec 16 13:29:38 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/Config.java Tue Dec 16 12:47:46 2014 +0100
@@ -103,6 +103,14 @@
return LocaleInfo.getCurrentLocale().getLocaleName();
}
+ public boolean getHideLogout() {
+ Node hide_logout = config.getElementsByTagName("hide-logout").item(0);
+ if (hide_logout == null) {
+ return false;
+ }
+ String value = hide_logout.getFirstChild().getNodeValue();
+ return value.toLowerCase().equals("true");
+ }
/**
* Returns the integer configured at
diff -r 7f63ad20d4f0 -r 9f3ffb218bc0 gwt-client/src/main/java/org/dive4elements/river/client/client/config.xml
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/config.xml Tue Dec 16 13:29:38 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/config.xml Tue Dec 16 12:47:46 2014 +0100
@@ -1,6 +1,7 @@
<config>
<server>http://localhost:8181</server>
-
+ <!-- set hide-logout to true to hide the logout button -->
+ <!--<hide-logout>true</hide-logout>-->
<projectlist>
<!-- The interval to update the user's projects (in ms) -->
<update-interval>300000</update-interval>
diff -r 7f63ad20d4f0 -r 9f3ffb218bc0 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 Tue Dec 16 13:29:38 2014 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/FLYSHeader.java Tue Dec 16 12:47:46 2014 +0100
@@ -218,7 +218,9 @@
}
right.addMember(userText);
- right.addMember(logout);
+ if (!Config.getInstance().getHideLogout()) {
+ right.addMember(logout);
+ }
right.addMember(language);
right.addMember(info);
right.addMember(bfg);
More information about the Dive4Elements-commits
mailing list