[Webflysuesk-commits] r64 - in webflysuesk/branches/openlayers-integration: . webflys/src/main/resources webflys/src/main/webapp/pages

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jul 15 17:30:58 CEST 2009


Author: iweinzierl
Date: 2009-07-15 17:30:57 +0200 (Wed, 15 Jul 2009)
New Revision: 64

Modified:
   webflysuesk/branches/openlayers-integration/ChangeLog.txt
   webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources.properties
   webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources_de.properties
   webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/app.jsp
   webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/karte.js
   webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/style.css
Log:
Changed the position of the resultPanel. Now, it behaves as the LayerSwitcher. Further, some string replacements.

Modified: webflysuesk/branches/openlayers-integration/ChangeLog.txt
===================================================================
--- webflysuesk/branches/openlayers-integration/ChangeLog.txt	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/ChangeLog.txt	2009-07-15 15:30:57 UTC (rev 64)
@@ -1,3 +1,17 @@
+2009-07-15  Ingo Weinzierl <ingo.weinzierl at intevation.de>
+
+	* webflys/src/main/resources/MessageResources_de.properties,
+	  webflys/src/main/resources/MessageResources.properties: Changed strings.
+	
+	* webflys/src/main/webapp/pages/karte.js: Changed order of buttons in the
+	  OpenLayer.Control.Panel.
+
+	* webflys/src/main/webapp/pages/main.jsp,
+	  webflys/src/main/webapp/pages/style.css,
+	  webflys/src/main/webapp/pages/app.jsp: Moved the resultPanel into the map,
+	  which made the map bigger. Now, the resultPanel behaves like the 
+	  LayerSwitcher.
+
 2009-07-14  Ingo Weinzierl <ingo.weinzierl at intevation.de>
 
 	* webflys/src/main/webapp/pages/karte.js,

Modified: webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources.properties
===================================================================
--- webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources.properties	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources.properties	2009-07-15 15:30:57 UTC (rev 64)
@@ -126,5 +126,5 @@
 
 # --- wsplgen results
 
-wsplgen.result.title=Old jobs
+wsplgen.result.title=Former jobs
 wsplgen.refresh.button=Refresh job list

Modified: webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources_de.properties
===================================================================
--- webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources_de.properties	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/webflys/src/main/resources/MessageResources_de.properties	2009-07-15 15:30:57 UTC (rev 64)
@@ -133,5 +133,5 @@
 
 # --- wsplgen results ---
 
-wsplgen.result.title=Alte Berechnungen
-wsplgen.refresh.button=Hole alte Berechnungen
+wsplgen.result.title=Fr\u00fchere Berechnungen
+wsplgen.refresh.button=Hole fr\u00fchere Berechnungen

Modified: webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/app.jsp
===================================================================
--- webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/app.jsp	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/app.jsp	2009-07-15 15:30:57 UTC (rev 64)
@@ -86,6 +86,53 @@
                 }
 
             }
+
+            function switchResultPanel() {
+                // the layertree is invisible and placed initially in the div container 
+                // with the id 'place'. When closing the tree, its div container with id
+                // 'tree' is moved into div container with id 'my_junk'.
+                var my_place  = document.getElementById('mapWrapper');
+                var my_div    = document.getElementById('rightPanel');
+                var my_parent = my_div.parentNode;
+
+                //var max = OpenLayers.Util.getElement('OpenLayers_MaxResultPanelDiv');
+                //var min = OpenLayers.Util.getElement('OpenLayers_MinResultPanelDiv');
+                var max = document.getElementById('max');
+                var min = document.getElementById('min');
+
+                // initial case at application startup, layertree positioned in a div
+                // container over the map but NOT visible
+                if (my_div.style.visibility != 'visible') 
+                {
+                    my_div.style.visibility = 'visible';
+
+                    // change the open/close buttons for switching the layertree
+                    max.style.visibility = 'hidden';
+                    min.style.visibility = 'visible';
+                }
+                // layertree is invisible, placed in a div container outside the visible
+                // range of the screen
+                else if (my_parent != my_place)
+                {
+                    my_parent.removeChild(my_div)
+                    my_place.appendChild(my_div);
+
+                    // change the open/close buttons for switching the layertree
+                    max.style.visibility = 'hidden';
+                    min.style.visibility = 'visible';
+                }
+                // layertree is visible, placed in a div container lying on the map
+                else
+                {
+                    var my_junk  = document.getElementById('my_junk');
+                    my_place.removeChild(my_div);
+                    my_junk.appendChild(my_div);
+
+                    // change the open/close buttons for switching the layertree
+                    min.style.visibility = 'hidden';
+                    max.style.visibility = 'visible';
+                }
+            }
             -->
         </script>
     </head>
