[Mapbender-commits] r8215 - in trunk/mapbender/http: php plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Nov 25 07:41:13 EST 2011


Author: armin11
Date: 2011-11-25 04:41:13 -0800 (Fri, 25 Nov 2011)
New Revision: 8215

Modified:
   trunk/mapbender/http/php/mod_showMetadata.php
   trunk/mapbender/http/plugins/wfsConfTree.js
Log:
Bugfixes

Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php	2011-11-24 13:08:05 UTC (rev 8214)
+++ trunk/mapbender/http/php/mod_showMetadata.php	2011-11-25 12:41:13 UTC (rev 8215)
@@ -499,9 +499,28 @@
 		$serviceType = 'wfs';	
 		break;
 	case "wfs-conf":
-		echo 'Not yet implemented!'; 
+		//echo 'Not yet implemented!'; 
+		//$serviceType = 'wfs';
+		//die(); 	
+		$wfsConfId = $id;
+		$sql1 = "SELECT fkey_featuretype_id from wfs_conf WHERE wfs_conf_id = $1";
+		$v1 = array($wfsConfId);
+		$t1 = array('i');
+		$res1 = db_prep_query($sql1,$v1,$t1);
+		$wfsConfResult = db_fetch_array($res1);
+		$featuretypeId = $wfsConfResult['fkey_featuretype_id'];
+		$sql = "SELECT ";
+		$sql .= "wfs_featuretype.featuretype_id as contentid, wfs_featuretype.featuretype_title as contenttitle, wfs_featuretype.featuretype_abstract as contentabstract, wfs_featuretype.featuretype_name as contentname,wfs_featuretype.featuretype_srs, ";
+		$sql .= "wfs.wfs_title as servicetitle, wfs.wfs_version as serviceversion, wfs.wfs_abstract as serviceabstract, wfs.wfs_id as serviceid, wfs.fees, wfs.accessconstraints, wfs.individualname as contactperson, wfs.wfs_getcapabilities, wfs.wfs_describefeaturetype, ";
+		$sql .= "wfs.positionname as contactposition, wfs.providername as contactorganization, wfs.deliverypoint as address, wfs.city, wfs_timestamp as timestamp, wfs_owner as owner, wfs.wfs_owsproxy as owsproxy, wfs.fkey_mb_group_id,";
+		$sql .= "wfs.administrativearea as stateorprovince, wfs.postalcode as postcode, wfs.voice as contactvoicetelephone, wfs.facsimile as contactfacsimiletelephone, ";
+		$sql .= "wfs.electronicmailaddress as contactelectronicmailaddress, wfs.country ";
+		$sql .= "FROM wfs_featuretype, wfs WHERE wfs_featuretype.featuretype_id = $1 AND wfs_featuretype.fkey_wfs_id = wfs.wfs_id LIMIT 1";
+		$v = array($featuretypeId);
+		$t = array('i');
 		$serviceType = 'wfs';
-		die(); 	
+		$resourceSymbol = "<img src='../img/osgeo_graphics/geosilk/vector.png' alt='".$translation['featuretype']." - Bild' title='".$translation['featuretype']."'> - ".$translation['featuretype'];
+		$serviceType = 'wfs';	
 		break;
 	case "wmc":
 		$wmcId = $id;

Modified: trunk/mapbender/http/plugins/wfsConfTree.js
===================================================================
--- trunk/mapbender/http/plugins/wfsConfTree.js	2011-11-24 13:08:05 UTC (rev 8214)
+++ trunk/mapbender/http/plugins/wfsConfTree.js	2011-11-25 12:41:13 UTC (rev 8215)
@@ -102,23 +102,36 @@
 			switch(parseInt(aWFSConf[i].type,10)){
 					/* search */
 					case 0: 
-						$wfsconfEntry = $('<li class="search" ><img src="../img/gnome/icn_suchmodul.png" /><a href="#" class="meta">metadata</a><button class="remove">remove</button><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a></li>');
+						$wfsconfEntry = $('<li class="search" ><img src="../img/gnome/icn_suchmodul.png" /><a href="#" class="meta">metadata</a><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a><button class="remove">remove</button></li>');
 					break;
 					
 					/* digitize */
 					case 1:
-						$wfsconfEntry = $('<li class="digitize" ><img src="../img/gnome/document-save.png" /><a href="#" class="meta">medadata</a><button class="remove">remove</button><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a></li>');
+						$wfsconfEntry = $('<li class="digitize" ><img src="../img/gnome/document-save.png" /><a href="#" class="meta">medadata</a><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a><button class="remove">remove</button></li>');
 					break;
 
 					/* download */
 					case 2: 
-						$wfsconfEntry = $('<li class="download" ><img src="../img/gnome/accessories-text-editor.png" /><a href="#" class="meta">metadata</a><button class="remove">remove</button><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a></li>');
+						$wfsconfEntry = $('<li class="download" ><img src="../img/gnome/accessories-text-editor.png" /><a href="#" class="meta">metadata</a><a href="#" class="dialogopen">'+ aWFSConf[i].label +'</a><button class="remove">remove</button></li>');
 					break;
 
 			}
 			$wfsconfEntry.data("wfsconfId",aWFSConf[i].id);
 			$featuretypeList.append($wfsconfEntry);
 
+			$wfsconfEntry.find("a.meta").click((function(wfsConf){ 
+				return function(){
+
+				var querystring = 'resource=wfs-conf&id='+wfsConf.id;
+				var $iframe = $('<iframe name="'+o.id+'_" style="border:none; width: 100%; height: 100%;" src="../php/mod_showMetadata.php?'+querystring+'"></iframe>');
+				$wfsConfDialog.empty();
+				$wfsConfDialog.append($iframe);	
+				$wfsConfDialog.dialog("open");
+	
+
+				};
+			})(aWFSConf[i]));
+
 			$wfsconfEntry.find("a.dialogopen").click((function(wfsConf){ 
 				return function(){
 



More information about the Mapbender_commits mailing list