1 |
<html> |
---|
2 |
|
---|
3 |
<!-- shared resources to hold the wms servers and layers --> |
---|
4 |
|
---|
5 |
<cwc2 type="SharedResource" name="WMSSERVERS" ENABLEJS="true"/> |
---|
6 |
|
---|
7 |
<cwc2 type="SharedResource" name="WMSLAYERS" ENABLEJS="true"/> |
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
<!-- wmscache widgets populate the shared resources --> |
---|
12 |
|
---|
13 |
<CWC2 TYPE="WMSCache" SHAREDRESOURCENAME="WMSSERVERS" WMSCACHEDIRECTORY="../wmscache/" LISTSERVERS="true" LISTLAYERS="false"/> |
---|
14 |
|
---|
15 |
<CWC2 TYPE="WMSCache" SHAREDRESOURCENAME="WMSLAYERS" WMSCACHEDIRECTORY="../wmscache" LISTSERVERS="false" LISTLAYERS="true" SERVERIMAGE="[$gszCoreWebPath$]/skins/default/images/tree_server.gif" THEMEIMAGE="[$gszCoreWebPath$]/skins/default/images/tree_layers.gif" THEMEOPENIMAGE="[$gszCoreWebPath$]/skins/default/images/tree_layers.gif" LAYERIMAGE="[$gszCoreWebPath$]/skins/default/images/tree_layer.gif"/> |
---|
16 |
|
---|
17 |
<head> |
---|
18 |
|
---|
19 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
20 |
|
---|
21 |
<link href="[$gszCoreWebPath$]/skins/default/css/cwc2.css" rel="stylesheet" type="text/css"> |
---|
22 |
|
---|
23 |
<link href="[$gszCoreWebPath$]/widgets/css/mapbrowser.css" rel="stylesheet" type="text/css"> |
---|
24 |
|
---|
25 |
<style type="text/css"> |
---|
26 |
|
---|
27 |
|
---|
28 |
|
---|
29 |
.label |
---|
30 |
|
---|
31 |
{ |
---|
32 |
|
---|
33 |
font-family : Arial, Helvetica, sans-serif; |
---|
34 |
|
---|
35 |
font-size : 11px; |
---|
36 |
|
---|
37 |
} |
---|
38 |
|
---|
39 |
</style> |
---|
40 |
|
---|
41 |
<script language="javascript" type="text/javascript"> |
---|
42 |
|
---|
43 |
|
---|
44 |
|
---|
45 |
var changing = false; |
---|
46 |
|
---|
47 |
|
---|
48 |
|
---|
49 |
function myUpdateServers() |
---|
50 |
|
---|
51 |
{ |
---|
52 |
|
---|
53 |
document.forms[0].WMSSERVERS.value = "0"; |
---|
54 |
|
---|
55 |
document.forms[0].WMSLAYERS.value = "0"; |
---|
56 |
|
---|
57 |
document.forms[0].submit(); |
---|
58 |
|
---|
59 |
} |
---|
60 |
|
---|
61 |
/** |
---|
62 |
|
---|
63 |
* handle the user changing WMS Servers by 'telling' the two wms cache |
---|
64 |
|
---|
65 |
* widgets which server to consider 'active' |
---|
66 |
|
---|
67 |
*/ |
---|
68 |
|
---|
69 |
function myOnChange( obj, opt ) |
---|
70 |
|
---|
71 |
{ |
---|
72 |
|
---|
73 |
if (changing) return; |
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 |
if (opt.value == "manage") |
---|
78 |
|
---|
79 |
{ |
---|
80 |
|
---|
81 |
wh = window.open("[$gszCoreWebPath$]/common/phpwms/manage_servers.phtml?sid=[$SID$]", "Manage WMS Servers", "scrollbars=yes,resizable=yes,location=no,width=510,height=700"); |
---|
82 |
|
---|
83 |
wh.onunload = this.myUpdateServers; |
---|
84 |
|
---|
85 |
var i; |
---|
86 |
|
---|
87 |
changing = true; |
---|
88 |
|
---|
89 |
for (i=0; i<obj.options.length; i++) |
---|
90 |
|
---|
91 |
{ |
---|
92 |
|
---|
93 |
if (obj.options[i].value == documents.forms[0].WMSSERVERS.value) |
---|
94 |
|
---|
95 |
{ |
---|
96 |
|
---|
97 |
obj.options[i].selected = true; |
---|
98 |
|
---|
99 |
break; |
---|
100 |
|
---|
101 |
} |
---|
102 |
|
---|
103 |
} |
---|
104 |
|
---|
105 |
changing = false; |
---|
106 |
|
---|
107 |
} |
---|
108 |
|
---|
109 |
else if (opt.value == "") |
---|
110 |
|
---|
111 |
{ |
---|
112 |
|
---|
113 |
} |
---|
114 |
|
---|
115 |
else |
---|
116 |
|
---|
117 |
{ |
---|
118 |
|
---|
119 |
document.forms[0].WMSSERVERS.value = opt.value; |
---|
120 |
|
---|
121 |
document.forms[0].WMSLAYERS.value = opt.value; |
---|
122 |
|
---|
123 |
document.forms[0].submit(); |
---|
124 |
|
---|
125 |
} |
---|
126 |
|
---|
127 |
} |
---|
128 |
|
---|
129 |
</script> |
---|
130 |
|
---|
131 |
</head> |
---|
132 |
|
---|
133 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" > |
---|
134 |
|
---|
135 |
<form name="treeviewform" method="post"> |
---|
136 |
|
---|
137 |
<table width="325" border="0" cellpadding="0" cellspacing="0"> |
---|
138 |
|
---|
139 |
<tr> |
---|
140 |
|
---|
141 |
<td height="25"><cwc2 type="JSList" JSSHAREDRESOURCE="WMSSERVERS" LabelField="title" ValueField="server_id" OnChange="myOnChange"> |
---|
142 |
|
---|
143 |
<option label="Select a WMS Server or Manage WMS Servers" value=""/> |
---|
144 |
|
---|
145 |
<option label="------------------------------------------------------------" value=""/> |
---|
146 |
|
---|
147 |
<option label="Manage WMS Servers ..." value="manage"/> |
---|
148 |
|
---|
149 |
</cwc2></td> |
---|
150 |
|
---|
151 |
</tr> |
---|
152 |
|
---|
153 |
<tr> |
---|
154 |
|
---|
155 |
<td><div class="rbevel1" id="Layer1" style="position:relative; width:325px; height:305px; overflow: scroll;"><cwc2 type="JSTreeView" JSSHAREDRESOURCE="WMSLAYERS" LEAFONCLICK="parent.myTreeClicked" NODEONCLICK="parent.myTreeClicked" NODEDATAFIELD="layer_id" NODELABELFIELD="title" NODEICONFIELD="icon" NODEICONOPENFIELD="iconopen" LEAFLABELFIELD="title" LEAFICONFIELD="icon" LEAFDATAFIELD="layer_id" NODECLASS="treeLink" LINKCLASS="treeLink" NODESELECTEDSTYLE="background-color:#e3f0f0;border-color:#b2c4c4;font-weight:bold" NODENORMALSTYLE="background-color:#ffffff;border-color:#ffffff;font-weight:normal"/></div></td> |
---|
156 |
|
---|
157 |
</tr> |
---|
158 |
|
---|
159 |
</table> |
---|
160 |
|
---|
161 |
</body> |
---|
162 |
|
---|
163 |
<script language="javascript" type="text/javascript">parent.goJSSR = goJSSR;</script> |
---|
164 |
|
---|
165 |
</form> |
---|
166 |
|
---|
167 |
</html> |
---|
168 |
|
---|