[Mapbender-commits] r7678 - in branches/kmq_dev: . http/extensions http/javascripts http/php http/plugins http/print http/print/img

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Mar 3 05:31:44 EST 2011


Author: kmq
Date: 2011-03-03 02:31:44 -0800 (Thu, 03 Mar 2011)
New Revision: 7678

Added:
   branches/kmq_dev/http/print/A2_landscape_template.json
   branches/kmq_dev/http/print/A2_landscape_template.odg
   branches/kmq_dev/http/print/A2_landscape_template.pdf
   branches/kmq_dev/http/print/img/northarrow_simple.png
Modified:
   branches/kmq_dev/
   branches/kmq_dev/http/extensions/jqjson.min.js
   branches/kmq_dev/http/javascripts/mod_sandclock.js
   branches/kmq_dev/http/javascripts/mod_wfs_SpatialRequest.php
   branches/kmq_dev/http/php/mod_showMetadata.php
   branches/kmq_dev/http/plugins/mb_metadata_server.php
   branches/kmq_dev/http/plugins/mb_metadata_wfs_server.php
   branches/kmq_dev/http/print/mapbender_template.json
Log:
Merging r7670 through r7677 from trunk


Property changes on: branches/kmq_dev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/kmq_dev:4021-4487
   + /branches/kmq_dev:4021-4487
/trunk/mapbender:7670-7677


Property changes on: branches/kmq_dev/http/extensions/jqjson.min.js
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/mapbender/http/extensions/jqjson.min.js:7670-7677


Property changes on: branches/kmq_dev/http/javascripts/mod_sandclock.js
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/mapbender/http/javascripts/mod_sandclock.js:7670-7677

Modified: branches/kmq_dev/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- branches/kmq_dev/http/javascripts/mod_wfs_SpatialRequest.php	2011-03-03 10:08:15 UTC (rev 7677)
+++ branches/kmq_dev/http/javascripts/mod_wfs_SpatialRequest.php	2011-03-03 10:31:44 UTC (rev 7678)
@@ -402,7 +402,7 @@
 			var filter = "<ogc:Filter>";
 
 			var ftName = wfs_config[js_wfs_conf_id[i]]['featuretype_name'];