@@ -110,31 +157,62 @@
             </a>
         </div>
 
-        
+        <%-- webflys parameter panel --%>
         <div id="leftPanel">
             <iframe id="webflys" style="border: 0px; height:100%; width:100%;" src="entrance.jsp"></iframe>
         </div>
 
+        <%-- begin of map with components --%>
         <div id="mapWrapper" class="mapWrapper" style="display: none;"> 
+
+            <%-- map itself --%>
             <div id="map"></div>
-        </div>
 
+            <%-- buttons to turn resultPanel on/off --%>
+            <div id="max" class="OpenLayers_MaxResultPanelDiv" style="visibility: visible;" >
+                <img src="./OpenLayers/img/layer-switcher-maximize.png"
+                    onClick="switchResultPanel();">
+            </div>
+            <div id="min" class="OpenLayers_MinResultPanelDiv" style="visibility: hidden;">
+                <img src="./OpenLayers/img/layer-switcher-minimize.png"
+                    onClick="switchResultPanel();">
+            </div>
+
+            <%-- the panel to show the results --%>
+            <div id="rightPanel" class="rightPanel" style="visibility: hidden;">
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 5px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 3px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 2px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+
+                <div style="background-color: darkblue; opacity: 0.8; padding-left: 10px; padding-top: 8px;">
+                    <input type="button" value="<bean:message key='wsplgen.refresh.button'/>" onClick="resultPanel();" class="button">
+                    <br>
+                    <bean:message key="wsplgen.result.title"/>
+                    <div id="results"></div>
+                </div>
+                
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 2px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 3px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+                <span style="overflow: hidden; background-color: darkblue; display: block; height: 1px; font-size: 1px; margin-left: 5px; margin-right: 0px; border-left-width: 0px; border-right-width: 0px; opacity: 0.8;"></span>
+            </div>
+        </div><%-- end of map (Wrapper) --%>
+
+
         <div style="width: 15px; float: left;">&nbsp;</div>
 
-        <%-- the panel to show the results --%>
-        <div id="rightPanel" style="display: none;">
-            <fieldset id="resultPanel">
-                <input type="button" value="<bean:message key='wsplgen.refresh.button'/>" onClick="resultPanel();" class="button">
-                <legend><bean:message key="wsplgen.result.title"/></legend>
-                <div id="results"></div>
-            </fieldset>
-        </div>
-
+        <%-- div container to lock the window while ajax requests loading --%>
         <div id="loadingWindow" style="visibility: hidden; background-color: grey; z-index: 9999;">
             <img src="./OpenLayers/theme/default/img/loading.gif"
                 style="width: 25px; height: 25px; border: solid 1px black;
                        position: relative; top: 50%; left: 50%;">
         </div>
 
+        <%-- workarround: div container where the resultPanel is moved to when it is turned off --%>
+        <div id="my_junk" style="visibility: hidden; width:400px; height: 600px;
+            position: absolute; left: -1000;">
+        </div>
+
     </body>
 </html:html>

Modified: webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/karte.js
===================================================================
--- webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/karte.js	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/karte.js	2009-07-15 15:30:57 UTC (rev 64)
@@ -8,7 +8,9 @@
 var usk_layer = null;
 
 /** Control panel */
