Project

General

Profile

« Previous | Next » 

Revision 3404

initial refactor of knp skin (w/fgdc support) to new sanparks skin

View differences:

lib/style/skins/sanparks/sanparks.cfg
1
#
2
# General configuration parameters
3
#
4
metacatUrl = http://@httpserver@@servlet-path@
5
username = uid=knpadmin,o=SANParks,dc=ecoinformatics,dc=org
6
password = testme
7
ldapUrl = @ldapUrl@
8
defaultScope = knp
9
organization = Kruger National Park
10
orgabbrev = KNP
11
orgurl = http://www.sanparks.org/
12
responseTemplate = @responseForm@
13
entryFormTemplate = @entryForm@
14
guideTemplate = @guide@
15
confirmDataTemplate = @confirmData@
16
deleteDataTemplate = @deleteData@
17
spatialRequired = false
18
temporalRequired = false
19
accesspubid = -//ecoinformatics.org//eml-access-2.0.0beta6//EN
20
accesssysid = eml-access.dtd
21
datasetpubid = eml://ecoinformatics.org/eml-dataset-2.0.0
22
datasetsysid = eml-dataset.dtd
23
mailhost = somewhere.sanparks.org
24
sender = registry@sanparks.org
25
recipient = judithk@sanparks.org
26
adminname = Judith Kruger
27
debug = 0
28
#
29
# These are the sites and their coordinates. Coordinates are in
30
# degrees:minutes:seconds:direction format
31
# Make sure there is a lat/lon pair for every site
32
#
33
# example format ...
34
# lat [UK] Harwood forest[Sitka Spruce] = 55:12:46:N
35
# lon [UK] Harwood forest[Sitka Spruce] = 2:2:15:W
0 36

  
lib/style/skins/sanparks/SaeonLogin.jspx
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3
    
4
    <!-- to change the content type or response encoding change the following line -->
5
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
6
    <jsp:directive.page import="edu.ucsb.nceas.metacat.clientview.ClientView"/>
7
    <jsp:directive.page import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper"/>
8
    <jsp:directive.page import="edu.ucsb.nceas.metacat.clientview.ClientHtmlHelper"/>
9
    
10
    <jsp:declaration>
11
        private ClientViewHelper            clientViewHelper = null;
12
    </jsp:declaration>
13
    
14
    
15
    <html xmlns="http://www.w3.org/1999/xhtml">
16
        <head>
17
            
18
            <script type="text/javascript">
19
                
20
                function allowSubmit(formObj) {
21
                    var     result = true;
22
                    var     action = "";
23

  
24
                    action = trim(formObj.elements["action"].value);
25
                    if (action == "Login") {
26
                        if (isEmpty(formObj.elements["username"])) {
27
                            result = false;
28
                            alert("User name is required");
29
                        } else if (isEmpty(formObj.elements["organization"])) {
30
                            result = false;
31
                            alert("Organization is required");
32
                        } else if (isEmpty(formObj.elements["password"])) {
33
                            result = false;
34
                            alert("Password is required");
35
                        }
36
                    }
37
                    
38
                    return(result);
39
                }
40
                
41
                function isEmpty(aTextField) {
42
                    var value = trim(aTextField.value);
43
                    var result = ((value.length == 0) || (value == null));
44
                    return(result);
45
                }
46

  
47
		function trim(stringToTrim) {
48
			return(stringToTrim.replace(/^\s+|\s+$/g,""));
49
		}
50
                
51
            </script>
52
            
53
            <title>SANParks - Kruger National Park Data Repository</title>
54
            <link href="sanparks.css" rel="stylesheet" type="text/css"/>
55
            
56
        </head>
57
        <body>
58
                <div class="templatecontentareaclass">
59
                    
60
                    <jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView"/>
61
                    <jsp:setProperty name="clientViewBean" property="*"/>
62
                    
63
                    <jsp:scriptlet>
64
                        clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
65
                        clientViewHelper.clientRequest(request, response);
66
                    </jsp:scriptlet>
67
                    
68
                    <li>Search for SANParks Data
69
                        <form name="searchform" method="post" action="../../../metacat" target="_top">
70
                            <jsp:include page="SimpleSearchMetacatPostFields.html"/>
71
                            <jsp:element name="input">
72
                                <jsp:attribute name="name">sessionid</jsp:attribute>
73
                                <jsp:attribute name="type">hidden</jsp:attribute>
74
                                <jsp:attribute name="value"><jsp:getProperty name="clientViewBean" property="sessionid"/></jsp:attribute>
75
                            </jsp:element>
76
                            <br/>
77
                            <p class="regtext">
78
                                <input name="anyfield" value="" type="text" size="14"/>
79
                                <input name="action" value="query" type="submit"/>
80
                                all fields, including author, title, abstract, keywords, and other documentation.
81
                                Use a '%' symbol as a wildcard (e.g., '%biodiversity%').
82
                            </p>
83
                        </form>
84
                        <br/>
85
                    </li>
86
                    
87
                    <li>Browse SANParks data sets
88
                        
89
                        <form name="browseform" method="post" action="../../../metacat" target="_top">
90
                            <jsp:include page="SimpleSearchMetacatPostFields.html"/>
91
                            <input name="anyfield" type="hidden" value="%" />
92
                            <jsp:element name="input">
93
                                <jsp:attribute name="name">sessionid</jsp:attribute>
94
                                <jsp:attribute name="type">hidden</jsp:attribute>
95
                                <jsp:attribute name="value"><jsp:getProperty name="clientViewBean" property="sessionid"/></jsp:attribute>
96
                            </jsp:element>
97
                            <br/>
98
                            <p class="regtext">
99
                                <input name="action" value="query" type="submit"/>
100
                                Browse all existing data sets by title.  This operation can be slow.
101
                            </p>
102
                        </form>
103
                        <br/>
104
                    </li>
105
                    
106
                    <jsp:scriptlet>
