[Mapbender-commits] r9435 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Apr 7 08:01:15 PDT 2016


Author: armin11
Date: 2016-04-07 08:01:15 -0700 (Thu, 07 Apr 2016)
New Revision: 9435

Modified:
   trunk/mapbender/http/geoportal/mod_showCatalogueStatistics.php
   trunk/mapbender/http/geoportal/mod_showCatalogueStatistics_server.php
Log:
Some little enhancement - thanx to karl owesny ;-)

Modified: trunk/mapbender/http/geoportal/mod_showCatalogueStatistics.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_showCatalogueStatistics.php	2016-04-07 13:54:00 UTC (rev 9434)
+++ trunk/mapbender/http/geoportal/mod_showCatalogueStatistics.php	2016-04-07 15:01:15 UTC (rev 9435)
@@ -19,6 +19,21 @@
 		'</head>';
 $style = <<< HTML
 <style>
+#pie2 svg {
+  display:block;
+  margin: 0 auto;
+}
+
+#buttons {
+  text-align: center;
+  
+}
+
+#pie svg {
+  display:block;
+  margin: 0 auto;
+}
+
 .outer {
   position: relative;
   justify-content: center;
@@ -33,11 +48,13 @@
 //css	
 $html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';
 $html .= $metadataStr;
+$html .= '<div id="buttons">';
 $html .= '<button class="pulldata" id="NUTS_1" value="NUTS_1">Land</button>';
 $html .= '<button class="pulldata" id="NUTS_2" value="NUTS_2">Regierungsbezirk</button>';
 $html .= '<button class="pulldata" id="NUTS_3" value="NUTS_3">Kreis</button>';
 $html .= '<button class="pulldata" id="LAU_1" value="LAU_1">Kommunalverband</button>';
 $html .= '<button class="pulldata" id="LAU_2" value="LAU_2">Kommune</button>';
+$html .= '</div>';
 $html .= '<div id="pie" class="inner"></div>';
 $html .= '<div id="dialog" class="inner"><div id="pie2" class="inner"></div></div>';
 //internal lib javascript part
@@ -113,8 +130,8 @@
 				var pie2 = new d3pie("pie2", {
 					size: {
 						pieOuterRadius: "50%",
-						canvasHeight: 300,
-						canvasWidth: 300
+						canvasHeight: 380,
+						canvasWidth: 380
 					},
 					data: {
 						sortOrder: "value-asc",
@@ -135,8 +152,8 @@
 					}
 				});
 			} else {
-				alert("Keine weitere Kategorisierung vorhanden!");
-				$("#dialog").dialog("close");
+				//alert("Keine weitere Kategorisierung vorhanden!");
+				$("#dialog").append( "<p id=\"error\">Keine Kategorisierung von Datensätzen vorhanden!</p>" );
 				if (pie2 !== undefined) {
 					pie2.destroy();
 				}
@@ -144,6 +161,9 @@
 			}				
 		});
 	}
+	$('#dialog').live("dialogclose", function(){
+   		$('#error').remove();
+	});
  </script>
 JAVASCRIPT;
 $html .= $javascript;

Modified: trunk/mapbender/http/geoportal/mod_showCatalogueStatistics_server.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_showCatalogueStatistics_server.php	2016-04-07 13:54:00 UTC (rev 9434)
+++ trunk/mapbender/http/geoportal/mod_showCatalogueStatistics_server.php	2016-04-07 15:01:15 UTC (rev 9435)
@@ -92,7 +92,7 @@
 	}
 } else {
 	//call searchInterface for categories
-	$connector = new connector("http://localhost/mb_trunk/php/mod_callMetadata.php?searchText=e&outputFormat=json&resultTarget=categories&searchResources=wms&searchId=test&registratingDepartments=".$registratingDepartments);
+	$connector = new connector("http://localhost/mapbender/php/mod_callMetadata.php?searchText=e&outputFormat=json&resultTarget=categories&searchResources=wms&searchId=test&registratingDepartments=".$registratingDepartments);
 	$jsonString = $connector->file;
 	$jsonObject = json_decode($jsonString);
 	$i = 0;



More information about the Mapbender_commits mailing list