svn commit: r751 - trunk/mapbender/http/javascripts
christoph at osgeo.org
christoph at osgeo.org
Thu Aug 10 08:04:12 EDT 2006
Author: christoph
Date: 2006-08-10 12:04:12+0000
New Revision: 751
Modified:
trunk/mapbender/http/javascripts/mod_initWmc.php
trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
trunk/mapbender/http/javascripts/mod_saveWmcKml.php
Log:
minor changes
Modified: trunk/mapbender/http/javascripts/mod_initWmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_initWmc.php?view=diff&rev=751&p1=trunk/mapbender/http/javascripts/mod_initWmc.php&p2=trunk/mapbender/http/javascripts/mod_initWmc.php&r1=750&r2=751
==============================================================================
--- trunk/mapbender/http/javascripts/mod_initWmc.php (original)
+++ trunk/mapbender/http/javascripts/mod_initWmc.php 2006-08-10 12:04:12+0000
@@ -51,11 +51,18 @@
$x = $kml->x;
$y = $kml->y;
$icon = $kml->icon;
- $alt = $kml->title . ", " .$kml->description;
- if (ereg("^.*,[[:space:]]([[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]).*$", $kml->title)) {
- $url = ereg_replace("^.*,[[:space:]]([[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]).*$", "\\1", $kml->title);
+ if ($kml->title) {
+ if ($kml->description) $alt = $kml->title . ", " .$kml->description;
+ else $alt = $kml->title;
}
+ else $alt = $kml->description;
+ if (ereg("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", $kml->title)) {
+ $url = ereg_replace("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", "\\1", $kml->title);
+ if (substr($url, 0, 4) == "www.") {
+ $url = "http://" . $url;
+ }
+ }
}
else {
$js_error .= "alert('Meetingpoint ID id ".$_SESSION['mb_myKml']." is not valid. Default GUI will be loaded instead.');";
@@ -121,4 +128,5 @@
function mod_initWMC(){
mod_initWMC_init();
mb_registerSubFunctions('addFlag()');
+ mb_registerPanSubElement('meeting_pole');
}
Modified: trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php?view=diff&rev=751&p1=trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php&p2=trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php&r1=750&r2=751
==============================================================================
--- trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php (original)
+++ trunk/mapbender/http/javascripts/mod_insertKmlIntoDb.php 2006-08-10 12:04:12+0000
@@ -59,8 +59,17 @@
$title_array = array();
if ($_POST['name']) $title_array[count($title_array)] = $_POST['name'];
if ($_POST['street']) $title_array[count($title_array)] = $_POST['street'];
- if ($_POST['postcode']) $title_array[count($title_array)] = $_POST['postcode'];
- if ($_POST['city']) $title_array[count($title_array)] = $_POST['city'];
+ if ($_POST['postcode']) {
+ if ($_POST['city']) {
+ $title_array[count($title_array)] = $_POST['postcode'] . " " . $_POST['city'];
+ }
+ else {
+ $title_array[count($title_array)] = $_POST['postcode'];
+ }
+ }
+ elseif ($_POST['city']) {
+ $title_array[count($title_array)] = $_POST['city'];
+ }
if ($_POST['website']) $title_array[count($title_array)] = $_POST['website'];
$title = implode(", ", $title_array);
@@ -82,7 +91,7 @@
echo "<script>var title = \"" . $title . "\";alert(\"KML document \" + title + \"has been saved!\")</script>";
}
}
- echo "<a href = 'http://wms1.ccgis.de/mburl/".$kml->kml_id."'>link</a>";
+ echo "Please feel free to add the <a href = 'http://wms1.ccgis.de/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.";
}
?>
Modified: trunk/mapbender/http/javascripts/mod_saveWmcKml.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_saveWmcKml.php?view=diff&rev=751&p1=trunk/mapbender/http/javascripts/mod_saveWmcKml.php&p2=trunk/mapbender/http/javascripts/mod_saveWmcKml.php&r1=750&r2=751
==============================================================================
--- trunk/mapbender/http/javascripts/mod_saveWmcKml.php (original)
+++ trunk/mapbender/http/javascripts/mod_saveWmcKml.php 2006-08-10 12:04:12+0000
@@ -49,6 +49,8 @@
current_password = "<?php echo $_SESSION["mb_user_password"];?>";
current_gui = "<?php echo $gui_id;?>";
+ alert('Please set the meeting point by clicking the map.');
+
var ind = getMapObjIndexByName(mod_savewmc_target);
var el = frames[mod_savewmc_target].document;
More information about the Mapbender_commits
mailing list