107
                        if (!clientViewHelper.isLoggedIn()) {
108
                    </jsp:scriptlet>
109
                    <li>Login
110
                        <form name="loginForm" method="post" action="SaeonLogin.jspx" onsubmit="return allowSubmit(this)">
111
                            <input name="qformat" type="hidden" value="sanparks"/>
112
                            <table>
113
                                <tr>
114
                                    <td>
115
                                        <span class="required">User name</span>
116
                                    </td>
117
                                    <td>
118
                                        <input name="username" type="text" value="" style="width: 140"/>
119
                                    </td>
120
                                    <td rowspan="3" class="regtext" align="right" valign="top" style="width: 160" >
121
                                        <div>
122
                                            <!-- TODO: Config param follows -->
123
                                            <a href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">create a new account</a>
124
                                        </div>
125
                                    </td>
126
                                </tr>
127
                                <tr>
128
                                    <td>
129
                                        <span class="required">Organization</span>
130
                                    </td>
131
                                    <td>
132
                                        <select name="organization" style="width: 140">
133
                                            <option value="SANParks" selected="">SANParks</option>
134
                                            <option value="SAEON">SAEON</option>
135
                                            <option value="NCEAS">NCEAS</option>
136
                                            <option value="unaffiliated">unaffiliated</option>
137
                                        </select>
138
                                    </td>
139
                                </tr>
140
                                <tr>
141
                                    <td>
142
                                        <span class="required">Password</span>
143
                                    </td>
144
                                    <td>
145
                                        <input name="password" value="" type="password" style="width: 140" maxlength="50"/>
146
                                    </td>
147
                                </tr>
148
                                <tr>
149
                                    <td colspan="2" align="center">
150
                                        <input name="action" value="Login" type="submit" class="button_login"/>
151
                                    </td>
152
                                </tr>
153
                            </table>
154
                        </form>
155
                        <jsp:scriptlet>
156
                            } else {
157
                        </jsp:scriptlet>
158
                        <form name="logoutForm" method="post" action="SaeonLogin.jspx">
159
                            <input name="qformat" value="sanparks" type="hidden"/>
160
                            <table>
161
                                <tr>
162
                                    <td>
163
                                        <p class="regtext">Account: <jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression></p>
164
                                    </td>
165
                                    <td rowspan="2" class="regtext" align="right" valign="top" style="width: 160" >
166
                                        <div>
167
                                            <!-- TODO: Config param follows -->
168
                                            <a href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass" target="_parent">reset your password</a>
169
                                        </div>
170
                                        <div>
171
                                            <!-- TODO: Config param follows -->
172
                                            <a href="http://localhost:8084/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass" target="_parent">change your password</a>
173
                                        </div>
174
                                    </td>
175
                                </tr>
176
                                <tr>
177
                                    <td align="center">
178
                                        <input name="action" type="submit" value="Logout" class="button_login"/>
179
                                    </td>
180
                                </tr>
181
                            </table>
182
                        </form>
183
                        <jsp:scriptlet>
184
                            }
185
                        </jsp:scriptlet>
186
                        
187
                        <!-- File Upload Form -->
188
                        <br/>
189
                        <jsp:scriptlet>
190
                            if (clientViewHelper.isLoggedIn()) {
191
                        </jsp:scriptlet>
192
                        <form action="SaeonUpload.jspx">
193
                            <li>Data Package Upload <input name="action" type="submit" value="Go" class="button_login"/></li>
194
                        </form>
195
                        <jsp:scriptlet>
196
                            } else {
197
                        </jsp:scriptlet>
198
                    </li>
199
                    <li>Data Package Upload
200
                        <br/>
201
                        <p class="regtext">
202
                            You must be logged into your user account before uploading a data set.
203
                        </p>
204
                    </li>
205
                    <jsp:scriptlet>
206
                        }
207
                    </jsp:scriptlet>
208
                </div>
209
        </body>
210
    </html>
211
</jsp:root>
0 212

  
lib/style/skins/sanparks/footer.jspx
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3
    
4
    <!-- to change the content type or response encoding change the following line -->
5
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
6
    
7
    <html>
8
        <body style="background: #7BB865;">
9
            <p>
10
                This project is a cooperative effort of 
11
                <a href="http://www.sanparks.org/">Kruger National Park (KNP)</a> and the 
12
                <a href="http://www.nceas.ucsb.edu">National Center for Ecological Analysis and Synthesis (NCEAS)</a>.
13
                The Data Repository is based on software developed by the 
14
                <a href="http://knb.ecoinformatics.org">Knowledge Network for Biocomplexity (KNB)</a>,
15
                and houses metadata that are compliant with 
16
                <a href="http://knb.ecoinformatics.org/software/eml/">Ecological Metadata Language (EML)</a>.
17
                Other sites contributing to the KNB repository include:
18
                <ul>
19
                    <li>
20
                        <a href="http://knb.ecoinformatics.org/knb/obfs">Organization of Biological Field Stations registry</a>  
21
                    </li>
22
                    <li>
23
                        <a href="http://knb.ecoinformatics.org/knb/style/skins/nrs">UC Natural Reserve System registry</a>  
24
                    </li>
25
                    <li>
26
                        <a href="http://knb.ecoinformatics.org/knb/style/skins/nceas">NCEAS registry</a>  
27
                    </li>
28
                    <li>
29
                        <a href="http://knb.ecoinformatics.org/knb/style/skins/specnet">SpecNet registry</a>  
30
                    </li>
31
                </ul>
32
            </p>
33
        </body>
34
    </html>
35
</jsp:root>
0 36

  
lib/style/skins/sanparks/sanparks.xml
1
<?xml version="1.0"?>
2
<style-set name="knp">
3
<!-- general login & search -->
4
  <default-style>@systemidserver@@style-common-path@/ascii-treeview.xsl</default-style>
5

  
6
  <doctype publicid="-//NCEAS//resultset//EN">
7
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/resultset.xsl</target>
8
  </doctype>
9

  
10
  <doctype publicid="-//NCEAS//login//EN">
11
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/sanparks/knp-login.xsl</target>
12
  </doctype>
13
  <doctype publicid="-//NCEAS//unauth_login//EN">
14
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/sanparks/knp-login.xsl</target>
15
  </doctype>
16

  
17
<!--
18
    ARE THESE STILL NEEDED????????????
19

  
20
  <doctype publicid="-//NCEAS//eml-generic//EN">
21
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/generic-morpho.xsl</target>
22
  </doctype>
23
-->
24

  
25

  
26
<!-- pre-beta6 modules -->
27
<!-- NOTE these settings are unchanged from the previous version - only the xsl 
28
     filename has changed from "eml-dataset-display.xsl" to "eml-dataset-2.0.0beta4.xsl" -->
29
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.1">
30
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.1/eml.xsl</target>
31
  </doctype>
