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

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

Create new controls to componentise functionality for maps, layer
selection and dimension selection. Replace existing functionality with
this.
Add verbose documentation.

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
20<link rel="stylesheet" type="text/css" href="/js/yui/fonts/fonts-min.css?_yuiversion=2.5.0" />
21<script type="text/javascript" src="/js/yui/utilities/utilities.js?_yuiversion=2.5.0"></script>
22
23<script type="text/javascript" src="/js/yui/yahoo-dom-event/yahoo-dom-event.js" ></script> 
24<script type="text/javascript" src="/js/yui/dragdrop/dragdrop-min.js" ></script>
25<link type="text/css" rel="stylesheet" href="/layout/drag_drop_style.css"/>
26<script src = "js/dragAndDrop.js" ></script> 
27
28
29<!-- END: Yahoo Interface Library -->
30
31<!-- BEGIN: WMSC library -->
32<link type="text/css" rel="stylesheet" href="/layout/control.css"/>
33
34<script src="$g.server/js/wmsc.js"></script>
35<script src="$g.server/js/prototype.js"></script>
36<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
37<script src="$g.server/js/openlayers-x.js"/>
38<script src="$g.server/js/dimensionControl.js"/>
39<script src="$g.server/js/mapControl.js"/>
40<script src="$g.server/js/layerControl.js"></script>
41<script src="$g.server/js/capabilities.js"></script>
42<!-- END: WMSC library -->
43
44<script type="text/javascript">
45
46// Hook into application for debugging.   
47var app = null;
48var control = null;
49
50function init()
51{
52    var coordControl = new WMSC.DimControl('dims');
53    var layerControl = new WMSC.VisAppLayers('layerTree', 'layerLeaves', coordControl);
54    <for py:for="i in session['viewItems']" class="dataset" py:strip="True">
55        <span py:if="i.wmcURL" py:strip="True">
56                layerControl.addWebMapContext('${i.wmcURL}');
57            </span>
58    </for>
59         
60    app = new WMSC.VisApp('map', 10, 640, true);
61    app.addDimensionControl(coordControl);
62    app.addLayerControl(layerControl);
63}
64
65function cleanup()
66{
67    app.destroy();
68}
69
70</script>
71
72<replace py:replace="pagehead()"/>
73</head>
74
75<body onload="init()" onunload="cleanup()">
76        <div id="entirepage">
77    <div py:replace="header()"/>
78        <div py:replace="PageTabs('View')"/>
79    <div py:replace="searchOneLine()"/>
80
81<div id="visBody">
82<table>
83  <tr>
84    <td align="center">
85        <div id="mapBox">
86                        <div id="map"></div>
87                        <div id="legend"></div>
88                </div>
89    </td>
90    <td valign="top">
91      <div class="optDiv">
92        <b>Selection Description</b>
93        <div id="description">
94          Complete your selection below to view.
95        </div>
96      </div>
97      <div class="optDiv">
98        <b>Domain</b>
99                        <div id="dims"></div>
100      </div>
101    <div class="hiddenDiv">
102        <form id="figureForm">
103          <b>Plot type</b><br/>
104          <input type="radio" name="figType" value="colour" checked="1"/>Colour<br/>
105          <input type="radio" name="figType" value="bw"/>B/W Contour<br/>
106          <b>Format</b><br/>
107          <select name="figFormat">
108            <option value="image/png" name="figFormat" selected="1"> PNG </option>
109            <option value="image/jpeg" name="figFormat"> JPEG </option>
110            <option value="application/postscript" name="figFormat"> EPS </option>
111            <option value="image/svg+xml" name="figFormat"> SVG </option>
112          </select>
113          <input type="button" value="Make Figure"
114                onclick="app.makeFigure(this.parentNode.figType, this.parentNode.figFormat)"/>
115        </form>
116      </div>
117    </td>
118  </tr>
119</table>
120
121<table class="controlTable">
122<tr class="controlHeadings">
123<th>Dataset</th><th>Layer</th>
124</tr>
125<tr>
126<td class="controlPanel"><div class="controlContent" id="layerTree">
127        Please wait while datasets load</div>
128</td>
129<td class="controlPanel">
130        <div class="controlContent" id="layerLeaves">
131                <div id="layerMessage" class="layerMessage">
132            <span py:if="'viewItems' not in session" py:strip="True">
133                Please select a dataset to view - from the 'Selections' tab.
134            </span>
135            <span py:if="'viewItems' in session" py:strip="True">
136                                Expand a dataset and select a layer to view
137                        </span>
138                </div>
139                <div class="workarea">
140                        <ul class="draglist" id="layerlist">
141                        </ul>
142                </div>
143        </div>
144</td>
145</tr>
146</table>
147
148</div>
149</div>
150</body>
151</html>
Note: See TracBrowser for help on using the repository browser.