Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/RiverInfoPanel.java @ 6418:c702bac7f72e
Make wiki url configurable in gwt client (flys/#1197). It's probably better to retrieve
that config from the server but this solution is faster ;) (ServerInfoService wip)
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 26 Jun 2013 10:39:10 +0200 |
parents | 24be0cc1c67c |
children | 7106f9b75004 |
comparison
equal
deleted
inserted
replaced
6417:14b5674e57a4 | 6418:c702bac7f72e |
---|---|
6 * documentation coming with Dive4Elements River for details. | 6 * documentation coming with Dive4Elements River for details. |
7 */ | 7 */ |
8 | 8 |
9 package org.dive4elements.river.client.client.ui; | 9 package org.dive4elements.river.client.client.ui; |
10 | 10 |
11 import java.util.Iterator; | |
12 | |
13 import org.dive4elements.river.client.client.FLYS; | |
14 import org.dive4elements.river.client.client.FLYSConstants; | |
15 import org.dive4elements.river.client.shared.model.RiverInfo; | |
16 | |
17 import com.google.gwt.core.client.GWT; | 11 import com.google.gwt.core.client.GWT; |
18 import com.google.gwt.i18n.client.NumberFormat; | 12 import com.google.gwt.i18n.client.NumberFormat; |
19 import com.google.gwt.user.client.ui.HorizontalPanel; | 13 import com.google.gwt.user.client.ui.HorizontalPanel; |
20 import com.google.gwt.user.client.ui.Label; | 14 import com.google.gwt.user.client.ui.Label; |
21 import com.google.gwt.user.client.ui.Widget; | 15 import com.google.gwt.user.client.ui.Widget; |
22 import com.smartgwt.client.widgets.form.DynamicForm; | 16 import com.smartgwt.client.widgets.form.DynamicForm; |
23 import com.smartgwt.client.widgets.form.fields.LinkItem; | 17 import com.smartgwt.client.widgets.form.fields.LinkItem; |
18 | |
19 import java.util.Iterator; | |
20 | |
21 import org.dive4elements.river.client.client.Config; | |
22 import org.dive4elements.river.client.client.FLYS; | |
23 import org.dive4elements.river.client.client.FLYSConstants; | |
24 import org.dive4elements.river.client.shared.model.RiverInfo; | |
24 | 25 |
25 /** | 26 /** |
26 * Panel to display information about a river. | 27 * Panel to display information about a river. |
27 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> | 28 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> |
28 */ | 29 */ |
95 | 96 |
96 Long number = riverinfo.getOfficialNumber(); | 97 Long number = riverinfo.getOfficialNumber(); |
97 String url = number != null ? | 98 String url = number != null ? |
98 MSG.gauge_river_url() + number : | 99 MSG.gauge_river_url() + number : |
99 MSG.gauge_river_url(); | 100 MSG.gauge_river_url(); |
100 DynamicForm infoLink = WikiLinks.linkHTML(this.flys, url, | 101 String wikiBaseUrl = Config.getInstance().getWikiUrl(); |
102 DynamicForm infoLink = WikiLinks.linkHTML(this.flys, wikiBaseUrl + url, | |
101 MSG.gauge_river_info_link()); | 103 MSG.gauge_river_info_link()); |
102 infoLink.setTop(5); | 104 infoLink.setTop(5); |
103 LinkItem item = (LinkItem)infoLink.getField("saml"); | 105 LinkItem item = (LinkItem)infoLink.getField("saml"); |
104 item.setTextBoxStyle("font-size: large;"); | 106 item.setTextBoxStyle("font-size: large;"); |
105 add(infoLink); | 107 add(infoLink); |