32
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.0">
33
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.1/eml.xsl</target>
34
  </doctype>
35
  <doctype publicid="-//NCEAS//eml-dataset//EN">
36
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta4/eml-dataset-2.0.0beta4.xsl</target>
37
  </doctype>
38
  <doctype publicid="-//NCEAS//eml-dataset-2.0//EN">
39
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta4/eml-dataset-2.0.0beta4.xsl</target>
40
  </doctype>
41
  <doctype publicid="-//NCEAS//eml-resource//EN">
42
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta4/eml-dataset-2.0.0beta4.xsl</target>
43
  </doctype>
44
  <doctype publicid="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN">
45
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta4/eml-dataset-2.0.0beta4.xsl</target>
46
  </doctype>
47
<!-- beta6 modules -->
48
  <doctype publicid="-//ecoinformatics.org//eml-access-2.0.0beta6//EN">
49
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-access-2.0.0beta6.xsl</target>
50
  </doctype>
51
  <doctype publicid="-//ecoinformatics.org//eml-attribute-2.0.0beta6//EN">
52
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-attribute-2.0.0beta6.xsl</target>
53
  </doctype>
54
  <doctype publicid="-//ecoinformatics.org//eml-constraint-2.0.0beta6//EN">
55
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-constraint-2.0.0beta6.xsl</target>
56
  </doctype>
57
  <doctype publicid="-//ecoinformatics.org//eml-coverage-2.0.0beta6//EN">
58
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-coverage-2.0.0beta6.xsl</target>
59
  </doctype>
60
  <doctype publicid="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN">
61
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-dataset-2.0.0beta6.xsl</target>
62
  </doctype>
63
  <doctype publicid="-//ecoinformatics.org//eml-entity-2.0.0beta6//EN">
64
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-entity-2.0.0beta6.xsl</target>
65
  </doctype>
66
  <doctype publicid="-//ecoinformatics.org//eml-literature-2.0.0beta6//EN">
67
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-literature-2.0.0beta6.xsl</target>
68
  </doctype>
69
  <doctype publicid="-//ecoinformatics.org//eml-physical-2.0.0beta6//EN">
70
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-physical-2.0.0beta6.xsl</target>
71
  </doctype>
72
  <doctype publicid="-//ecoinformatics.org//eml-project-2.0.0beta6//EN">
73
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-project-2.0.0beta6.xsl</target>
74
  </doctype>
75
  <doctype publicid="-//ecoinformatics.org//eml-protocol-2.0.0beta6//EN">
76
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-protocol-2.0.0beta6.xsl</target>
77
  </doctype>
78
  <doctype publicid="-//ecoinformatics.org//eml-software-2.0.0beta6//EN">
79
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-software-2.0.0beta6.xsl</target>
80
  </doctype>
81

  
82
  <!-- NBII/FGDC styles -->
83
  <doctype publicid="metadata">
84
    <!--target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/fgdc/nbii-metacat.xsl</target-->
85
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/fgdc/fgdc_1.xsl</target>
86
  </doctype>
87
</style-set>
0 88

  
lib/style/skins/sanparks/header.jsp
1
<%@ page language="java" %>
2
<%
3
/*
4
'$RCSfile$'
5
Copyright: 2003 Regents of the University of California and the
6
National Center for Ecological Analysis and Synthesis
7
'$Author$'
8
'$Date$'
9
'$Revision$'
10
 
11
This program is free software; you can redistribute it and/or modify
12
it under the terms of the GNU General Public License as published by
13
the Free Software Foundation; either version 2 of the License, or
14
(at your option) any later version.
15
 
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
GNU General Public License for more details.
20
 
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24
*/
25
%>
26
<%@ include file="../../common/common-settings.jsp"%>
27
<!--____________________________max_width____________________________________-->
28

  
29
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
30
<html>
31
    <head>
32
        <title>SANParks - South African National Park Data Repository</title>
33
        <link rel="stylesheet" type="text/css" href="sanparks.css"/>
34
    </head>
35
    
36
    <body>
37
        <table width="760" border="0" cellspacing="0" cellpadding="0">
38
            <tr> 
39
                <td width="20%" rowspan="2"> 
40
                    <a href="http://www.sanparks.org/" target="_top"><img src="knp-logo.jpg"></a>
41
                </td>
42
                <td valign="middle" class="title">
43
                    SANParks - Kruger National Park Data Repository
44
                </td>
45
            </tr>
46
            
47
            <tr> 
48
                <td valign="top"> 
49
                    Welcome to the South African National Park Data Repository. This is the primary source for
50
                    comprehensive information about scientific and research data sets collected
51
                    within SANParks.
52
                </td>
53
            </tr>
54
        </table>
55
    </body>
56
</html>
0 57

  
lib/style/skins/sanparks/searchform.html
1
<form method="POST" action="@servlet-path@" target="_top">
2
Search for: 
3
  <input value="INTERSECT" name="operator" type="hidden">   
4
  <input size="14" name="anyfield" type="text" value="">
5
  <!-- <input name="organizationName" value="Kruger National Park" type="hidden"> -->
6
  <input name="action" value="query" type="hidden">
7
  <input name="qformat" value="sanparks" type="hidden">
8
  <input name="enableediting" value="false" type="hidden">
9
  <input name="operator" value="UNION" type="hidden">
10
  <input name="returnfield" value="originator/individualName/surName" type="hidden">
11
  <input name="returnfield" value="originator/individualName/givenName" type="hidden">
12
  <input name="returnfield" value="creator/individualName/surName" type="hidden">
13
  <input name="returnfield" value="creator/individualName/givenName" type="hidden">
14
  <input name="returnfield" value="originator/organizationName" type="hidden">
15
  <input name="returnfield" value="creator/organizationName" type="hidden">
16
  <input name="returnfield" value="dataset/title" type="hidden">
17
  <input name="returnfield" value="keyword" type="hidden">
18
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.1" type="hidden">
19
  <input name="returndoctype" value="eml://ecoinformatics.org/eml-2.0.0" type="hidden">
20
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" type="hidden">
21
  <input name="returndoctype" value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" type="hidden">
22
  <input name="returndoctype" value="-//NCEAS//resource//EN" type="hidden">
23
  <input name="returndoctype" value="-//NCEAS//eml-dataset//EN" type="hidden">
24
  <input value="Start Search" type="submit">
