diff gnv/src/main/webapp/scripts/viewport.jsp @ 982:cd9414538f10

Added possibility to switch to FullScreen-Mode of the MapClient. gnv/trunk@1161 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 07 Jun 2010 09:54:47 +0000
parents 80a5cde45d12
children 45ea5feb94c0
line wrap: on
line diff
--- 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: '<bean:message key="gnviewer.mapclient.wms.load.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
+        ]
+    });
+    <%}%>
 });

http://dive4elements.wald.intevation.org