source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/viewItems.kid @ 3544

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/viewItems.kid@3544
Revision 3544, 3.7 KB checked in by cbyrom, 13 years ago (diff)

Adjust code to allow multiple WMC docs to be selected in the selections
tab and displayed in the view tab. Also rename the display tab to 'details'
and add new exceptions to deal with URL lookup failures.

Line 
1<html py:extends="'ndgPage.kid','meta.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
2<head>
3<link type="text/css" rel="stylesheet" href="/layout/ddc_style.css"/>
4<link type="text/css" rel="stylesheet" href="/layout/ddc_vis.css"/>
5
6<!-- BEGIN: Yahoo Interface Library -->
7<link type="text/css" rel="stylesheet"
8        href="/js/yui/treeview/assets/skins/sam/treeview.css"/>
9         
10<!-- Dependency source files --> 
11<script src = "js/yui/yahoo/yahoo-min.js" ></script> 
12<script src = "js/yui/event/event-min.js" ></script> 
13 
14<!-- TreeView source file --> 
15<script src = "js/yui/treeview/treeview-min.js" ></script> 
16
17<!-- TreeView Menu Style -->
18<link rel="stylesheet" type="text/css" href="/js/yui/treeview/assets/treeview-menu.css"/> 
19<!-- END: Yahoo Interface Library -->
20
21<!-- BEGIN: WMSC library -->
22<link type="text/css" rel="stylesheet" href="/layout/control.css"/>
23
24<script src="js/wmsc.js"></script>
25<script src="js/prototype.js"></script>
26<script src="js/xpath.js"></script>
27<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
28<script src="js/openlayers-x.js"></script>
29<script src="js/capabilities.js"></script>
30<script src="js/wmscControl.js"></script>
31<script src="js/vis-app.js"></script>
32      <script src="js/OLMapBox.js"/>
33<!-- END: WMSC library -->
34
35<!-- DDC specialisation of WMSC -->
36<script src="js/ddc-control.js"></script>
37
38<script type="text/javascript">
39
40// Hook into application for debugging.   
41var app = null;
42var control = null;
43
44function init()
45{
46    control = new WMSC.Control('layerTree', 'layerLeaves', 'dims');
47    <for py:for="i in session['viewItems']" class="dataset" py:strip="True">
48        control.addWebMapContext('viewItems', '${i.wmcURL}');
49    </for>
50
51    app = new WMSC.VisApp('map', control);
52    control.events.register('changeWMS', null, updateDescription);
53}
54
55function cleanup()
56{
57    app.destroy();
58}
59
60function updateDescription()
61{
62    $('description').innerHTML = control.getStateDescription().join('<br/>');
63}
64
65</script>
66
67<replace py:replace="pagehead()"/>
68</head>
69
70<body onload="init()" onunload="cleanup()">
71        <div id="entirepage">
72    <div py:replace="header()"/>
73        <div py:replace="PageTabs('View')"/>
74    <div py:replace="searchOneLine()"/>
75
76<div id="visBody">
77<table>
78  <tr>
79    <td>
80        <div id="mapBox">
81                        <div id="map"></div>
82                        <div id="legend"></div>
83                </div>
84    </td>
85    <td valign="top">
86      <div class="optDiv">
87        <b>Selection Description</b>
88        <div id="description">
89          Complete your selection below to view.
90        </div>
91      </div>
92      <div class="optDiv">
93        <b>Domain</b>
94        <div id="dims"></div>
95      </div>
96      <div class="optDiv">
97        <form id="figureForm">
98          <b>Plot type</b><br/>
99          <input type="radio" name="figType" value="colour" checked="1"/>Colour<br/>
100          <input type="radio" name="figType" value="bw"/>B/W Contour<br/>
101          <b>Format</b><br/>
102          <select name="figFormat">
103            <option value="image/png" name="figFormat" selected="1"> PNG </option>
104            <option value="image/jpeg" name="figFormat"> JPEG </option>
105            <option value="application/postscript" name="figFormat"> EPS </option>
106            <option value="image/svg+xml" name="figFormat"> SVG </option>
107          </select>
108          <input type="button" value="Make Figure"
109                onclick="app.makeFigure(this.parentNode.figType, this.parentNode.figFormat)"/>
110        </form>
111      </div>
112    </td>
113  </tr>
114</table>
115
116<table class="controlTable">
117<tr class="controlHeadings">
118<th>Dataset</th><th>Field</th>
119</tr>
120<tr>
121<td class="controlPanel"><div class="controlContent" id="layerTree">
122        Please wait while datasets load</div>
123</td>
124<td class="controlPanel">
125        <div class="controlContent" id="layerLeaves">
126                Select a dataset to view available fields
127        </div>
128</td>
129</tr>
130</table>
131
132</div>
133</div>
134</body>
135</html>
Note: See TracBrowser for help on using the repository browser.