25
</form>
0 26

  
lib/style/skins/sanparks/spatial/pma.html
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2

  
3

  
4
<html>
5
<head>
6
<title>Metacat Spatial Option Demo</title>
7

  
8
<link rel="stylesheet" href="/style.css" type="text/css"/>
9
<link rel="stylesheet" href="./html.css" type="text/css"/>
10

  
11
<link href="../knp.css" type="text/css" rel="stylesheet"/>
12
<script src="../knp.js" type="text/JavaScript" language="Javascript"></script>
13

  
14
<link href="./map.css" type="text/css" rel="stylesheet"/>
15

  
16
<script src="../../../common/prototype.js" type="text/JavaScript" language="Javascript"></script>
17
<script src="../../../common/effects.js" type="text/JavaScript" language="Javascript"></script>
18

  
19
<script language="JavaScript">
20
          function submitform(action,form_ref) {
21
            form_ref.action.value=action;
22
            form_ref.sessionid.value="";
23
            form_ref.qformat.value="knp";
24
            form_ref.submit();
25
          }
26
</script>
27

  
28
<script type="text/javascript">
29
  var mbConfigUrl="africa_frame_config.xml";
30
</script>
31
<script type="text/javascript" src="../../../../spatial/mapbuilder/lib/Mapbuilder.js"></script>
32

  
33

  
34
<script language="JavaScript">
35
function show_map() {
36
	Element.show('mapControlHide')
37
	Element.hide('mapControlShow')
38

  
39
	// reset the map position in the iframe
40
	$("mapContainer").setAttribute("style", "right:-212px;");
41

  
42
	// expand the iframe
43
	var frm = top.getMapFrame();
44
	frm.setAttribute("style", "width:295px;right:0;");
45

  
46
	var element = $('mapContainer')
47
	new Effect.Move(element, { x: -212, y: 0, duration: 0.2})
48

  
49
	//setTimeout('$("mapContainer").setAttribute("style", "position:absolute;left:0;")', 300);
50

  
51
	//alert('moved');
52
	//do_move_anim(-260);
53
}
54

  
55
/*
56
 * Don't animate.  Just shrink the outer frame and make left:0.
57
 */
58
function hide_map() {
59
	Element.show('mapControlShow')
60
	Element.hide('mapControlHide')
61
	var element = $('mapContainer')
62
	//new Effect.Move(element, { x: 260, y: 0, duration: 0.1})
63
	$("mapContainer").setAttribute("style", "left:0px;");
64

  
65

  
66

  
67
	//alert('moved');
68
	//setTimeout('getElementsByClassName(top.document, "iframe", "iframeMap")[0].setAttribute("style", "width:35px;right:0;")', 200);
69

  
70
	// shrink the iframe
71
	var frm = top.getMapFrame();
72
	frm.setAttribute("style", "width:35px;right:-3px;");
73

  
74

  
75
	//alert('closed');
76
	//alert('now');
77
	//setTimeout('$("mapContainer").setAttribute("style", "left:0;")', 400);
78
	//$("mapContainer").setAttribute("style", "right:-212px;");
79
	//alert($("mapContainer").getAttribute("style"));
80
	//alert('adjusted');
81

  
82
	//do_move_anim(260);
83
}
84

  
85

  
86
//
87
// animate the drawer
88
//
89
function do_move_anim(xdelta) {
90

  
91
	var element = $('mapContainer')
92
	var old_right = Element.getStyle(element, 'right')
93
	//alert("right:" + old_right);
94
	old_right = old_right.substring(0,old_right.indexOf("px"));
95
	var new_right = old_right + xdelta;
96
	new_right = new_right + "px";
97
	new_right = "0px";
98
	var new_left;
99

  
100
	if (xdelta > 0) {
101
		// hide
102
		new_left = "0px";
103
		new_right = "0px";
104
	} else {
105
		// show
106
		new_left = "0px";
107
		new_right = "0px";
108
	}
109

  
110
	var newStyle = {
111
		left: new_left,
112
		right: new_right};
113
	Element.setStyle(element, newStyle);
114
		
115

  
116
	//alert(xdelta + ": " + Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
117
/*
118
*/
119
	//new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3})
120

  
121
	/*
122
	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
123
		afterFinishInternal: function(effect) { with(Element) {
124
			undoPositioned(effect.element); setStyle(effect.element, newStyle);	}}})
125
	new Effect.Move(element, { x: xdelta, y: 0, duration: 0.3, 
126
		afterFinishInternal: function(effect) { with(Element) {
127
			setStyle(effect.element, newStyle);	}}})
128
			*/
129

  
130
	//Element.setStyle(element, newStyle);
131

  
132

  
133

  
134
	//alert(Element.getStyle(element, 'left') + "=l R=" + Element.getStyle(element, 'right'));
135
}
136

  
137
function getElementsByClassName(oElm, strTagName, strClassName){
138
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
139
    var arrReturnElements = new Array();
140
    strClassName = strClassName.replace(/\-/g, "\\-");
141
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
142
    var oElement;
143
    for(var i=0; i<arrElements.length; i++){
144
        oElement = arrElements[i];      
145
        if(oRegExp.test(oElement.className)){
146
            arrReturnElements.push(oElement);
147
        }   
148
    }
149
    return (arrReturnElements)
150
}
151

  
152

  
153

  
154
</script>
155
</head>
156
<!--
157
 <body onload="document.location='/wms/GetCapabilities'">
158
 -->
159
<body onload="mbDoLoad()" style="background: #7BB865;">
160

  
161
<div id="mapContainer">
162

  
163
<table border="0" cellpadding="0" cellspacing="0">
164
	<tr>
165
    <td style="border-width:0;">
166
		<div id="mapControl">
167
			<div id="mapControlShow" style="display:none"><a href="#" onclick="show_map();return false;">&nbsp;</a></div>
168
			<div id="mapControlHide"><a href="#" onclick="hide_map();return false;">&nbsp;</a></div>
169
		</div>
170
    </td>
171
    <td valign="top">
172
		<table border="0" style="border: 1px solid #525d76;">
173
			<tr>
174
                        <!-- <td colspan="2" id="mainMapPane" style="background-color: white;" /> -->
175
                        <td colspan="2">
176
                          <div id="mainMapPane" style="background-color:white;" />
177
                          <div id="loading">
178
                           <p> Loading Map
