[Mapbender-commits] r2937 - branches/beck_dev/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Sep 15 08:41:21 EDT 2008
Author: beck
Date: 2008-09-15 08:41:21 -0400 (Mon, 15 Sep 2008)
New Revision: 2937
Modified:
branches/beck_dev/http/php/mod_wfs_edit.php
Log:
Modified: branches/beck_dev/http/php/mod_wfs_edit.php
===================================================================
--- branches/beck_dev/http/php/mod_wfs_edit.php 2008-09-15 12:25:49 UTC (rev 2936)
+++ branches/beck_dev/http/php/mod_wfs_edit.php 2008-09-15 12:41:21 UTC (rev 2937)
@@ -26,13 +26,48 @@
?>
<style type="text/css">
<!--
- body{
- background-color: #ffffff;
+ 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>
@@ -40,6 +75,31 @@
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>
</head>
@@ -141,7 +201,7 @@
else {
$sql .= "0";
}
- $sql .= "'";
+ $sql .= "'";
$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]);
@@ -229,6 +289,8 @@
echo "<td>" . toImage('edit') . "</td>";
echo "<td>" . toImage('html') . "</td>";
echo "<td>" . toImage('auth') . "</td>";
+ echo "<td>" . toImage('helptext') . "</td>";
+
echo "</tr>";
$cnt = 0;
while($row = db_fetch_array($res)){
@@ -267,6 +329,14 @@
echo "></td>";
echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".$row["f_form_element_html"]."</textarea></td>";
echo "<td><input name='f_auth_varname".$cnt."' type='text' size='8' value='".$row["f_auth_varname"]."'></td>";
+ echo "<td>";
+ echo "<input type=\"button\" value=\"Edit\" onclick=\"showHelptext(".$cnt.");\" />";
+ echo "<div id=\"helptext".$cnt."\" class=\"helptext\">";
+ echo "<strong>Helptext for <em>".$row["element_name"]."</em>:</strong>";
+ echo "<textarea id=\"f_helptext".$cnt."\" name=\"f_help".$cnt."\" cols=\"15\" rows=\"1\">".$row["f_helptext"]."</textarea><br />";
+ echo "<input type=\"button\" value=\"Done\" onclick=\"hideHelptext(".$cnt.");\" />";
+ echo "</div>";
+ echo "</td>";
echo "</tr>";
$cnt++;
}
More information about the Mapbender_commits
mailing list