[Mapbender-commits] r10066 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 28 22:58:21 PST 2019


Author: armin11
Date: 2019-02-28 22:58:21 -0800 (Thu, 28 Feb 2019)
New Revision: 10066

Modified:
   trunk/mapbender/http/php/mod_monitorCapabilities_read.php
Log:
Fix for service title and show service metadata if click on id

Modified: trunk/mapbender/http/php/mod_monitorCapabilities_read.php
===================================================================
--- trunk/mapbender/http/php/mod_monitorCapabilities_read.php	2019-02-22 10:33:33 UTC (rev 10065)
+++ trunk/mapbender/http/php/mod_monitorCapabilities_read.php	2019-03-01 06:58:21 UTC (rev 10066)
@@ -44,8 +44,43 @@
 <?php
 echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
 ?>
+<!--<link type="text/css" href="../extensions/jquery-ui-1.8.16.custom/css/ui-lightness/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />-->
+<link type="text/css" href="../extensions/jquery-ui-1.12.1.custom/jquery-ui.min.css" rel="Stylesheet" />
+<link type="text/css" href="../extensions/jquery-ui-1.12.1.custom/jquery-ui.structure.min.css" rel="Stylesheet" />
+<link type="text/css" href="../extensions/jquery-ui-1.12.1.custom/jquery-ui.theme.min.css" rel="Stylesheet" />
 </head>
 <body>
+<script src="../extensions/jquery-1.12.0.min.js"></script>
+<!--<script src="../extensions/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>-->
+<script src="../extensions/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
+
+<!--<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"
+			  integrity="sha256-xI/qyl9vpwWFOXz7+x/9WkG5j/SVnSw21viy8fWwbeE="
+			  crossorigin="anonymous"></script>-->
+<script>
+		window.onload = function() {
+				// add option to open metadata windows in a modal dialog
+				$(".modalDialog").click(function (e) {
+					var iframe = $('<iframe width="100%" height="100%" frameborder="0" scrolling="yes" style="min-width: 95%;height:100%;"></iframe>');
+					iframe.attr('src', String($(this).attr('url')));
+    					var dialog = $("<div title=''metadata'></div>").append(iframe).dialog({
+        					//autoOpen: true,
+        					modal: true,
+        					resizable: true,
+        					width: 650,
+        					height: 400,
+        					close: function () {
+            						iframe.attr("src", "");
+        					}
+    					});
+				});
+				// change style to link optic
+				//$(".modalDialog").css("text-decoration", "underline");
+				//$(".modalDialog").css("text-decoration-color", "blue");
+				//$(".modalDialog").css("color", "blue");
+				//$(".modalDialog").css("cursor", "pointer");
+		};
+</script>
 <?php
 $admin = new administration();
 $user = new User();
@@ -318,11 +353,11 @@
 switch ($serviceType) {
 	case "WMS":
 		$str .= "\n\t\t\t<td><input name='cb".$cnt."' value='" . $wms_id[$k] . "' type=checkbox ".$fill." /><input type=hidden name='upl_id".$cnt."' value='".$upload_id[$k]."'></td>";
-		$str .= "\n\t\t\t<td valign='top'><b>" . $wms_id[$k] . "</b><br>" . $admin->getWfsTitleByWfsId($wfs_id[$k]) . "</td>";
+		$str .= "\n\t\t\t<td valign='top'><b><a url='../php/mod_showMetadata.php?resource=wms&layout=tabs&id=" . $wms_id[$k] . "' class='modalDialog'>" . $wms_id[$k] . "</a></b><br>" . $admin->getWmsTitleByWmsId($wms_id[$k]) . "</td>";
 		break;
 	case "WFS":
 		$str .= "\n\t\t\t<td><input name='cb".$cnt."' value='" . $wfs_id[$k] . "' type=checkbox ".$fill." /><input type=hidden name='upl_id".$cnt."' value='".$upload_id[$k]."'></td>";
-		$str .= "\n\t\t\t<td valign='top'><b>" . $wfs_id[$k] . "</b><br>" . $admin->getWfsTitleByWfsId($wfs_id[$k]) . "</td>";
+		$str .= "\n\t\t\t<td valign='top'><b><a url='../php/mod_showMetadata.php?resource=wfs&layout=tabs&id=" . $wfs_id[$k] . "' class='modalDialog'>" . $wfs_id[$k] . "</a></b><br>" . $admin->getWfsTitleByWfsId($wfs_id[$k]) . "</td>";
 		break;
 }
 	$str .= "\n\t\t\t<td valign='top'><a href='".$upload_url[$k]."' target=_blank><img title='Connect to service' border=0 src = '../img/trafficlights/". $img. "'></a></td>";



More information about the Mapbender_commits mailing list