179
                            <img src="../../../../spatial/mapbuilder/lib/skin/default/images/Loading.gif"/>
180
                           </p>
181
                         </div>
182
                        </td>
183

  
184
			</tr>
185
			<tr align="left">
186
				<td>
187

  
188
				<table border="0">
189
				  <tr>
190
					<!--<td align="center" id="mapScaleText"/>
191
							<td colspan="1"></td>
192
					<td align="center" id="cursorTrack" />-->
193
				  </tr>
194
						<tr> <td id="locatorMap" style="display:none"/> </tr>
195
						<tr> <td id="mainButtonBar" />  </tr>
196
						<tr> <td id="legend" valign="top"/> </tr> 
197
						<tr> <td colspan="3" id="featureList" /> </tr>
198
				</table>
199

  
200
				</td>
201
			</tr>
202
      
203
		</table>
204
		</td>
205
	</tr>
206
</table>
207
</div>
208

  
209
<div id="debug"></div>
210

  
211
</body>
212
</html>
0 213

  
lib/style/skins/sanparks/spatial/africa_frame_config.xml
1
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2
<MapbuilderConfig version="0.2.1" id="referenceTemplate" xmlns="http://mapbuilder.sourceforge.net/mapbuilder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mapbuilder.sourceforge.net/mapbuilder ../../mapbuilder/lib/schemas/config.xsd">
3
  <!--
4
    Description: This configuration file determines what components from the
5
                 Mapbuilder library are to be included in a Main Mapbuilder web
6
                 page.
7
    Licence:     GPL as per: http://www.gnu.org/copyleft/gpl.html 
8

  
9
    $Id$
10
  -->
11
  <!--
12
    All static images should be relative to this URL.
13
    This dir is relative the dir of the main html file.
14
  -->
15
  <models>
16
    <Context id="mainMap">
17
      <defaultModelUrl>africa_frame_model.xml</defaultModelUrl>
18
      <widgets>
19
        <Loading id="loading"/>
20
        <Loading2 id="loading2">
21
            <mapContainerId>mainMapPane</mapContainerId>
22
        </Loading2>
23

  
24
        <MapPane id="mainMapWidget">
25
          <htmlTagId>mainMapPane</htmlTagId>
26
          <mapContainerId>mainMapContainer</mapContainerId>
27
        </MapPane>
28
        <AoiBoxWZ id="aoiBox2">
29
          <htmlTagId>mainMapPane</htmlTagId>
30
          <stylesheet>../../../../spatial/mapbuilder/lib/widget/GmlRenderer.xsl</stylesheet>
31
          <lineColor>#FF0000</lineColor>
32
          <lineWidth>1</lineWidth>
33
          <crossSize>15</crossSize>
34
          <mapContainerId>mainMapContainer</mapContainerId>
35
        </AoiBoxWZ>
36
        <!-- <CursorTrack id="cursorTrack">
37
          <mouseHandler>mainMap</mouseHandler>
38
        </CursorTrack> -->
39
        <Legend id="legend">
40
        </Legend>
41
        <MapScaleText id="mapScaleText">
42
        </MapScaleText>
43
      </widgets>
44
      <tools>
45
        <AoiMouseHandler id="mainAoi"/>
46
        <DragPanHandler id="mainDragPan">
47
          <enabled>false</enabled>
48
        </DragPanHandler>
49
        <MouseClickHandler id="mainMouseClick"/>
50
      </tools>
51
    </Context>
52
    
53
    <Context id="locator">
54
      <defaultModelUrl>africa_frame_model.xml</defaultModelUrl>
55
      <widgets>
56
        <MapPane id="locatorWidget">
57
          <htmlTagId>locatorMap</htmlTagId>
58
          <targetModel>mainMap</targetModel>
59
          <mapContainerId>locatorContainer</mapContainerId>
60
          <fixedWidth>180</fixedWidth>
61
        </MapPane>
62
        <AoiBoxWZ id="aoiBox2">
63
          <htmlTagId>locatorMap</htmlTagId>
64
          <stylesheet>../../../../spatial/mapbuilder/lib/widget/GmlRenderer.xsl</stylesheet>
65
          <lineColor>#FF0000</lineColor>
66
          <lineWidth>1</lineWidth>
67
          <crossSize>15</crossSize>
68
          <mapContainerId>locatorContainer</mapContainerId>
69
        </AoiBoxWZ>
70
      </widgets>
71
      <tools>
72
        <AoiMouseHandler id="locatorAoi"/>
73
        <ZoomToAoi id="locatorZoomToAoi">
74
          <targetModel>mainMap</targetModel>
75
        </ZoomToAoi>
76
      </tools>
77
    </Context>
78

  
79
    <Transaction id="transaction">
80
      <widgets>
81
        <TransactionResponse id="transactionResponse">
82
        </TransactionResponse>
83
      </widgets>
84
    </Transaction>
85
    <FeatureCollection id="featureCollection">
86
      <namespace>xmlns:gml='http://www.opengis.net/gml' xmlns:wfs='http://www.opengis.net/wfs' xmlns:topp='http://www.openplans.org/topp'</namespace>
87
      <widgets>
88
        <GmlRendererWZ id="testGmlRenderer">
89
          <htmlTagId>mainMapPane</htmlTagId>
90
          <targetModel>mainMap</targetModel>
91
          <mapContainerId>mainMapContainer</mapContainerId>
92
          <lineColor>#FF0000</lineColor>
93
          <lineWidth>1</lineWidth>
94
          <pointDiameter>10</pointDiameter>
95
        </GmlRendererWZ>
96
        <FeatureList id="featureList">
97
        </FeatureList>
98
      </widgets>
99
    </FeatureCollection>
100
  </models>
101
  <widgets>
102
    <ZoomIn id="zoomIn">
103
      <buttonBar>mainButtonBar</buttonBar>
104
      <targetModel>mainMap</targetModel>
105
      <mouseHandler>mainAoi</mouseHandler>
106
      <class>RadioButton</class>
107
      <selected>true</selected>
108
      <enabledSrc>/images/ZoomInEnable.png</enabledSrc>
109
      <disabledSrc>/images/ZoomInDisable.png</disabledSrc>
110
      <tooltip xml:lang="en">click map or drag to zoom in</tooltip>
111
      <!--tooltip xml:lang="fr">cliquer et faire glisser la souris pour agrandir</tooltip-->
112
    </ZoomIn>
