download-ddr.swp 2.37 KB
<html xmlns:npd="http://www.reportinghub.no/schema/npd#">
	<head>
		<title>ReportingHub - Download DDR</title>
		<link rel="stylesheet" type="text/css" href="lib/rh/rh.css" />
		<link rel="stylesheet" type="text/css" href="lib/rh/jquery/jquery-ui.css" />
		
		<script type="text/javascript" src="lib/rh/jquery/jquery.js"></script>
		<script type="text/javascript" src="lib/rh/jquery/jquery-ui.js"></script>
		
		<script>
		
			function updateWellBores() {
				$("#wellSelect option:selected").each(function() {
					$.getJSON("getWellBores.json.swp",{ well: $(this).val(), ajax: 'true'}, function(j) {
						var options = '';
					    for (var i = 0; i &lt; j.length; i++) {
					        options += '<option value="' + j[i].value + '">' + j[i].label + '</option>';
					    }
					    $("#wellBoreSelect").html(options);
					});
				});
			}
			
		</script>
		
	</head>
	<body>
		<div id="wrapper">
			<rhswp:Header />
			
			<div id="content">
			
				<h3>Download a Daily Drilling Report</h3>
				<form action="ddrFileDownload">
				
					<table>
						<tr>
							<td style="vertical-align: top">
								<div class="formHeader">1. Select Well:</div>
								<select size="10" id="wellSelect" style="width: 200px">
									<ui:forEach ui:resultSet="{#
											SELECT ?well ?wellName
											WHERE {
												GRAPH &lt;https://www.reportinghub.no/data/npd&gt; {
													?well a npd:Well .
													?well npd:name ?wellName .
												}
											} ORDER BY ?wellName
										}">
										<option value="{= ?well }">{= ?wellName }</option>
									</ui:forEach>
								</select>
								
								<script>
									$('#wellSelect').change(function() {
										updateWellBores();
									});
								</script>
								
							</td>
							<td></td>
							<td style="padding-left:20px; vertical-align: top">
								<div>			
									<div class="formHeader">2. Select Well Bore:</div>
									<select size="5" id="wellBoreSelect" style="width:200px">
									</select>
								</div><br />		
								<div>
									<div class="formHeader">3. Select Date:</div><input type="text" id="datepicker" />
									<script>
										$(function() {
											$("#datepicker").datepicker();
										});
									</script>
									&nbsp;
									<input type="submit" value="Download" />			
								</div>								
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</body>
</html>