-var panel = null;
+var panel = new OpenLayers.Control.Panel({
+    displayClass: "olControlPanel"
+});
 
 /**
  * Method: createMapForRiver
@@ -35,11 +37,11 @@
                 // create the map
                 createMap(bounds);
 
+                // add Start/End-Feature
+                initInteraktiveStreckenauswahl();
+
                 // add RGD functionality to the map
                 addRGDFeature();
-
-                // add Start/End-Feature
-                initInteraktiveStreckenauswahl();
             });
             decreaseAjaxCounter();
         }
@@ -115,6 +117,23 @@
 
     // zooming to the maximum extent
     map.zoomToExtent(ext, 'true');
+
+    var pan = new OpenLayers.Control.MouseDefaults({ 
+        title: 'Verschieben der Karte',
+        displayClass: 'olControlPan'
+    });
+
+    var zoomIn = new OpenLayers.Control.ZoomBox({
+        title:"Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen",
+        displayClass: 'olControlZoomIn'
+    });
+
+    panel.addControls([
+        pan, zoomIn
+    ]);
+
+    // add the panel to the map
+    map.addControl(panel);
 }
 
 
@@ -143,12 +162,6 @@
         }
     );
 
-    // creating the tool panel
-    panel = new OpenLayers.Control.Panel({
-        displayClass: "olControlPanel"
-    });
-
-
     // defining a button to create pipes
     var pipes = new OpenLayers.Control.DrawFeature(
         wfs, OpenLayers.Handler.Path,
@@ -180,7 +193,6 @@
             storage.addFeatures([feature]);
     };
 
-
     // defining a button to create causeys
     var causeys = new OpenLayers.Control.DrawFeature(
         wfs, OpenLayers.Handler.Path,
@@ -203,23 +215,11 @@
         displayClass: "olControlSaveFeatures"
     });
 
-    var pan = new OpenLayers.Control.MouseDefaults({ 
-        title: 'Verschieben der Karte',
-        displayClass: 'olControlPan'
-    });
-
-    var zoomIn = new OpenLayers.Control.ZoomBox({
-        title:"Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen",
-        displayClass: 'olControlZoomIn'
-    });
-
+    
     // adding the control elements to the panel
     panel.addControls([
-        pan, zoomIn, save, pipes, rills, causeys
+        pipes, rills, causeys, save
     ]);
-
-    // add the panel to the map
-    map.addControl(panel);
 }
 
 

Modified: webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/style.css
===================================================================
--- webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/style.css	2009-07-14 15:45:03 UTC (rev 63)
+++ webflysuesk/branches/openlayers-integration/webflys/src/main/webapp/pages/style.css	2009-07-15 15:30:57 UTC (rev 64)
@@ -3,7 +3,7 @@
    	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
 }
 .mapWrapper {
-    width: 490px;
+    width: 660px;
     height: 591px;
     border: 1px solid #669FD1;
     float: left;
@@ -15,17 +15,41 @@
 	font-size: 8pt;
 	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
 }
-#resultPanel {
-	border: 1px solid #669FD1;
-	width : 150px;
-	font-size: 8pt;
-	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+.OpenLayers_MinResultPanelDiv {
+    width: 18px;
+    height: 18px;
+    position: relative;
+    left: 642px;
+    bottom: 518px;
+    z-index: 1900; 
 }
+.OpenLayers_MaxResultPanelDiv {
+    width: 18px;
+    height: 18px;
+    position: relative;
+    left: 642px;
+    bottom: 500px;
+    z-index: 1900; 
+}
 #leftPanel {
     float: left;
-    height: 100%;
     width:  320px;
 }
+.rightPanel {
+    padding: 0px;
+	font-size: 8pt;
+	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+    font-weight: bold;
+    color: white;
+    float: right;
+    width: 208px;
+    position: relative;
+    left: 0px;
+    bottom: 550px;
+    z-index: 1899;
+    background-color: transparent;
+    opacity: 0.9;
+}
 #table {
 	width: 100%;
 	border: 0px;



More information about the Webflysuesk-commits mailing list