113
    <ZoomOut id="zoomOut">
114
      <buttonBar>mainButtonBar</buttonBar>
115
      <targetModel>mainMap</targetModel>
116
      <mouseHandler>mainAoi</mouseHandler>
117
      <class>RadioButton</class>
118
      <enabledSrc>/images/ZoomOutEnable.png</enabledSrc>
119
      <disabledSrc>/images/ZoomOutDisable.png</disabledSrc>
120
      <tooltip xml:lang="en">click map to zoom out</tooltip>
121
      <!--tooltip xml:lang="fr">cliquer pour rée</tooltip-->
122
    </ZoomOut>
123
    <DragPan id="dragPan">
124
      <buttonBar>mainButtonBar</buttonBar>
125
      <targetModel>mainMap</targetModel>
126
      <mouseHandler>mainDragPan</mouseHandler>
127
      <class>RadioButton</class>
128
      <enabledSrc>/images/PanEnable.png</enabledSrc>
129
      <disabledSrc>/images/PanDisable.png</disabledSrc>
130
      <tooltip xml:lang="en">click and drag to pan</tooltip>
131
      <!--tooltip xml:lang="fr">cliquer et faire glisser la souris pour voir un autre parti de la carte</tooltip-->
132
    </DragPan>
133
    <Reset id="reset">
134
      <buttonBar>mainButtonBar</buttonBar>
135
      <targetModel>mainMap</targetModel>
136
      <class>Button</class>
137
      <disabledSrc>/images/ResetExtentDisable.png</disabledSrc>
138
      <tooltip xml:lang="en">reset the map to full extent</tooltip>
139
      <!--tooltip xml:lang="fr">redonner la carte ses dimensions complèts</tooltip-->
140
    </Reset>
141

  
142
	<!--
143
    <EditPoint id="editPoint">
144
      <buttonBar>mainButtonBar</buttonBar>
145
      <mouseHandler>mainMouseClick</mouseHandler>
146
      <class>RadioButton</class>
147
      <enabledSrc>/images/EditPointEnable.png</enabledSrc>
148
      <disabledSrc>/images/EditPointDisable.png</disabledSrc>
149
      <tooltip xml:lang="en">click on map to create a point feature</tooltip>
150
      <tooltip xml:lang="fr">click on map to create a point feature</tooltip>
151
      <targetModel>featureCollection</targetModel>
152
      <transactionResponseModel>transaction</transactionResponseModel>
153
      <webServiceUrl>../../../../wfs</webServiceUrl>
154
      <featureXpath>/gml:featureMember/topp:metacat_testdata/topp:the_geom/gml:Point/gml:coordinates</featureXpath>
155
      <featureXpath>/gml:featureMember/topp:metacat_testdata/topp:ID</featureXpath>
156
      <defaultModelUrl>template_metacat.xml</defaultModelUrl>
157
      <targetContext>mainMap</targetContext>
158
    </EditPoint>
159
    -->
160

  
161
    <!-- <GetFeatureInfo id="getFeatureInfo">
162
      <buttonBar>mainButtonBar</buttonBar>
163
       <targetModel>mainMap</targetModel>
164
      <context>mainMap</context>
165
       <mouseHandler>mainAoi</mouseHandler>
166
      <class>RadioButton</class>
167
    <enabledSrc>/images/QueryEnable.png</enabledSrc>
168
    <disabledSrc>/images/QueryDisable.png</disabledSrc>
169
	  <tooltip xml:lang="en">select single dataset</tooltip>
170
    </GetFeatureInfo> -->
171

  
172
  <!--SetAoi id="setAoi">
173
  <buttonBar>mainButtonBar</buttonBar>
174
  <targetModel>mainMap</targetModel>
175
  <mouseHandler>mainAoi</mouseHandler>
176
  <class>RadioButton</class>
177
  <enabledSrc>/images/SetAoiEnable.png</enabledSrc>
178
  <disabledSrc>/images/SetAoiDisable.png</disabledSrc>
179
  </SetAoi-->
180

  
181
  <AoiMetacatQuery id="aoiMetacatQuery">
182
      <buttonBar>mainButtonBar</buttonBar>
183
      <targetModel>mainMap</targetModel>
184
      <mouseHandler>mainAoi</mouseHandler>
185
      <class>RadioButton</class>
186
      <enabledSrc>/images/QueryEnable.png</enabledSrc>
187
      <disabledSrc>/images/QueryDisable.png</disabledSrc>
188
      <tooltip xml:lang="en">select multiple datasets</tooltip>
189
      <metacat>../../../../metacat</metacat>
190
      <skin>knp</skin>
191
      <pixel_tolerance>5</pixel_tolerance>
192
  </AoiMetacatQuery>
193
  
194
  </widgets>
195
  <skinDir>../../../../spatial/mapbuilder/lib/skin/default</skinDir>
196
  <!-- Url of LOCAL redirection script, required to access external URLs -->
197
  <proxyUrl>../../proxy.jsp</proxyUrl>
198
  <!-- 
199
  <serializeUrl>../../../../spatial/mapbuilder/writeXml</serializeUrl>
200
   -->
201
</MapbuilderConfig>
202

  
0 203

  
lib/style/skins/sanparks/spatial/map.css
1
 /*
2
  *   '$RCSfile$'
3
  *     Purpose: Default style sheet for KNB project web pages 
4
  *              Using this stylesheet rather than placing styles directly in 
5
  *              the KNB web documents allows us to globally change the 
6
  *              formatting styles of the entire site in one easy place.
7
  *   Copyright: 2000 Regents of the University of California and the
8
  *               National Center for Ecological Analysis and Synthesis
9
  *     Authors: Matt Jones
10
  *
11
  *    '$Author$'
12
  *      '$Date$'
13
  *  '$Revision$'
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
  * it under the terms of the GNU General Public License as published by
17
  * the Free Software Foundation; either version 2 of the License, or
18
  * (at your option) any later version.
19
  *
20
  * This program is distributed in the hope that it will be useful,
21
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
  * GNU General Public License for more details.
24
  *
25
  * You should have received a copy of the GNU General Public License
26
  * along with this program; if not, write to the Free Software
27
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28
  */
29
#mapContainer {
30
    position: absolute;
31
    right: 0px;
32
    top: 0px;
33
}
34

  
35
#mapControl {
36
	height: 48px;
37
	width: 31px;
