changeset 291:b48172dc24ed

Added demo wkt linestrings via xslt and javascript. gnv/trunk@453 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 17 Dec 2009 15:41:26 +0000
parents ca10f0ea153a
children 419e47efaba5
files gnv/ChangeLog gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp
diffstat 3 files changed, 27 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Wed Dec 16 23:10:03 2009 +0000
+++ b/gnv/ChangeLog	Thu Dec 17 15:41:26 2009 +0000
@@ -1,3 +1,9 @@
+2009-12-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/webapp/WEB-INF/config/templates/describe-ui.xsl,
+	src/main/webapp/WEB-INF/jsp/mainlayout.jsp: Added demo wkt linestrings
+	via xslt and javascript.
+
 2009-12-17  Hans Plum <hans@intevation.de>
 
 	Issue 129: Release 0.2: Verbesserung der Übersetzungen
--- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl	Wed Dec 16 23:10:03 2009 +0000
+++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl	Thu Dec 17 15:41:26 2009 +0000
@@ -40,14 +40,19 @@
         <xsl:variable name="inputValue" select="*[local-name() = 'value']"/>
         <xsl:variable name="inputName" select="@ref"/>
         
+        <xsl:if test="$inputName = 'mesh_linestring'">
+            <a href="javascript:copy_demo_wkt_line();"><xsl:text>Beispiel WKT-Linestring einf&#252;gen:</xsl:text></a><br/>
+        </xsl:if>
+
         <xsl:choose>
            <xsl:when test="*[local-name() = 'label']!= ''">
                <xsl:value-of select="*[local-name() = 'label']"/>: 
            </xsl:when>
         </xsl:choose>
+
         <input type="text" id="{$inputName}" name="{$inputName}" value="{$inputValue}" /><br/> 
     </xsl:template>
     
     <xsl:template match="*[local-name() = 'label']">
     </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
--- a/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp	Wed Dec 16 23:10:03 2009 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/mainlayout.jsp	Thu Dec 17 15:41:26 2009 +0000
@@ -15,6 +15,20 @@
         <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">
+            function copy_demo_wkt_line() {
+              document.getElementById('mesh_linestring').value =
+              "LINESTRING (" +
+              "0.4911 56.2489, " +
+              "10.4464 58.1608, " +
+              "12.2321 56.4127, " +
+              "13.1250 54.8832, " +
+              "15.4018 54.5008, " +
+              "19.6875 56.4127, " +
+              "20.6250 59.0349, " +
+              "28.1250 60.2640)";
+            }
+        </script>
     </head>
 
     <body id="gnviewerbody">
@@ -32,4 +46,4 @@
         <jsp:include page="footer.jsp" />
     </div>
     </body>
-</html>
\ No newline at end of file
+</html>

http://dive4elements.wald.intevation.org