-			var pattern = /:[a-zA-Z_]+/;
+			var pattern = /:[0-9a-zA-Z_]+/;
 			var ftns = "";
 			if (ftName.match(pattern)) {
 				ftns = ftName.replace(pattern, ":");
@@ -454,7 +454,7 @@
 			var filter = "<ogc:Filter>";
 
 			var ftName = wfs_config[js_wfs_conf_id[i]]['featuretype_name'];
-			var pattern = /:[a-zA-Z_]+/;
+			var pattern = /:[0-9a-zA-Z_]+/;
 			var ftns = "";
 			if (ftName.match(pattern)) {
 				ftns = ftName.replace(pattern, ":");
@@ -527,7 +527,7 @@
 // The coordinates come from the current client (?)
 //			var srs = wfs_config[js_wfs_conf_id[i]]['featuretype_srs'];
 			var ftName = wfs_config[js_wfs_conf_id[i]]['featuretype_name'];
-			var pattern = /:[a-zA-Z_]+/;
+			var pattern = /:[0-9a-zA-Z_]+/;
 			var ftns = "";
 			if (ftName.match(pattern)) {
 				ftns = ftName.replace(pattern, ":");

Modified: branches/kmq_dev/http/php/mod_showMetadata.php
===================================================================
--- branches/kmq_dev/http/php/mod_showMetadata.php	2011-03-03 10:08:15 UTC (rev 7677)
+++ branches/kmq_dev/http/php/mod_showMetadata.php	2011-03-03 10:31:44 UTC (rev 7678)
@@ -457,16 +457,16 @@
 if (!isset($resourceMetadata['fkey_mb_group_id']) or isnull($resourceMetadata['fkey_mb_group_id'])){
 	$e = new mb_notice("mod_showMetadata: fkey_mb_group_id not found!");
 	//Get information about owning user of the relation mb_user_mb_group - alternatively the defined fkey_mb_group_id from the service must be used!
-	$sqlDep = "SELECT mb_group_name as metdatapointofcontactorgname, mb_group_title as metdatapointofcontactorgtitle, mb_group_id, mb_group_logo_path  as metdatapointofcontactorglogo, mb_group_address as metdatapointofcontactorgaddress, mb_group_email as metdatapointofcontactorgemail, mb_group_postcode as metdatapointofcontactorgpostcode, mb_group_city as metdatapointofcontactorgcity, mb_group_voicetelephone as metdatapointofcontactorgtelephone, mb_group_facsimiletelephone as metdatapointofcontactorgfax FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1  AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND b.mb_user_department = a.mb_group_description LIMIT 1";
+	$sqlDep = "SELECT mb_group_name as metadatapointofcontactorgname, mb_group_title as metadatapointofcontactorgtitle, mb_group_id, mb_group_logo_path  as metadatapointofcontactorglogo, mb_group_address as metadatapointofcontactorgaddress, mb_group_email as metadatapointofcontactorgemail, mb_group_postcode as metadatapointofcontactorgpostcode, mb_group_city as metadatapointofcontactorgcity, mb_group_voicetelephone as metadatapointofcontactorgtelephone, mb_group_facsimiletelephone as metadatapointofcontactorgfax FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1  AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND c.mb_user_mb_group_type=1 LIMIT 1";
 	$vDep = array($resourceMetadata['owner']);
 	$tDep = array('i');
 	$resDep = db_prep_query($sqlDep, $vDep, $tDep);
 	$metadataContactGroup = db_fetch_array($resDep);
 	$e = new mb_notice("mod_showMetadata: mb_group_id: ".$metadataContactGroup['mb_group_id']);
-	$e = new mb_notice("mod_showMetadata: mb_group_logo_path: ".$metadataContactGroup['metdatapointofcontactorglogo']);
+	$e = new mb_notice("mod_showMetadata: mb_group_logo_path: ".$metadataContactGroup['metadatapointofcontactorglogo']);
 } else {
 	$e = new mb_notice("mod_showMetadata: fkey_mb_group_id found!");
-	$sqlDep = "SELECT mb_group_name as metdatapointofcontactorgname, mb_group_title as metdatapointofcontactorgtitle, mb_group_id, mb_group_logo_path  as metdatapointofcontactorglogo, mb_group_address as metdatapointofcontactorgaddress, mb_group_email as metdatapointofcontactorgemail, mb_group_postcode as metdatapointofcontactorgpostcode, mb_group_city as metdatapointofcontactorgcity, mb_group_voicetelephone as metdatapointofcontactorgtelephone, mb_group_facsimiletelephone as metdatapointofcontactorgfax FROM mb_group WHERE mb_group_id = $1 LIMIT 1";
+	$sqlDep = "SELECT mb_group_name as metadatapointofcontactorgname, mb_group_title as metadatapointofcontactorgtitle, mb_group_id, mb_group_logo_path  as metadatapointofcontactorglogo, mb_group_address as metadatapointofcontactorgaddress, mb_group_email as metadatapointofcontactorgemail, mb_group_postcode as metadatapointofcontactorgpostcode, mb_group_city as metadatapointofcontactorgcity, mb_group_voicetelephone as metadatapointofcontactorgtelephone, mb_group_facsimiletelephone as metadatapointofcontactorgfax FROM mb_group WHERE mb_group_id = $1 LIMIT 1";
 	$vDep = array($resourceMetadata['fkey_mb_group_id']);
 	$tDep = array('i');
 	$resDep = db_prep_query($sqlDep, $vDep, $tDep);
@@ -572,8 +572,8 @@
 	$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
 
 
-/*if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
-	$html .= "<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."'  height='30'>";
+/*if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+	$html .= "<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."'  height='30'>";
 }
 //TODO use right name
 $html .= displayText($resourceMetadata['contactorganization']);
@@ -692,8 +692,8 @@
 
 
 
-if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
-	$html .= $t_a.$translation['contactOrganization'].$t_b."<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."'  height='30'>";
+if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+	$html .= $t_a.$translation['contactOrganization'].$t_b."<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."'  height='30'>";
 }
 $html .= displayText($metadataContactGroup['metadatacontactorganization']).$t_c;
 if ($resourceMetadata['contentabstract'] != '') {
@@ -868,13 +868,13 @@
 $html .= '<h4>'.$translation['metadataProvider'].'</h4>';
 
 $html .= $tableBegin;
-if ($metadataContactGroup['metdatapointofcontactorglogo'] != '') {
-	$html .= $t_a.$translation['logo'].$t_b."<img src='".$metadataContactGroup['metdatapointofcontactorglogo']."'  height='30'>".$t_c;
+if ($metadataContactGroup['metadatapointofcontactorglogo'] != '') {
+	$html .= $t_a.$translation['logo'].$t_b."<img src='".$metadataContactGroup['metadatapointofcontactorglogo']."'  height='30'>".$t_c;
 }
-$html .= $t_a.$translation['contactOrganization'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgtitle']).$t_c;
-$html .= $t_a.$translation['contactAddress'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgaddress']).$t_c;
-$html .= $t_a.$translation['city'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgpostcode'].' '.$metadataContactGroup['metdatapointofcontactorgcity']).$t_c;
-$html .= $t_a.$translation['email'].$t_b.displayText($metadataContactGroup['metdatapointofcontactorgemail']).$t_c;
+$html .= $t_a.$translation['contactOrganization'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgtitle']).$t_c;
+$html .= $t_a.$translation['contactAddress'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgaddress']).$t_c;
+$html .= $t_a.$translation['city'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgpostcode'].' '.$metadataContactGroup['metadatapointofcontactorgcity']).$t_c;
+$html .= $t_a.$translation['email'].$t_b.displayText($metadataContactGroup['metadatapointofcontactorgemail']).$t_c;
 $html .= $tableEnd;
 
 $html .= '<h4>'.$translation['serviceProvider'].'</h4>';

Modified: branches/kmq_dev/http/plugins/mb_metadata_server.php
===================================================================
--- branches/kmq_dev/http/plugins/mb_metadata_server.php	2011-03-03 10:08:15 UTC (rev 7677)
+++ branches/kmq_dev/http/plugins/mb_metadata_server.php	2011-03-03 10:31:44 UTC (rev 7678)
@@ -16,9 +16,7 @@
 function getWms ($wmsId = null) {
 	$user = new User(Mapbender::session()->get("mb_user_id"));
 	$wmsIdArray = $user->getOwnedWms();
-	if (!is_array($wmsIdArray) || count($wmsIdArray) === 0) {
-		abort(_mb("No metadata sets available."));
-	}
+
 	if (!is_null($wmsId) && !in_array($wmsId, $wmsIdArray)) {
 		abort(_mb("You are not allowed to access this WMS."));
 	}

Modified: branches/kmq_dev/http/plugins/mb_metadata_wfs_server.php
===================================================================
--- branches/kmq_dev/http/plugins/mb_metadata_wfs_server.php	2011-03-03 10:08:15 UTC (rev 7677)
+++ branches/kmq_dev/http/plugins/mb_metadata_wfs_server.php	2011-03-03 10:31:44 UTC (rev 7678)
@@ -17,9 +17,7 @@
 function getWfs ($wfsId = null) {
 	$user = new User(Mapbender::session()->get("mb_user_id"));
 	$wfsIdArray = $user->getOwnedWfs();
-	if (!is_array($wfsIdArray) || count($wfsIdArray) === 0) {
-		abort(_mb("No metadata sets available."));
-	}
+
 	if (!is_null($wfsId) && !in_array($wfsId, $wfsIdArray)) {
 		abort(_mb("You are not allowed to access this WFS."));
 	}

Copied: branches/kmq_dev/http/print/A2_landscape_template.json (from rev 7677, trunk/mapbender/http/print/A2_landscape_template.json)
===================================================================
--- branches/kmq_dev/http/print/A2_landscape_template.json	                        (rev 0)
+++ branches/kmq_dev/http/print/A2_landscape_template.json	2011-03-03 10:31:44 UTC (rev 7678)
@@ -0,0 +1,160 @@
+{
+    "type" : "templatePDF",
+    "orientation" : "L",
+    "units" : "mm",
+    "format" : "a2",
+    "controls" : [
+    	{
+    		"id" : "title",
+    		"label" : "Titel",
+    		"type" : "text",
+    		"size" : 20,
+    		"pageElementsLink" : {
+    			"titel" : "value"
+    		}
+    	},
+    	{
+    		"id" : "dpi",
+    		"label" : "DPI",
+    		"type" : "select",
+    		"size" : 20,
+    		"pageElementsLink" : {
+    			"karte" : "res_dpi"
+    		},
+    		"options" : [
+    			{
+    			"value" : "72",
+    			"label" : "normal (72 dpi)"
+    			},{
+    			"value" : "288",
+    			"label" : "hoch (288 dpi)"
+    			}
+    		]
+    	},
+    	{
+    		"id" : "comment1",
+    		"label" : "Kommentar 1 (30 Zeichen)",
+    		"type" : "textarea",
+    		"size" : 5,
+    		"pageElementsLink" : {
+    			"kommentar1" : "value"
+    		}
+    	},
+    	{
+    		"id" : "comment2",
+    		"label" : "Kommentar 2 (30 Zeichen)",
+    		"type" : "textarea",
+    		"size" : 5,
+    		"pageElementsLink" : {
+    			"kommentar2" : "value"
+    		}
+    	},
+    	{
+    		"id" : "angle",
+    		"label" : "Winkel",
+    		"type" : "text",
+    		"pageElementsLink" : {
+    			"nordpfeil" : "angle",
+    			"karte" : "angle",
+    			"minikarte" : "angle"
+    		}
+    	},
+    	{
+    		"id" : "coordinates",
+    		"type" : "hidden"
+    	},
+    	{
+    		"id" : "scale",
+    		"label" : "Maßstab",
+    		"type" : "text",
+    		"pageElementsLink" : {
+    			"scale" : "value"
+    		}
+    	}
+    ],
+    "pages" : [
+    	{
+    	 "tpl" : "A2_landscape_template.pdf",
+    	 "useTplPage" : 1,
+    	 "elements" : {
+	    	 "karte" : {
+    			"type" : "map",
+    			"res_dpi" : 72,
+    			"x_ul" : 22.2,
+	    		"y_ul" : 15.2,
+	    		"width" : 461.6,
+    			"height" : 384.6,
+    			"coords" : 1,
+    			"coords_font_family" : "Arial",
+    			"coords_font_size" : 7
+	   			},
+	   		"minikarte" : {
+    			"type" : "overview",
+    			"res_dpi" : 72,
+    			"x_ul" : 491,
+	    		"y_ul" : 252,
+	    		"width" : 86,
+    			"height" : 86
+	   			},
+	   		"titel" : {
+    			"type" : "text",
+    			"x_ul" : 523.7,
+	    		"y_ul" : 373,
+	    		"font_family" : "Arial",
+	    		"font_size" : 14
+	   			},
+	   		"scale" : {
+    			"type" : "text",
+    			"x_ul" : 506,
+	    		"y_ul" : 364.7,
+	    		"font_family" : "Arial",
+	    		"font_size" : 12,
+				"value" : "scale"
+	   		},
+	   		"date" : {
+    			"type" : "text",
+    			"x_ul" : 549.8,
+	    		"y_ul" : 364.7,
+	    		"font_family" : "Arial",
+	    		"font_size" : 12,
+				"value" : "date"
+	   		},
+	   		"nordpfeil" : {
+    			"type" : "image",
+    			"x_ul" : 499,
+	    		"y_ul" : 350,
+	    		"width" : 6,
+	    		"height" : 12,
+	    		"angle" : 0,
+				"filename" : "./img/northarrow_simple.png"
+	   		},
+	   		"kommentar1" : {
+    			"type" : "para",
+    			"x_ul" : 489.8,
+	    		"y_ul" : 376.8,
+	    		"font_family" : "Arial",
+	    		"font_size" : 12,
+	    		"width" : 45,
+	    		"height" : 4,
+	    		"align" : "L",
+	    		"border" : 0,
+	    		"fill" : 1,
+	    		"border_width" : 0.5
+	   			},
+	   		"kommentar2" : {
+    			"type" : "para",
+    			"x_ul" : 489.8,
+	    		"y_ul" : 383.8,
+	    		"font_family" : "Arial",
+	    		"font_size" : 12,
+	    		"width" : 45,
+	    		"height" : 4,
+	    		"align" : "L",
+	    		"border" : 0,
+	    		"fill" : 1,
+	    		"border_width" : 0.5
+	   			}
+	   		}
+	   	}
+	]
+}
\ No newline at end of file

Copied: branches/kmq_dev/http/print/A2_landscape_template.odg (from rev 7677, trunk/mapbender/http/print/A2_landscape_template.odg)
===================================================================
(Binary files differ)

Copied: branches/kmq_dev/http/print/A2_landscape_template.pdf (from rev 7677, trunk/mapbender/http/print/A2_landscape_template.pdf)
===================================================================
(Binary files differ)

Copied: branches/kmq_dev/http/print/img/northarrow_simple.png (from rev 7677, trunk/mapbender/http/print/img/northarrow_simple.png)
===================================================================
(Binary files differ)


Property changes on: branches/kmq_dev/http/print/mapbender_template.json
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/mapbender/http/print/mapbender_template.json:7670-7677



More information about the Mapbender_commits mailing list