38
}
39

  
40
div#mapControlHide,
41
div#mapControlShow {
42
	width: 100%;
43
	height: 100%;
44
	vertical-align: center;
45
}
46

  
47
div#mapControl a {
48
	display: block;
49
	margin: 0; padding:0;
50
	width:100%;
51
	height:100%;
52
	overflow:hidden;
53
	text-decoration:none;
54
}
55

  
56

  
57
div#mapControlShow {
58
	background: transparent url(../images/show_map.gif) no-repeat bottom left;
59
}
60

  
61
div#mapControlHide {
62
	background: transparent url(../images/hide_map.gif) no-repeat bottom left;
63
}
64

  
65
div#mapControlShow a {
66
	background: transparent url(../show_map.gif) no-repeat top left;
67
	text-decoration:none;
68
}
69
div#mapControlHide a {
70
	background: transparent url(../hide_map.gif) no-repeat top left;
71
	text-decoration:none;
72
}
73

  
74
div#mapControlShow a:hover {
75
	background:none;
76
	text-decoration: none;
77
}
78

  
79
div#mapControlHide a:hover {
80
	background:none;
81
	text-decoration: none;
82
}
83

  
0 84

  
lib/style/skins/sanparks/spatial/html.css
1
h2 {
2
  color: red;
3
  background-color: silver;
4
}
5

  
6

  
7
INPUT.bareinput {
8
  border: 0px blue none;
9
  font: 8pt Verdana, geneva, arial, sans-serif;
10
  color: #000000;
11
  background-color: transparent;
12
}
13

  
14
#mainMapContainer {
15
  border: 1px solid olive;
16
  cursor: crosshair;
17
  text-align: left;
18
  background-color: white;
19
}
20

  
21
#legend td {
22
	/*
23
  font-size: 70%; 
24
  font-family: cursive;
25
  background-color: silver;
26
  */
27
  font: 11pt arial, sans-serif;
28
  color: #000;
29
}
30

  
31

  
32
img#query_topp\:metacat_testdata { display:none; }
33

  
0 34

  
lib/style/skins/sanparks/spatial/africa_frame_model.xml
1
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
2
<ViewContext version="1.0.0" id="atlas_world"
3
xmlns="http://www.opengis.net/context"
4
xmlns:xlink="http://www.w3.org/1999/xlink"
5
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd">
7
  <General>
8
    <Window width="250" height="417" />
9
    <!-- <BoundingBox SRS="EPSG:4326" minx="30.5912" miny="-25.535" maxx="32.3037" maxy="-22.325" /> -->
10
    <BoundingBox SRS="EPSG:4326" minx="30" miny="-26.5" maxx="33" maxy="-21.5"/>
11
    <Title>Krueger National Park</Title>
12
    <KeywordList>
13
      <Keyword>metacat</Keyword>
14
      <Keyword>EML</Keyword>
15
    </KeywordList>
16
    <Abstract>Low resolution.</Abstract>
17
  </General>
18
  <LayerList>
19
    
20
    <Layer queryable="0" hidden="1">
21
    <Server service="wms" version="1.1.0" title="wms">
22
    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"  xlink:type="simple" xlink:href="http://wms.jpl.nasa.gov/wms.cgi?"/>
23
    </Server>
24
    <Name>global_mosaic</Name> 
25
    <!-- <Name>BMNG</Name> -->
26
    <Title>satellite imagery</Title>
27
    <SRS>EPSG:4326</SRS>
28
    <FormatList>
29
    <Format current="1">image/jpeg</Format>
30
    </FormatList>
31
    </Layer>
32
   
33
    <Layer queryable="0" hidden="0">
34
      <Server service="OGC:WMS" version="1.1.1"
35
      title="kruger boundary">
36
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
37
      </Server>
38
      <Name>knp:SOILS_VENTER</Name>
39
      <Title>Kruger soils</Title>
40
      <SRS>EPSG:4326</SRS>
41
      <FormatList>
42
        <Format current="1">image/png</Format>
43
      </FormatList>
44
    </Layer>
45

  
46
    <Layer queryable="0" hidden="0">
47
      <Server service="OGC:WMS" version="1.1.1"
48
      title="kruger boundary">
49
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
50
      </Server>
51
      <Name>knp:INFRA_ROADSPUBLIC_VIEW</Name>
52
      <Title>Kruger Park roads</Title>
53
      <SRS>EPSG:4326</SRS>
54
      <FormatList>
55
        <Format current="1">image/png</Format>
56
      </FormatList>
57
    </Layer>
58
	
59
    <Layer queryable="0" hidden="0">
60
      <Server service="OGC:WMS" version="1.1.1"
61
      title="kruger boundary">
62
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
63
      </Server>
64
      <Name>knp:BNDRY_BUSINESSUNITS</Name>
65
      <Title>Kruger Park business units</Title>
66
      <SRS>EPSG:4326</SRS>
67
      <FormatList>
68
        <Format current="1">image/png</Format>
69
      </FormatList>
70
    </Layer>
71
   
72
    
73
    <Layer queryable="0" hidden="0">
74
      <Server service="OGC:WMS" version="1.1.1"
75
      title="kruger boundary">
76
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
77
      </Server>
78
      <Name>knp:BNDRY_KRUGERNP</Name>
79
      <Title>Kruger Park boundaries</Title>
80
      <SRS>EPSG:4326</SRS>
81
      <FormatList>
82
        <Format current="1">image/png</Format>
83
      </FormatList>
84
    </Layer>
85

  
86
    <Layer queryable="0" hidden="0">
87
      <Server service="OGC:WMS" version="1.1.1"
88
      title="DatasetBounds">
89
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
90
      </Server>
91
      <Name>metacat:data_bounds</Name>
92
      <Title>Dataset Bounds</Title>
93
      <SRS>EPSG:4326</SRS>
94
      <FormatList>
95
        <Format current="1">image/gif</Format>
96
      </FormatList>
97
    </Layer>
98

  
99

  
100
    <Layer queryable="0" hidden="0">
101
      <Server service="OGC:WMS" version="1.1.1"
102
      title="DatasetPoints">
103
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
104
      </Server>
105
      <Name>metacat:data_points</Name>
106
      <Title>Dataset Points</Title>
107
      <SRS>EPSG:4326</SRS>
108
      <FormatList>
109
        <Format current="1">image/gif</Format>
110
      </FormatList>
