# HG changeset patch # User Tim Englich # Date 1275904487 0 # Node ID cd9414538f101d599abfd1a123535de310369436 # Parent 10bee74ab91537bc427dac6725ce373a3729d606 Added possibility to switch to FullScreen-Mode of the MapClient. gnv/trunk@1161 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 10bee74ab915 -r cd9414538f10 gnv/ChangeLog --- a/gnv/ChangeLog Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/ChangeLog Mon Jun 07 09:54:47 2010 +0000 @@ -1,3 +1,36 @@ +2010-06-07 Tim Englich + + * src/main/webapp/WEB-INF/config/struts-config.xml: + Added the Action "mapclient" for switching to the FullScreen-Mode of the + MapClient. + + * src/main/webapp/scripts/viewport.jsp: + Integrated the Viewport to render tne Mapclient in FullScreen-Mode. + + * src/main/java/de/intevation/gnv/action/MapClientStandaloneAction.java : + Added Action for handling the businesslogic to switch the Mapclient to the + FullScreen-Mode. + + * src/main/resources/applicationMessages.properties, + src/main/resources/applicationMessages_en.properties: + Added i18n for the Link-labeling for switching to the FullScreen-Mode. + + * src/main/webapp/WEB-INF/jsp/wmsstandalone.jsp: + Added JSP-Page wich will be used to render the gui for the + FullScreen-Mode of the Mapclient. + + * src/main/webapp/WEB-INF/jsp/wmslayout.jsp, + src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp: + Extracted header for the html-page whcih will contain the mapclient so + that it could be used in several pages. + + * src/main/webapp/WEB-INF/jsp/includes/display_map_fullscreen_inc.jsp: + Added JSP-Fragment which contains the gui for the FullScreen-Mode of the + Mapclient. + + * src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp: + Added link for switching to the fullscreenmode + 2010-06-04 Tim Englich * src/main/resources/applicationMessages.properties: diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/java/de/intevation/gnv/action/MapClientStandaloneAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/MapClientStandaloneAction.java Mon Jun 07 09:54:47 2010 +0000 @@ -0,0 +1,38 @@ +/** + * + */ +package de.intevation.gnv.action; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +/** + * @author Tim Englich + * + */ +public class MapClientStandaloneAction extends ArtifactDatabaseActionBase { + + public final static String MAPCLIENTSTANDALONE_KEY = + "de.intevation.gnv.action.MapClientStandaloneAction"; + /** + * Constructor + */ + public MapClientStandaloneAction() { + super(); + } + + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws Exception { + + request.setAttribute(MAPCLIENTSTANDALONE_KEY, true); + return super.execute(mapping, form, request, response); + } + + +} diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/resources/applicationMessages.properties --- a/gnv/src/main/resources/applicationMessages.properties Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages.properties Mon Jun 07 09:54:47 2010 +0000 @@ -129,7 +129,7 @@ # the map client - +gnvview.mapclient.fullscreen = Vollbild gnviewer.mapclient.layercontrol = Layerkontrolle gnviewer.mapclient.layercontrol.baselayer = Hintergrundlayer gnviewer.mapclient.layercontrol.overlay = Generierte Layer diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/resources/applicationMessages_en.properties --- a/gnv/src/main/resources/applicationMessages_en.properties Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/resources/applicationMessages_en.properties Mon Jun 07 09:54:47 2010 +0000 @@ -127,7 +127,7 @@ # the map client - +gnvview.mapclient.fullscreen = Full screen gnviewer.mapclient.layercontrol = Layercontrol gnviewer.mapclient.layercontrol.baselayer = Baselayer gnviewer.mapclient.layercontrol.overlay = Overlay diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/WEB-INF/config/struts-config.xml --- a/gnv/src/main/webapp/WEB-INF/config/struts-config.xml Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/struts-config.xml Mon Jun 07 09:54:47 2010 +0000 @@ -156,6 +156,15 @@ name="selectfis" path="/gnv/selectFis.do"/> + + + + +
+

BSH Generischer Viewer

+
+
+
+
+
+
+
+
\ No newline at end of file diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp --- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp Mon Jun 07 09:54:47 2010 +0000 @@ -1,3 +1,8 @@ +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> +
+ +
+
@@ -5,4 +10,4 @@
-
\ No newline at end of file +
\ No newline at end of file diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp Mon Jun 07 09:54:47 2010 +0000 @@ -0,0 +1,39 @@ +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> +<%@page import="de.intevation.gnv.action.MapClientStandaloneAction"%> +<% +boolean standalone = request.getAttribute(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY) != null; +%> + + + + <bean:message key="gnviewer.app.title"/> + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp --- a/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Mon Jun 07 09:54:47 2010 +0000 @@ -3,48 +3,8 @@ <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> -<% - String serverPath = (String) request.getAttribute("mapserver"); - String mapfilePath = (String) request.getAttribute("mapfile"); - String layerName = (String) request.getAttribute("layer"); - String timeToLive = (String) request.getAttribute("ttl"); - SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); -%> - - - <bean:message key="gnviewer.app.title"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - +
diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/WEB-INF/jsp/wmsstandalone.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/wmsstandalone.jsp Mon Jun 07 09:54:47 2010 +0000 @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff -r 10bee74ab915 -r cd9414538f10 gnv/src/main/webapp/scripts/viewport.jsp --- a/gnv/src/main/webapp/scripts/viewport.jsp Fri Jun 04 12:03:12 2010 +0000 +++ b/gnv/src/main/webapp/scripts/viewport.jsp Mon Jun 07 09:54:47 2010 +0000 @@ -1,5 +1,10 @@ <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> +<%@page import="de.intevation.gnv.action.MapClientStandaloneAction"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> +<% +boolean standalone = request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY) != null && +request.getParameter(MapClientStandaloneAction.MAPCLIENTSTANDALONE_KEY).equals("true"); +%> OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url="; OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>'); Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif"; @@ -10,7 +15,6 @@ * settings inline the code! */ PROJECTION = "EPSG:4326"; -PROJECTIONS = [PROJECTION, 'EPSG:4326'] // Projection used in projection selector MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66); INITIAL_CENTER = new OpenLayers.LonLat(5, 55); @@ -143,8 +147,9 @@ title: '', collapsible: false, split: false, - contentEl: 'cap', - height: 400 + height: 400, + contentEl: 'cap' + }); var capfield = new Ext.form.TextField({ @@ -208,7 +213,7 @@ /*-------------------------------- Feature grid -------------------------------*/ - // create legend panel + // create legend paneclass="headerLineLinksl legendPanel = new GeoExt.LegendPanel({ id: 'legendpanel', dynamic: true, @@ -253,7 +258,7 @@ ] } ); - + <%if (!standalone){%> // The main panel new Ext.Panel({ renderTo: "mapcontainer", @@ -261,5 +266,20 @@ height: 400, items: [mapPanel, mylegend] }); - + <%}else{ %> + // Create GUI + new Ext.Viewport({ + layout: "border", + items: [ + { + region: "north", + contentEl: "title", + cls: 'title', + height: 40 + }, + mylegend, + mapPanel + ] + }); + <%}%> });