[Mapbender-commits] r7164 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Nov 25 08:16:37 EST 2010


Author: verenadiewald
Date: 2010-11-25 05:16:37 -0800 (Thu, 25 Nov 2010)
New Revision: 7164

Modified:
   trunk/mapbender/http/plugins/mb_metadata_wmc_edit.js
   trunk/mapbender/http/plugins/mb_metadata_wmc_edit.php
   trunk/mapbender/http/plugins/mb_metadata_wmc_select.js
   trunk/mapbender/http/plugins/mb_metadata_wmc_server.php
Log:
added link for showMetadata

Modified: trunk/mapbender/http/plugins/mb_metadata_wmc_edit.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wmc_edit.js	2010-11-25 10:59:05 UTC (rev 7163)
+++ trunk/mapbender/http/plugins/mb_metadata_wmc_edit.js	2010-11-25 13:16:37 UTC (rev 7164)
@@ -80,6 +80,7 @@
 				$metadataForm.easyform("fill", obj);
 				that.valid();
 				that.enableResetButton();
+				that.enableShowMetadataLink();
 			}
 		});
 		req.send();		
@@ -96,6 +97,11 @@
 			$("#inspireCats option").removeAttr("selected");
 		});
 	}
+	
+	this.enableShowMetadataLink = function () {
+		var linkHref = $("#wmc_showMetadata").attr("href") + wmcId;
+		$("#wmc_showMetadata").attr("href",linkHref);
+	}
 
 	this.fill = function (obj) {
 		$metadataForm.easyform("fill", obj);

Modified: trunk/mapbender/http/plugins/mb_metadata_wmc_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wmc_edit.php	2010-11-25 10:59:05 UTC (rev 7163)
+++ trunk/mapbender/http/plugins/mb_metadata_wmc_edit.php	2010-11-25 13:16:37 UTC (rev 7164)
@@ -21,12 +21,16 @@
 	<input name="wmc_id" id="wmc_id" type="hidden"/>
 
 	<legend><?php echo _mb("Service Level Metadata");?>: <img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Possibility to adapt and add informations in the separate WMC-Featuretype Metadata. The modified Metadata is stored in the database of the GeoPortal.rlp, outwardly these metadata overwrite the original Service-Metadata.");?>'}" src="../img/questionmark.png"></img></legend>
-	<p>
-		<label><?php echo _mb("Show original Service Metadata from last update");?></label>
+<!-- <p>
+		<label><?php #echo _mb("Show original Service Metadata from last update");?></label>
 		<img class="original-metadata-wmc" src="../img/book.png"></img>
-		<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("The original WMC-Metadata from the last update could be recovered or updated, so that the original Service-Metadata will be shown outward again.");?>'}" src="../img/questionmark.png"></img>
+		<img class="help-dialog" title="<?php #echo _mb("Help");?>" help="{text:'<?php #echo _mb("The original WMC-Metadata from the last update could be recovered or updated, so that the original Service-Metadata will be shown outward again.");?>'}" src="../img/questionmark.png"></img>
 	</p>
+-->	
 	<p>
+		<a id='wmc_showMetadata' class='cancelClickEvent' target='_blank' href='../php/mod_showMetadata.php?languageCode=<?php echo Mapbender::session()->get("mb_lang");?>&resource=wmc&id='><?php echo _mb("Metadata");?></a>
+	</p>
+	<p>
 		<label for="wmc_title"><?php echo _mb("WMC Title (OWS)");?>:</label>
 		<input name="wmc_title" id="wmc_title" class="required"/>
 		<img class="metadata_img" title="<?php echo _mb("Inspire");?>" src="../img/misc/inspire_eu_klein.png"></img>

Modified: trunk/mapbender/http/plugins/mb_metadata_wmc_select.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wmc_select.js	2010-11-25 10:59:05 UTC (rev 7163)
+++ trunk/mapbender/http/plugins/mb_metadata_wmc_select.js	2010-11-25 13:16:37 UTC (rev 7164)
@@ -89,6 +89,14 @@
 						$metadataSelect.show();
 					});
 				});
+				
+				$metadataSelect.find(".cancelClickEvent").click (function (e) {
+					if(jQuery.browser.msie) {
+						e.cancelBubble = true;
+					} else {
+						e.stopPropagation();
+					}
+				});
 			}
 		});
 		req.send();

Modified: trunk/mapbender/http/plugins/mb_metadata_wmc_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wmc_server.php	2010-11-25 10:59:05 UTC (rev 7163)
+++ trunk/mapbender/http/plugins/mb_metadata_wmc_server.php	2010-11-25 13:16:37 UTC (rev 7164)
@@ -44,7 +44,8 @@
 				"WMC ID",
 				"Titel",
 				"Timestamp",
-				"Load Count"
+				"Load Count",
+				""
 			), 
 			"data" => array()
 		);
@@ -52,6 +53,9 @@
 		while ($row = db_fetch_row($res)) {
 			// convert NULL to '', NULL values cause datatables to crash
 			$walk = array_walk($row, create_function('&$s', '$s=strval($s);'));
+			$link = "<a class='cancelClickEvent' target='_blank' href='../php/mod_showMetadata.php?".
+					"languageCode=".Mapbender::session()->get("mb_lang")."&resource=wmc&id=".$row[0]."'>"._mb("Metadata")."</a>";
+			array_push($row, $link);
 			$resultObj["data"][]= $row;
 		}
 		$ajaxResponse->setResult($resultObj);
@@ -78,7 +82,8 @@
 		$resultObj['wmc_title'] = $row['wmc_title'];
 		$resultObj['wmc_timestamp'] = $row['wmc_timestamp'] != "" ? date('d.m.Y', $row['wmc_timestamp']) : "";
 		$resultObj['wmc_timestamp_create'] = $row['wmc_timestamp_create'] != "" ? date('d.m.Y', $row['wmc_timestamp_create']) : "";
-		$resultObj['public'] = $row['wmc_public'] == 1 ? true : false;	
+		$resultObj['public'] = $row['wmc_public'] == 1 ? true : false;
+		$resultObj['linkHref'] = "../php/mod_showMetadata.php?languageCode=".Mapbender::session()->get("mb_lang")."&resource=wmc&id=".$row['wmc_id'];	
 
 		$keywordSql = <<<SQL
 	



More information about the Mapbender_commits mailing list