111
    </Layer>
112

  
113
    <!-- <Layer queryable="1" hidden="0">
114
      <Server service="OGC:WMS" version="1.1.1"
115
      title="Datasets">
116
        <OnlineResource xlink:type="simple" xlink:href="../../../../wms" />
117
      </Server>
118
      <Name>metacat:metacat_testdata</Name>
119
      <Title>Datasets</Title>
120
      <SRS>EPSG:4326</SRS>
121
      <FormatList>
122
        <Format current="1">image/png</Format>
123
      </FormatList>
124
    </Layer> -->
125
    
126
  </LayerList>
127
</ViewContext>
0 128

  
lib/style/skins/sanparks/SaeonUpload.jspx
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
4
    <jsp:directive.page import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper"/>
5
    <jsp:directive.page import="edu.ucsb.nceas.metacat.clientview.ClientView"/>
6
    
7
    <jsp:declaration>
8
        private ClientViewHelper            clientViewHelper;
9
    </jsp:declaration>
10
    
11
    <html xmlns="http://www.w3.org/1999/xhtml">
12
        <head>
13
            <script type="text/javascript">
14
                function allowUploadSubmit(formObj) {
15
                    var     result = true;
16

  
17
                    if (isEmpty(formObj.elements["metaFileName"])) {
18
                        result = false;
19
                        alert("Metadata file name is required");
20
                    }
21
                    return(result);
22
                }
23
                
24
                function isEmpty(aTextField) {
25
                    var value = trim(aTextField.value);
26
                    var result = ((value.length == 0) || (value == null));
27
                    return(result);
28
                }
29

  
30
		function trim(stringToTrim) {
31
			return(stringToTrim.replace(/^\s+|\s+$/g,""));
32
		}
33
            </script>
34
            
35
            <jsp:scriptlet>
36
                clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
37
            </jsp:scriptlet>
38
        </head>    
39
        <body>
40
            <jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView"/>
41
            <jsp:setProperty name="clientViewBean" property="*"/>
42
            <p>Data Package Upload</p>
43
            <p>
44
                <jsp:scriptlet>
45
                    clientViewHelper.clientRequest(request, response);
46
                    if (clientViewHelper.isLoggedIn()) {
47
                </jsp:scriptlet>
48
                <form name="uploadForm" method="post" action="SaeonUpload.jspx" enctype="multipart/form-data" onsubmit="return allowUploadSubmit(this)">
49
                    <input name="returnfield" type="hidden" value="distinfo/stdorder/digform/digtopt/onlinopt/computer/networka/networkr"/>
50
                    <input name="pathExpr" type="hidden" value="/metadata/distinfo/resdesc"/>
51
                    
52
                    <!-- Set the pathValue to the username (the scope) -->
53
                    <jsp:element name="input">
54
                        <jsp:attribute name="name">pathValue</jsp:attribute>
55
                        <jsp:attribute name="type">hidden</jsp:attribute>
56
                        <jsp:attribute name="value"><jsp:getProperty name="clientViewBean" property="username"/></jsp:attribute>
57
                    </jsp:element>
58
                    
59
                    <table bgcolor="WhiteSmoke">
60
                        <tr>
61
                            <td colspan="2">
62
                                <p class="regtext">Enter the Meta Data File (required) &#xa0;&#xa0;&#xa0;
63
                                    <input name="publicAccess" type="checkbox" checked=''/> Grant public read access
64
                                </p>
65
                            </td>
66
                        </tr>
67
                        <tr>
68
                            <td>
69
                                <input name="metaFileName" accept="xml" type="file" size="60" value="" />
70
                            </td>
71
                        </tr>
72
                        <!-- Data fields -->
73
                        <tr>
74
                            <td colspan="2">
75
                                <p class="regtext">Enter Data File 1 (optional)</p>
76
                            </td>
77
                        </tr>
78
                        <tr>
79
                            <td colspan="2">
80
                                <input name="dataFileName" type="file" size="60" />
81
                            </td>
82
                        </tr>
83
                        <tr>
84
                            <td colspan="2">
85
                                <p class="regtext">Enter Data File 2 (optional)</p>
86
                            </td>
87
                        </tr>
88
                        <tr>
89
                            <td colspan="2">
90
                                <input name="dataFileName" type="file" size="60" />
91
                            </td>
92
                        </tr>
93
                        <tr>
94
                            <td colspan="2">
95
                                <p class="regtext">Enter Data File 3 (optional)</p>
96
                            </td>
97
                        </tr>
98
                        <tr>
99
                            <td colspan="2">
100
                                <input name="dataFileName" type="file" size="60" />
101
                            </td>
102
                        </tr>
103
                        <tr>
104
                            <td colspan="2">
105
                                <p class="regtext">Enter Data File 4 (optional)</p>
106
                            </td>
107
                        </tr>
108
                        <tr>
109
                            <td colspan="2">
110
                                <input name="dataFileName" type="file" size="60" />
111
                            </td>
112
                        </tr>
113
                        <tr>
114
                            <td colspan="2">
115
                                <p class="regtext">Enter Data File 5 (optional)</p>
116
                            </td>
117
                        </tr>
118
                        <tr>
119
                            <td colspan="2">
120
                                <input name="dataFileName" type="file" size="60" />
121
                            </td>
122
                        </tr>
123
                        <tr>
124
                            <td align="left">
125
                                <span class="regtext"><jsp:expression>clientViewBean.getMessage(ClientView.UPLOAD_MESSAGE)</jsp:expression></span>
126
                            </td>
127
                            <td align="right">
128
                                <input name="action" value="Upload" type="submit" class="button_login"/>
129
                            </td>
130
                        </tr>
131
                    </table>
132
                </form>
133
                
134
                <jsp:scriptlet>
135
                    } else {
136
                </jsp:scriptlet>
137
                <span class="regtext">
138
                    You must be logged into your user account before uploading a data set.
139
                </span>
140
                <jsp:scriptlet>
141
                    }
142
                </jsp:scriptlet>
143
                <p class="regtext">
144
                    <form action="SaeonLogin.jspx">
145
                        <button name="action" type="submit" class="button_login">
146
                            <img alt="back" src="images/left_arrow.gif" align="middle"/>Back
147
                        </button>
148
                    </form>
149
                </p>
150
            </p>
151
        </body>
152
    </html>
153
</jsp:root>
0 154

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff