[Mapbender-commits] r2939 - branches/beck_dev/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 16 03:25:51 EDT 2008


Author: beck
Date: 2008-09-16 03:25:50 -0400 (Tue, 16 Sep 2008)
New Revision: 2939

Modified:
   branches/beck_dev/http/php/mod_wfs_conf.php
   branches/beck_dev/http/php/mod_wfs_edit.php
Log:


Modified: branches/beck_dev/http/php/mod_wfs_conf.php
===================================================================
--- branches/beck_dev/http/php/mod_wfs_conf.php	2008-09-15 14:26:15 UTC (rev 2938)
+++ branches/beck_dev/http/php/mod_wfs_conf.php	2008-09-16 07:25:50 UTC (rev 2939)
@@ -43,7 +43,7 @@
 </style>
 
 <title>wfs_conf</title>
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript">
 function selectWFS(){
 	if(document.forms[0].featuretype){
 		if(document.forms[0].featuretype.length){
@@ -60,8 +60,75 @@
 function validate(){
 	return true;
 }
+
+function showHelptext(rowId) {
+	hideHelptext();
+	document.getElementById('helptext' + rowId).style.visibility               = 'visible';
+	document.getElementById('helptext' + rowId).style.display                  = 'block';
+	document.getElementById('helptext' + rowId).parentNode.firstChild.disabled = true;
+}
+
+function hideHelptext(rowId) {
+	if(rowId) {
+		document.getElementById('helptext' + rowId).style.visibility               = 'hidden';
+		document.getElementById('helptext' + rowId).style.display                  = 'none';
+		document.getElementById('helptext' + rowId).parentNode.firstChild.disabled = false;
+	}
+
+	var helptext = document.getElementsByTagName('div');
+	
+	for(var i = 0; i < helptext.length; i++) {
+		if(helptext[i].className === 'helptext') {
+			helptext[i].style.visibility               = 'hidden';
+			helptext[i].style.display                  = 'none';
+			helptext[i].parentNode.firstChild.disabled = false;
+		}
+	}
+}
 </script>
+<style type="text/css">
+<!--
+body {
+	background-color: #ffffff;
+	font-family: Arial, Helvetica, sans-serif;
+	font-size : 12px;
+	color: #808080
+}
 
+div.helptext {
+	visibility: hidden;
+	display: none;
+	position: absolute;
+	margin-top: -200px;
+	margin-left: -275px;
+	padding: 0 5px;
+	color: #000;
+	background-color: #CCC;
+	border: 1px solid #000;
+}
+
+div.helptext strong {
+	display: block;
+	margin: 0 -5px 5px -5px;
+	padding: 2px 5px;
+	font-weight: normal;
+	color: #FFF;
+	background-color: #666;
+}
+
+div.helptext p {
+	width: 250px;
+	height: 150px;
+	margin: 0;
+	background-color: #FFF;
+}
+
+div.helptext input {
+	display: block;
+	margin: 5px auto;
+}
+-->
+</style>
 </head>
 <body>
 <br>
@@ -275,6 +342,7 @@
                 echo "<td>" . toImage('edit') . "</td>";
                 echo "<td>" . toImage('html') . "</td>";
                 echo "<td>" . toImage('auth') . "</td>";
+                echo "<td>" . toImage('helptext') . "</td>";
         echo "</tr>";
 
         for($i=0; $i<count($aWFS->elements->element_id); $i++){
@@ -295,7 +363,22 @@
                 echo "<td><input name='f_edit".$i."' type='checkbox'></td>";
                 echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
                 echo "<td><input name='f_auth_varname".$i."' type='text' size='8'></td>";
-                echo "</tr>";
+		echo "<td>";
+		
+		if(empty($row["f_helptext"])) {
+			echo "<input type=\"button\" value=\"Show\" disabled=\"disabled\" />";
+		}
+		else {
+			echo "<input type=\"button\" value=\"Show\" onclick=\"showHelptext(".$i.");\" />";
+			echo "<div id=\"helptext".$i."\" class=\"helptext\">";
+			echo "<strong>".$aWFS->elements->element_name[$i].":</strong>";
+			echo "<p id=\"f_helptext".$i."\">".nl2br(stripslashes($row["f_helptext"]))."</p>";
+			echo "<input type=\"button\" value=\"Hide\" onclick=\"hideHelptext(".$i.");\" />";
+			echo "</div>";
+		}
+		echo "</td>";
+                
+		echo "</tr>";
         }
         echo "</table>";
         echo "<input type='hidden' name='num' value='".$i."'>";

Modified: branches/beck_dev/http/php/mod_wfs_edit.php
===================================================================
--- branches/beck_dev/http/php/mod_wfs_edit.php	2008-09-15 14:26:15 UTC (rev 2938)
+++ branches/beck_dev/http/php/mod_wfs_edit.php	2008-09-16 07:25:50 UTC (rev 2939)
@@ -24,54 +24,8 @@
 <?php
 echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
 ?>
-<style type="text/css">
-  	<!--
-  	body {
-		background-color: #ffffff;
-  		font-family: Arial, Helvetica, sans-serif;
-  		font-size : 12px;
-  		color: #808080
-  	}
-  	
-	div.helptext {
-		visibility: hidden;
-		display: none;
-		position: absolute;
-		margin-top: -200px;
-		margin-left: -275px;
-		padding: 0 5px;
-		color: #000;
-		background-color: #CCC;
-		border: 1px solid #000;
-	}
-	
-	div.helptext br {
-		visibility: hidden;
-		display: none;
-	}
-	
-	div.helptext strong {
-		display: block;
-		margin: 0 -5px 5px -5px;
-		padding: 2px 5px;
-		font-weight: normal;
-		color: #FFF;
-		background-color: #666;
-	}
-	
-	div.helptext textarea {
-		width: 250px;
-		height: 150px;
-	}
-	
-	div.helptext input {
-		display: block;
-		margin: 5px auto;
-	}
-  	-->
-</style>
 <title>wfs_edit</title>
-<script language="JavaScript" type="text/javascript">
+<script type="text/javascript">
 function validate(){	
 	return true;
 }
@@ -101,7 +55,52 @@
 	}
 }
 </script>
+<style type="text/css">
+<!--
+body {
+	background-color: #ffffff;
+	font-family: Arial, Helvetica, sans-serif;
+	font-size : 12px;
+	color: #808080
+}
 
+div.helptext {
+	visibility: hidden;
+	display: none;
+	position: absolute;
+	margin-top: -200px;
+	margin-left: -275px;
+	padding: 0 5px;
+	color: #000;
+	background-color: #CCC;
+	border: 1px solid #000;
+}
+
+div.helptext br {
+	visibility: hidden;
+	display: none;
+}
+
+div.helptext strong {
+	display: block;
+	margin: 0 -5px 5px -5px;
+	padding: 2px 5px;
+	font-weight: normal;
+	color: #FFF;
+	background-color: #666;
+}
+
+div.helptext textarea {
+	width: 250px;
+	height: 150px;
+}
+
+div.helptext input {
+	display: block;
+	margin: 5px auto;
+}
+-->
+</style>
 </head>
 <body>
 <br>
@@ -202,10 +201,10 @@
                 	$sql .= "0";
                 }
 		$sql .= "'";
-				$sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
+		$sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
 
-				$v = array($_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
-				$t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
+		$v = array($_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
+		$t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
                 $res = db_prep_query($sql, $v, $t);
         }
 }



More information about the Mapbender_commits mailing list