[Volute] r3599 - trunk/projects/dm/vo-dml/mapping

Volute commit messages volutecommits at g-vo.org
Wed Oct 26 18:05:32 CEST 2016


Author: lmichel
Date: Wed Oct  5 15:14:29 2016
New Revision: 3599

Log:


Modified:
   trunk/projects/dm/vo-dml/mapping/parser.html

Modified: trunk/projects/dm/vo-dml/mapping/parser.html
==============================================================================
--- trunk/projects/dm/vo-dml/mapping/parser.html	Wed Oct  5 13:41:29 2016	(r3598)
+++ trunk/projects/dm/vo-dml/mapping/parser.html	Wed Oct  5 15:14:29 2016	(r3599)
@@ -11,24 +11,31 @@
 <body>
 	<H1>VO-DML Mapping Parser (<a href="https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/mapping/MAST%20VODML%20Parser/VODML%20Parser.html" target=blank>more...</a>)</h1>
 	<div>
-
-		<ul>
-			<li><a href='#' id="li">mapping/test1.votable.xml</a></li>
-			<li><a href='#' id="li">mapping/test2.votable.xml</a></li>
-			<li><a href='#' id="li">mapping/test3.votable.xml</a></li>
-			<li><a href='#' id="li">mapping/test4.votable.xml</a></li>
-			<li><a href='#' id="li">mapping/test4.votable.xml</a></li>
-			<li><a href='#' id="li">models/sample/Association/Association.votable.xml</a></li>
-			<li><a href='#' id="li">models/sample/Composition/Composition.votable.xml</a></li>
-			<li><a href='#' id="li">models/sample/EnumLiteral/EnumLiteral.votable.xml</a></li>
-		</ul>
-		Output Format <select id=format>
+		VOTable sample 
+		<select id=sample>
+			<option>-- Select a Sample --</option>
+			<option>mapping/test1.votable.xml</option>
+			<option>mapping/test2.votable.xml</option>
+			<option>mapping/test3.votable.xml</option>
+			<option>mapping/test4.votable.xml</option>
+			<option>mapping/test4.votable.xml</option>
+			<option>models/sample/Association/Association.votable.xml</option>
+			<option>models/sample/Composition/Composition.votable.xml</option>
+			<option>models/sample/EnumLiteral/EnumLiteral.votable.xml</option>
+		</select>
+		<input type=button value="Show up VOTable" id="showup"></input>
+		<input type=button value="Run Parser" id="run"></input>
+		<br>
+		Output Format 
+		<select id=format>
 			<option>json</option>
 			<option>jsonlite</option>
-			<option>extjs</option>
-			<option>csv</option>
+			<option>outMast</option>
+			<option>outVodmli</option>
+			<option>outVotable</option>
+			<option>outVotableAlt</option>
 
-		</select> url: <span id="url"></span> <br>
+		</select> url: <input type="text" id="url" size="80"></input> <br>
 		<br>
 		<iframe id=retour
 			style="width: 100%; height: 400px; overflow: auto; background-color: #DDD;"></iframe>
@@ -37,12 +44,37 @@
 </body>
 <script type="text/javascript">
 var baseUrl = "https://masttest.stsci.edu/vodml/Mashup/Mashup.asmx/parseVodml?";
+var votableUrl;
+var url;
 $().ready(function() {
-    $( "a" ).click(function(){
-    	var url = baseUrl + "format=" + $('#format').val() + "&votable=https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/" + $(this).html();
-        $("#url").html(url);
-        $("#retour").attr("src", url );
+	   $( "select" ).change(function(){
+		   if( $(this).val().startsWith("--")){
+			   alert("No sample selected")
+			   return;
+		   }
+		    votableUrl = "https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/" + $('#sample').val();
+	    	url = baseUrl + "format=" + $('#format').val() + "&votable=" + votableUrl
+	        $("#url").val(url);
+	    	if( $(this).attr("id") == "format")
+	        $("#retour").attr("src", url );
+	    });
+
+	
+    $( "#showup" ).click(function(){
+		   if( $("#sample").val().startsWith("--")){
+			   alert("No sample selected")
+			   return;
+		   }
+        $("#retour").attr("src", votableUrl );
     });
+    $( "#run" ).click(function(){
+		   if( $("#sample").val().startsWith("--")){
+			   alert("No sample selected")
+			   return;
+		   }
+	       $("#retour").attr("src", url );
+ });
+
 });
 </script>
 </html>


More information about the Volutecommits mailing list