Showing
8 changed files
with
137 additions
and
48 deletions
... | @@ -7,50 +7,79 @@ | ... | @@ -7,50 +7,79 @@ |
7 | <script type="text/javascript" src="lib/rh/jquery/jquery.js"></script> | 7 | <script type="text/javascript" src="lib/rh/jquery/jquery.js"></script> |
8 | <script type="text/javascript" src="lib/rh/jquery/jquery-ui.js"></script> | 8 | <script type="text/javascript" src="lib/rh/jquery/jquery-ui.js"></script> |
9 | 9 | ||
10 | - </head> | 10 | + <script> |
11 | - <body> | ||
12 | - | ||
13 | - <rhswp:Header /> | ||
14 | - | ||
15 | - <h3>Download a Daily Drilling Report</h3> | ||
16 | - <form action="ddrFileDownload"> | ||
17 | - | ||
18 | - Well Bore:<br /> | ||
19 | - <select size="15"> | ||
20 | - <ui:forEach ui:resultSet="{# | ||
21 | - SELECT ?well ?wellName | ||
22 | - WHERE { | ||
23 | - GRAPH <https://www.reportinghub.no/data/npd> { | ||
24 | - ?well a npd:Well . | ||
25 | - ?well npd:name ?wellName . | ||
26 | - } | ||
27 | - } ORDER BY ?wellName | ||
28 | - }"> | ||
29 | - <optgroup label="{= ?wellName }"> | ||
30 | - <ui:forEach ui:resultSet="{# | ||
31 | - SELECT ?wellBore ?wellBoreName | ||
32 | - WHERE { | ||
33 | - GRAPH <https://www.reportinghub.no/data/npd> { | ||
34 | - ?wellBore npd:partOfWell ?well . | ||
35 | - ?wellBore npd:name ?wellBoreName . | ||
36 | - } | ||
37 | - } ORDER By ?wellBoreName | ||
38 | - }"> | ||
39 | - <option value="{= xsd:string(?wellBore) }">{= ?wellBoreName }</option> | ||
40 | - </ui:forEach> | ||
41 | - </optgroup> | ||
42 | - </ui:forEach> | ||
43 | - </select> | ||
44 | - <br /><br /> | ||
45 | 11 | ||
46 | - Date: <input type="text" id="datepicker" /> | 12 | + function updateWellBores() { |
47 | - <script> | 13 | + $("#wellSelect option:selected").each(function() { |
48 | - $(function() { | 14 | + $.getJSON("getWellBores.json.swp",{ well: $(this).val(), ajax: 'true'}, function(j) { |
49 | - $("#datepicker").datepicker(); | 15 | + var options = ''; |
16 | + for (var i = 0; i < j.length; i++) { | ||
17 | + options += '<option value="' + j[i].value + '">' + j[i].label + '</option>'; | ||
18 | + } | ||
19 | + $("#wellBoreSelect").html(options); | ||
20 | + }); | ||
50 | }); | 21 | }); |
51 | - </script> | 22 | + } |
52 | - | 23 | + |
53 | - <input type="submit" value="Download" /> | 24 | + </script> |
54 | - </form> | 25 | + |
26 | + </head> | ||
27 | + <body> | ||
28 | + <div id="wrapper"> | ||
29 | + <rhswp:Header /> | ||
30 | + | ||
31 | + <div id="content"> | ||
32 | + | ||
33 | + <h3>Download a Daily Drilling Report</h3> | ||
34 | + <form action="ddrFileDownload"> | ||
35 | + | ||
36 | + <table> | ||
37 | + <tr> | ||
38 | + <td style="vertical-align: top"> | ||
39 | + <div class="formHeader">1. Select Well:</div> | ||
40 | + <select size="10" id="wellSelect" style="width: 200px"> | ||
41 | + <ui:forEach ui:resultSet="{# | ||
42 | + SELECT ?well ?wellName | ||
43 | + WHERE { | ||
44 | + GRAPH <https://www.reportinghub.no/data/npd> { | ||
45 | + ?well a npd:Well . | ||
46 | + ?well npd:name ?wellName . | ||
47 | + } | ||
48 | + } ORDER BY ?wellName | ||
49 | + }"> | ||
50 | + <option value="{= ?well }">{= ?wellName }</option> | ||
51 | + </ui:forEach> | ||
52 | + </select> | ||
53 | + | ||
54 | + <script> | ||
55 | + $('#wellSelect').change(function() { | ||
56 | + updateWellBores(); | ||
57 | + }); | ||
58 | + </script> | ||
59 | + | ||
60 | + </td> | ||
61 | + <td></td> | ||
62 | + <td style="padding-left:20px; vertical-align: top"> | ||
63 | + <div> | ||
64 | + <div class="formHeader">2. Select Well Bore:</div> | ||
65 | + <select size="5" id="wellBoreSelect" style="width:200px"> | ||
66 | + </select> | ||
67 | + </div><br /> | ||
68 | + <div> | ||
69 | + <div class="formHeader">3. Select Date:</div><input type="text" id="datepicker" /> | ||
70 | + <script> | ||
71 | + $(function() { | ||
72 | + $("#datepicker").datepicker(); | ||
73 | + }); | ||
74 | + </script> | ||
75 | + | ||
76 | + <input type="submit" value="Download" /> | ||
77 | + </div> | ||
78 | + </td> | ||
79 | + </tr> | ||
80 | + </table> | ||
81 | + </form> | ||
82 | + </div> | ||
83 | + </div> | ||
55 | </body> | 84 | </body> |
56 | </html> | 85 | </html> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
www.reportinghub.no/getWellBores.json.swp
0 → 100644
1 | +<ui:setContext | ||
2 | + xmlns:npd="http://www.reportinghub.no/schema/npd#" | ||
3 | + ui:queryGraph="<https://www.reportinghub.no/data/npd>" | ||
4 | + let:well="{= ui:param('well', rdfs:Resource) }"> | ||
5 | + [ | ||
6 | + <ui:forEach ui:resultSet="{# | ||
7 | + SELECT ?wellBore ?wellBoreName | ||
8 | + WHERE { | ||
9 | + ?wellBore npd:partOfWell ?well . | ||
10 | + ?wellBore npd:name ?wellBoreName . | ||
11 | + } ORDER By ?wellBoreName | ||
12 | + }" ui:indexVar="i"><ui:if ui:condition="{= ?i > 0 }">,</ui:if> | ||
13 | + { | ||
14 | + "value" : "{= ui:json(?wellBore) }", | ||
15 | + "label" : "{= ?wellBoreName }" | ||
16 | + }</ui:forEach> | ||
17 | + ] | ||
18 | +</ui:setContext> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -<div> | ||
2 | - <img src="lib/rh/images/EPIMLogoLong.jpg" /> | ||
3 | - <h1>ReportingHub</h1> | ||
4 | - <div>You are logged in as: <b>{= rhspin:userName() }</b></div> | ||
5 | -</div> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +<ui:group> | ||
2 | + <div> </div> | ||
3 | + <div class="logoContainer"><a href="http://www.epim.no" target="_new"><img src="lib/rh/images/logoEpim.gif" width="201" height="106" align="right" title="EPIM" /></a> | ||
4 | + <div style="padding: 10px"> | ||
5 | + <h1>ReportingHub</h1> | ||
6 | + <div>You are logged in as: <b>{= rhspin:userName() }</b></div> | ||
7 | + </div> | ||
8 | + </div> | ||
9 | +</ui:group> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |

9.53 KB
www.reportinghub.no/swp/rh.www/images/bg.png
0 → 100644

1.32 KB

3.64 KB

2.35 KB
... | @@ -2,4 +2,42 @@ | ... | @@ -2,4 +2,42 @@ |
2 | 2 | ||
3 | body { | 3 | body { |
4 | font-family: sans-serif; | 4 | font-family: sans-serif; |
5 | + margin:0 0px 0 0; | ||
6 | + font-family:Tahoma,arial,Helvetica; | ||
7 | + font-size:12px; | ||
8 | + background-color:#FEFEFC; | ||
9 | + background-image:url(images/bg.png); | ||
10 | + background-position:top center; | ||
11 | + background-repeat:repeat-x; | ||
12 | + color:#333; | ||
13 | +} | ||
14 | + | ||
15 | +#content { | ||
16 | + position:relative; | ||
17 | + margin-top:0px; | ||
18 | + display:block; | ||
19 | + padding:15px 30px 30px 30px; | ||
20 | + background-color:#fefefc; | ||
21 | +} | ||
22 | + | ||
23 | +#wrapper{ | ||
24 | + position:relative; | ||
25 | + width:950px; | ||
26 | + margin:0 auto; | ||
27 | + display:block; | ||
28 | + background-repeat:no-repeat; | ||
29 | +} | ||
30 | + | ||
31 | +a,a:link,a:visited { | ||
32 | + color:#375f82; | ||
33 | +} | ||
34 | + | ||
35 | +.logoContainer { | ||
36 | + background: url(images/headerBg.png); | ||
37 | + width: 950px; | ||
38 | + height: 106px; | ||
39 | +} | ||
40 | + | ||
41 | +.formHeader { | ||
42 | + font-weight: bold; | ||
5 | } | 43 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment