[Mapbender-commits] r5800 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 17 06:47:14 EDT 2010
Author: verenadiewald
Date: 2010-03-17 06:47:12 -0400 (Wed, 17 Mar 2010)
New Revision: 5800
Modified:
trunk/mapbender/http/php/mod_meetingPoint.php
Log:
enable setting meetingPoint_export_url
Modified: trunk/mapbender/http/php/mod_meetingPoint.php
===================================================================
--- trunk/mapbender/http/php/mod_meetingPoint.php 2010-03-17 09:54:54 UTC (rev 5799)
+++ trunk/mapbender/http/php/mod_meetingPoint.php 2010-03-17 10:47:12 UTC (rev 5800)
@@ -43,6 +43,13 @@
}
try{
+ if (meetingPoint_export_url){}
+}
+catch(e){
+ meetingPoint_export_url = '';
+}
+
+try{
if (meetingPoint_export_format){}
}
catch(e){
@@ -154,10 +161,8 @@
function mod_meetingPoint_hide(){
var mapObject = parent.getMapObjByName(mod_meetingPoint_target);
-// $("#" + mapObject.elementName + "_meetingPoint_permanent").css({
-// visibility:"hidden"
-// });
- $("#" + mapObject.elementName + "_meetingPoint_permanent").empty();
+ var map_el = mapObject.getDomElement();
+ $(parent.document.getElementById(mapObject.elementName + "_meetingPoint_permanent")).empty();
}
@@ -181,7 +186,6 @@
if (!map_el.ownerDocument.getElementById(mapObject.elementName + "_meetingPoint_permanent")) {
//create Box Elements
-
var $div = parent.$("<div id='" + mapObject.elementName + "_meetingPoint_permanent'></div>");
$div.css({
position: "absolute",
@@ -223,79 +227,83 @@
?>
function validate(){
-var mycheck = true;
-var checkObj= document.forms[0].mytext.value;
-if(checkObj == '') {
-alert ("<?php echo _mb("Please define a text!") ?>");
-checkObj.focus();
-mycheck=false;
-}
+ var mycheck = true;
+ var checkObj= document.forms[0].mytext.value;
+ if(checkObj == '') {
+ alert ("<?php echo _mb("Please define a text!") ?>");
+ checkObj.focus();
+ mycheck=false;
+ }
-var checkObj= document.forms[0].x.value;
-if(checkObj == '') {
-alert (meetingPoint_please_click);
-mycheck = false;
-}
+ var checkObj= document.forms[0].x.value;
+ if(checkObj == '') {
+ alert (meetingPoint_please_click);
+ mycheck = false;
+ }
-if(mycheck == true){
-my_meetingPoint = document.forms[0].myurl.value + "?";
-my_meetingPoint += "name=" + encodeURIComponent(document.forms[0].myuser.value);
-my_meetingPoint += "&password=" + encodeURIComponent(document.forms[0].mypw.value);
-my_meetingPoint += "&mb_user_myGui=" + encodeURIComponent(document.forms[0].mygui.value);
-
-var ind = parent.getMapObjIndexByName('mapframe1');
-var coord = parent.mb_mapObj[ind].extent.toString().split(",");
-
-my_meetingPoint += "&mb_myBBOX=" + parseFloat(coord[0]) + ",";
- my_meetingPoint += parseFloat(coord[1]) + ",";
- my_meetingPoint += parseFloat(coord[2]) + ",";
- my_meetingPoint += parseFloat(coord[3]) ;
-
-my_meetingPoint += "&mb_myPOI=";
-
-var splitext = document.forms[0].mytext.value;
-document.forms[0].mytext.value = splitext.substring(0, meetingPoint_max_characters);
-
-
-my_meetingPoint += encodeURIComponent(document.forms[0].mytext.value);
-
-
-my_meetingPoint += "___" + document.forms[0].x.value + "___";
-my_meetingPoint += document.forms[0].y.value;
-
-if(meetingPoint_export_format == 'email'){
- createEmail(my_meetingPoint,meetingPoint_export_subject);
- }else{
- prompt(meetingPoint_export_subject,my_meetingPoint);
+ if(mycheck == true){
+ if(meetingPoint_export_url != "") {
+ my_meetingPoint = meetingPoint_export_url + "?";
+ }
+ else {
+ my_meetingPoint = document.forms[0].myurl.value + "?";
+ }
+ my_meetingPoint += "name=" + encodeURIComponent(document.forms[0].myuser.value);
+ my_meetingPoint += "&password=" + encodeURIComponent(document.forms[0].mypw.value);
+ my_meetingPoint += "&mb_user_myGui=" + encodeURIComponent(document.forms[0].mygui.value);
+
+ var ind = parent.getMapObjIndexByName('mapframe1');
+ var coord = parent.mb_mapObj[ind].extent.toString().split(",");
+
+ my_meetingPoint += "&mb_myBBOX=" + parseFloat(coord[0]) + ",";
+ my_meetingPoint += parseFloat(coord[1]) + ",";
+ my_meetingPoint += parseFloat(coord[2]) + ",";
+ my_meetingPoint += parseFloat(coord[3]) ;
+
+ my_meetingPoint += "&mb_myPOI=";
+
+ var splitext = document.forms[0].mytext.value;
+ document.forms[0].mytext.value = splitext.substring(0, meetingPoint_max_characters);
+
+ my_meetingPoint += encodeURIComponent(document.forms[0].mytext.value);
+
+ my_meetingPoint += "___" + document.forms[0].x.value + "___";
+ my_meetingPoint += document.forms[0].y.value;
+
+ if(meetingPoint_export_format == 'email') {
+ createEmail(my_meetingPoint,meetingPoint_export_subject);
+ }
+ else {
+ prompt(meetingPoint_export_subject,my_meetingPoint);
+ }
}
}
-}
function emptyfields(){
-document.forms[0].mytext.value ='';
-document.forms[0].x.value ='';
-document.forms[0].y.value = '';
-mod_meetingPoint_hide();
+ document.forms[0].mytext.value ='';
+ document.forms[0].x.value ='';
+ document.forms[0].y.value = '';
+ mod_meetingPoint_hide();
}
function createEmail (url,subject) {
-var email = "mailto:"
-email += "";
-email += "?subject=";
-email += subject;
-email += "&body=";
-email += escape(url);
+ var email = "mailto:"
+ email += "";
+ email += "?subject=";
+ email += subject;
+ email += "&body=";
+ email += escape(url);
-var win = window.open(email, 'email', 'top=120,left=120');
-win.close();
+ var win = window.open(email, 'email', 'top=120,left=120');
+ win.close();
}
function goBack(where){
-document.location.href=where;
+ document.location.href=where;
}
function init(){
-parent.mb_regButton_frame("init_mod_meetingPoint","meetingPoint",null);
+ parent.mb_regButton_frame("init_mod_meetingPoint","meetingPoint",null);
}
-->
More information about the Mapbender_commits
mailing list