diff gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp @ 697:d2582f75b144

Improved design and added new wms layers as background for 'Horizontalschnitte'. gnv/trunk@928 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 14 Apr 2010 16:05:32 +0000
parents 883b366e3b15
children 5f29bfeb61bd
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp	Tue Apr 13 17:55:32 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp	Wed Apr 14 16:05:32 2010 +0000
@@ -15,7 +15,9 @@
         <meta name="robots" content="noindex"/>
         <link href="styles/default.css" rel="stylesheet" type="text/css"/>
         <script type="text/javascript" src="scripts/gnviewer.js"></script>
+        <script type="text/javascript" src="scripts/jquery-1.4.2.min.js"></script>
         <script type="text/javascript">
+            jQuery.noConflict();
             function copy_demo_wkt_line() {
               document.getElementById('mesh_linestring').value =
               "LINESTRING (" +
@@ -51,21 +53,32 @@
                 }
             }
 
-            function toggle(element) {
-                var ele = document.getElementById(element);
-                console.log("Element: " + ele.style.visibility);
-                var vis = ele.style.visibility;
-                if (vis != "visible") {
-                    ele.style.visibility = "visible";
-                }
-                else {
-                    ele.style.visibility = "hidden";
-                }
-            }
+function toggle(element) {
+    var ele = document.getElementById(element);
+    var vis = ele.style.visibility;
+    if (vis != "visible") {
+        ele.style.visibility = "visible";
+    }
+    else {
+        ele.style.visibility = "hidden";
+    }
+}
+
+/**
+ * Calculate the content's height (content = window -header - footer).
+ */
+function initHeight() {
+    var winHeight = window.innerHeight;
+    var headerHeight = jQuery("headerElement").innerHeight();
+    var footerHeight = jQuery("footerElement").innerHeight();
+    var height = winHeight - headerHeight - footerHeight;
+    jQuery("contentElement").innerHeight(height);
+    jQuery(window).resize(initHeight);
+}
         </script>
     </head>
 
-    <body id="gnviewerbody">
+    <body id="gnviewerbody" onload="initHeight();">
     <div id="overlay"></div>
     <div style="width:100%;left:0;top:0;width:100%;height:100%;position:absolute">
         <div id="overlayContent">
@@ -83,7 +96,7 @@
         <div id="headerElement">
             <jsp:include page="header.jsp" />
         </div>
-        <div id="contentElement" class="contentElement bgblue2">
+        <div id="contentElement" class="contentElement">
             <jsp:include page="index.jsp" />
          </div>
          <br>

http://dive4elements.wald.intevation.org