Revision 2471
Added by Duane Costa over 19 years ago
lib/style/skins/lter/lter.js | ||
---|---|---|
1 |
/* |
|
2 |
* Purpose: LTER style sheet for KNB project web pages |
|
3 |
* Using this stylesheet rather than placing styles directly in |
|
4 |
* the KNB web documents allows us to globally change the |
|
5 |
* formatting styles of the entire site in one easy place. |
|
6 |
* Copyright: 2000 Regents of the University of California and the |
|
7 |
* National Center for Ecological Analysis and Synthesis |
|
8 |
* Authors: Matt Jones |
|
9 |
* |
|
10 |
* '$Author$' |
|
11 |
* '$Date$' |
|
12 |
* '$Revision$' |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or modify |
|
15 |
* it under the terms of the GNU General Public License as published by |
|
16 |
* the Free Software Foundation; either version 2 of the License, or |
|
17 |
* (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
27 |
*/ |
|
28 |
|
|
29 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|
30 |
* * * * * * CONFIGURATION SETTINGS - EDIT THESE FOR YOUR ENVIRONMENT * * * * |
|
31 |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
32 |
|
|
33 |
|
|
34 |
// These settings allow you to include and display common content (eg a common |
|
35 |
// header) on all your pages, in much the same way as a frameset allows you to |
|
36 |
// do, but through the use of iframes and a table instead. You can include up |
|
37 |
// to 4 external pages, each one within the header, footer, left or right areas |
|
38 |
// |
|
39 |
// looks like this (if you're using a fixed width font to display these notes): |
|
40 |
// ___________________ |
|
41 |
// | header | |
|
42 |
// |-----------------| |
|
43 |
// | | | | |
|
44 |
// | | | | |
|
45 |
// |L| content |R| |
|
46 |
// | | | | |
|
47 |
// | | | | |
|
48 |
// |-----------------| |
|
49 |
// | footer | |
|
50 |
// ------------------- |
|
51 |
// |
|
52 |
// Each area may display another page on the local site, or a page on a |
|
53 |
// different server, or may be set to display nothing (in which case an iframe |
|
54 |
// will not be drawn, although the containing table cell will still need to be |
|
55 |
// resized using the css style - see below) |
|
56 |
// |
|
57 |
// NOTES: |
|
58 |
// |
|
59 |
// 1) if you have any links in the included documents, the target attribute for |
|
60 |
// these *MUST* be set to _top, otherwise the new document will be displayed |
|
61 |
// inside the small iframe areas, instead of replacing the entire page! |
|
62 |
// - example: <a href="index.html" target="_top">HOME</a> |
|
63 |
// |
|
64 |
// 2) you will need to set the correct iframe size, in order to accomodate |
|
65 |
// each of these areas on the page. The default location for these size |
|
66 |
// settings is in the default.css file - see the "IFRAME_XXXXXX_CLASS" |
|
67 |
// variables (below) for the name of the style to edit |
|
68 |
// |
|
69 |
// 3) you will also need to set the correct table cell sizes and/or overall |
|
70 |
// table size for similar reasons. The default location for these size |
|
71 |
// settings is in the default.css file - see the "TEMPLATE_XXXXXX_CLASS" |
|
72 |
// variables (below) for the name of the style to edit |
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
//////////////////////////////////////////////////////////////////////////////// |
|
77 |
// Edit these variables to define the content that will be loaded into the |
|
78 |
// various iframes. Each may be a relative path to another page on the local |
|
79 |
// site, or a full URL to a page on a remote server, or may be set to the empty |
|
80 |
// string if no content is required at that position on the page (and in which |
|
81 |
// case an iframe will not be drawn, although an empty table cell will still |
|
82 |
// exist unless it is resized smaller) . |
|
83 |
// ( e.g. if you do not want a header to be included, set: HEADER_URL="";) |
|
84 |
//////////////////////////////////////////////////////////////////////////////// |
|
85 |
|
|
86 |
|
|
87 |
// Location of the header that will be displayed at the top of the page |
|
88 |
var HEADER_URL |
|
89 |
= "@style-skins-path@/lter/include_header.jsp"; |
|
90 |
|
|
91 |
// Location of the search box that will be displayed above the |
|
92 |
// results on the results page (optional) |
|
93 |
var SEARCHBOX_URL |
|
94 |
= "@style-skins-path@/lter/include_searchbox.jsp"; |
|
95 |
|
|
96 |
var LOGINBOX_URL |
|
97 |
= "@style-skins-path@/lter/include_login.jsp"; |
|
98 |
|
|
99 |
// Location of the header that will be displayed at the top of the page |
|
100 |
var LEFTCOL_URL |
|
101 |
= ""; |
|
102 |
|
|
103 |
// Location of the header that will be displayed at the top of the page |
|
104 |
var RIGHTCOL_URL |
|
105 |
= ""; |
|
106 |
|
|
107 |
// Location of the header that will be displayed at the top of the page |
|
108 |
var FOOTER_URL |
|
109 |
= ""; |
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
115 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
116 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
117 |
/* * * * * * * * * MAY CHANGE THE FOLLOWING, BUT SHOULDN'T NEED TO* * * * * */ |
|
118 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
119 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
120 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
|
121 |
|
|
122 |
|
|
123 |
//////////////////////////////////////////////////////////////////////////////// |
|
124 |
// Edit the default.css file to set the correct iframe sizes to accomodate the |
|
125 |
// header, footer, left and right areas. |
|
126 |
// The following variables set the names of the styles that will be applied to |
|
127 |
// each of the iframes - they can be anythign you wish, provided you use the |
|
128 |
// same names for your classes in the css file |
|
129 |
// NOTE: these styles apply only to each container frame, *NOT* to the document |
|
130 |
// within it! |
|
131 |
//////////////////////////////////////////////////////////////////////////////// |
|
132 |
|
|
133 |
//header iframe class |
|
134 |
var IFRAME_HEADER_CLASS = "iframeheaderclass"; |
|
135 |
|
|
136 |
//(metacat only) search box iframe class |
|
137 |
var IFRAME_SEARCHBOX_CLASS = "iframesearchboxclass"; |
|
138 |
|
|
139 |
//(metacat only) login box iframe class |
|
140 |
var IFRAME_LOGINBOX_CLASS = "iframeloginboxclass"; |
|
141 |
|
|
142 |
//left column iframe class |
|
143 |
var IFRAME_LEFTCOL_CLASS = "iframeleftcolclass"; |
|
144 |
|
|
145 |
//right column iframe class |
|
146 |
var IFRAME_RIGHTCOL_CLASS = "iframerightcolclass"; |
|
147 |
|
|
148 |
//footer iframe class |
|
149 |
var IFRAME_FOOTER_CLASS = "iframefooterclass"; |
|
150 |
|
|
151 |
|
|
152 |
//////////////////////////////////////////////////////////////////////////////// |
|
153 |
// Edit the default.css file to set the correct table sizes to accomodate the |
|
154 |
// header, footer, left and right iframes. |
|
155 |
// The following variables set the names of the styles that will be applied to |
|
156 |
// each of the table cells (or the table itself - see below) - they can be |
|
157 |
// anything you wish, provided you use the same names for your classes in the |
|
158 |
// css file |
|
159 |
// NOTE: these styles apply only to each table cell, *NOT* to the document |
|
160 |
// inside the iframe that is nested within it! (the exception is |
|
161 |
// TEMPLATE_CONTENTAREA_CLASS, since the content probably isn't within an |
|
162 |
// iframe - so style elements in this class will apply to the content istelf) |
|
163 |
//////////////////////////////////////////////////////////////////////////////// |
|
164 |
|
|
165 |
//entire table class |
|
166 |
var TEMPLATE_TABLE_CLASS = "templatetableclass"; |
|
167 |
|
|
168 |
//header table-cell class. Note you should not set css "width" on this, since it |
|
169 |
//includes a colspan |
|
170 |
var TEMPLATE_HEADERROW_CLASS = "templateheaderrowclass"; |
|
171 |
|
|
172 |
//left column table-cell class. Note that restricting css "height" on this may |
|
173 |
//affect visibility of the main content, since it's in the same table row |
|
174 |
var TEMPLATE_LEFTCOL_CLASS = "templateleftcolclass"; |
|
175 |
|
|
176 |
//main central content table-cell class. Note that css attributes set here may |
|
177 |
//apply to the content nested inside this cell |
|
178 |
var TEMPLATE_CONTENTAREA_CLASS = "templatecontentareaclass"; |
|
179 |
|
|
180 |
//rigth column table-cell class. Note that restricting css "height" on this may |
|
181 |
//affect visibility of the main content, since it's in the same table row |
|
182 |
var TEMPLATE_RIGHTCOL_CLASS = "templaterightcolclass"; |
|
183 |
|
|
184 |
//footer table-cell class. Note you should not set "width" on this, since it |
|
185 |
//includes a colspan |
|
186 |
var TEMPLATE_FOOTERROW_CLASS = "templatefooterrowclass"; |
|
187 |
|
|
188 |
|
|
0 | 189 |
lib/style/skins/lter/index.jsp | ||
---|---|---|
1 |
<%@ page language="java" %> |
|
2 |
<% |
|
3 |
/** |
|
4 |
* '$RCSfile$' |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* |
|
9 |
* '$Author$' |
|
10 |
* '$Date$' |
|
11 |
* '$Revision$' |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or modify |
|
14 |
* it under the terms of the GNU General Public License as published by |
|
15 |
* the Free Software Foundation; either version 2 of the License, or |
|
16 |
* (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
26 |
* |
|
27 |
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to |
|
28 |
* convert an XML file showing the resultset of a query |
|
29 |
* into an HTML format suitable for rendering with modern web browsers. |
|
30 |
*/ |
|
31 |
%> |
|
32 |
<%@ include file="settings.jsp"%> |
|
33 |
<%@ include file="session_vars.jsp"%> |
|
34 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
35 |
<html> |
|
36 |
<head> |
|
37 |
<title>LTER Data Catalog </title> |
|
38 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|
39 |
<link rel="stylesheet" type="text/css" |
|
40 |
href="@style-skins-path@/lter/lter.css"> |
|
41 |
<script language="javascript" type="text/javascript" |
|
42 |
src="@style-skins-path@/lter/lter.js"></script> |
|
43 |
<script language="javascript" type="text/javascript" |
|
44 |
src="@style-common-path@/branding.js"></script> |
|
45 |
</head> |
|
46 |
<body> |
|
47 |
<script language="javascript"> |
|
48 |
insertTemplateOpening(); |
|
49 |
insertSearchBox(); |
|
50 |
</script> |
|
51 |
<br> |
|
52 |
<script language="javascript"> |
|
53 |
insertLoginBox(); |
|
54 |
</script> |
|
55 |
<script language="javascript"> |
|
56 |
insertTemplateClosing(); |
|
57 |
</script> |
|
58 |
</body> |
|
59 |
</html> |
|
0 | 60 |
lib/style/skins/lter/lter.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<style-set name="default"> |
|
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 |
|
|
11 |
<!-- eml-2.0.1 modules --> |
|
12 |
<doctype publicid="eml://ecoinformatics.org/eml-2.0.1"> |
|
13 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.1/eml.xsl</target> |
|
14 |
</doctype> |
|
15 |
|
|
16 |
<!-- eml-2.0.0 modules --> |
|
17 |
<doctype publicid="eml://ecoinformatics.org/eml-2.0.0"> |
|
18 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0/eml.xsl</target> |
|
19 |
</doctype> |
|
20 |
|
|
21 |
<!-- eml-2.0.0beta6 modules --> |
|
22 |
<doctype publicid="-//ecoinformatics.org//eml-access-2.0.0beta6//EN"> |
|
23 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-access-2.0.0beta6.xsl</target> |
|
24 |
</doctype> |
|
25 |
<doctype publicid="-//ecoinformatics.org//eml-attribute-2.0.0beta6//EN"> |
|
26 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-attribute-2.0.0beta6.xsl</target> |
|
27 |
</doctype> |
|
28 |
<doctype publicid="-//ecoinformatics.org//eml-constraint-2.0.0beta6//EN"> |
|
29 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-constraint-2.0.0beta6.xsl</target> |
|
30 |
</doctype> |
|
31 |
<doctype publicid="-//ecoinformatics.org//eml-coverage-2.0.0beta6//EN"> |
|
32 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-coverage-2.0.0beta6.xsl</target> |
|
33 |
</doctype> |
|
34 |
<doctype publicid="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN"> |
|
35 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-dataset-2.0.0beta6.xsl</target> |
|
36 |
</doctype> |
|
37 |
<doctype publicid="-//ecoinformatics.org//eml-entity-2.0.0beta6//EN"> |
|
38 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-entity-2.0.0beta6.xsl</target> |
|
39 |
</doctype> |
|
40 |
<doctype publicid="-//ecoinformatics.org//eml-literature-2.0.0beta6//EN"> |
|
41 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-literature-2.0.0beta6.xsl</target> |
|
42 |
</doctype> |
|
43 |
<doctype publicid="-//ecoinformatics.org//eml-physical-2.0.0beta6//EN"> |
|
44 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-physical-2.0.0beta6.xsl</target> |
|
45 |
</doctype> |
|
46 |
<doctype publicid="-//ecoinformatics.org//eml-project-2.0.0beta6//EN"> |
|
47 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-project-2.0.0beta6.xsl</target> |
|
48 |
</doctype> |
|
49 |
<doctype publicid="-//ecoinformatics.org//eml-protocol-2.0.0beta6//EN"> |
|
50 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-protocol-2.0.0beta6.xsl</target> |
|
51 |
</doctype> |
|
52 |
<doctype publicid="-//ecoinformatics.org//eml-software-2.0.0beta6//EN"> |
|
53 |
<target publicid="-//W3C//HTML//EN">@systemidserver@@style-common-path@/eml-2.0.0beta6/eml-software-2.0.0beta6.xsl</target> |
|
54 |
</doctype> |
|
55 |
|
|
56 |
</style-set> |
|
0 | 57 |
lib/style/skins/lter/include_header.jsp | ||
---|---|---|
1 |
<%@ page language="java" %> |
|
2 |
<!-- |
|
3 |
* '$RCSfile$' |
|
4 |
* Authors: Matt Jones, CHad Berkley |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* |
|
9 |
* '$Author$' |
|
10 |
* '$Date$' |
|
11 |
* '$Revision$' |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or modify |
|
14 |
* it under the terms of the GNU General Public License as published by |
|
15 |
* the Free Software Foundation; either version 2 of the License, or |
|
16 |
* (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
26 |
* |
|
27 |
--> |
|
28 |
<%@ include file="settings.jsp"%> |
|
29 |
<%@ include file="session_vars.jsp"%> |
|
30 |
<head> |
|
31 |
<title>LTER Data Catalog</title> |
|
32 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|
33 |
<link href="@style-skins-path@/lter/lter.css" |
|
34 |
rel="stylesheet" type="text/css"> |
|
35 |
<script language="javascript" type="text/javascript" |
|
36 |
src="<%= relativeRoot %>/lter.js"></script> |
|
37 |
</head> |
|
38 |
|
|
39 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
|
40 |
<table width="750px" align="center" border="0" cellpadding="0" cellspacing="0"> |
|
41 |
<tr> |
|
42 |
<td width="10px" align="right" valign="top" class="title"> </td> |
|
43 |
|
|
44 |
<td width="80" align="center" valign="bottom" class="title"> |
|
45 |
<a target="_top" href="./index.jsp"> |
|
46 |
<img src="./images/transparent1x1.gif" border="0" /> |
|
47 |
</a> |
|
48 |
</td> |
|
49 |
<td align="left" valign="middle" class="title"> |
|
50 |
<p class="title">LTER Data Catalog Search</p> |
|
51 |
</td> |
|
52 |
</tr> |
|
53 |
<tr> |
|
54 |
<td width="10" align="right" valign="top" class="sectionheader"> |
|
55 |
 </td> |
|
56 |
|
|
57 |
<td align="left" valign="middle" class="sectionheader" style="text-align: left"> |
|
58 |
    |
|
59 |
<a target="_top" href="./index.jsp" |
|
60 |
class="toollink">Home</a></td> |
|
61 |
<td align="left" valign="top" class="sectionheader"> |
|
62 |
<img src="./images/transparent1x1.gif" |
|
63 |
width="600" height="25" /></td> |
|
64 |
</tr> |
|
65 |
</table> |
|
66 |
</body> |
|
67 |
</html> |
|
0 | 68 |
lib/style/skins/lter/include_login.jsp | ||
---|---|---|
1 |
<%@ page language="java" %> |
|
2 |
<!-- |
|
3 |
/** |
|
4 |
* '$RCSfile$' |
|
5 |
* Authors: Matt Jones, CHad Berkley |
|
6 |
* Copyright: 2000 Regents of the University of California and the |
|
7 |
* National Center for Ecological Analysis and Synthesis |
|
8 |
* For Details: http://www.nceas.ucsb.edu/ |
|
9 |
* |
|
10 |
* '$Author$' |
|
11 |
* '$Date$' |
|
12 |
* '$Revision$' |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or modify |
|
15 |
* it under the terms of the GNU General Public License as published by |
|
16 |
* the Free Software Foundation; either version 2 of the License, or |
|
17 |
* (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
27 |
* |
|
28 |
*/ |
|
29 |
--> |
|
30 |
|
|
31 |
<%@ include file="settings.jsp"%> |
|
32 |
<%@ include file="session_vars.jsp"%> |
|
33 |
<!-- *********************** START LOGIN TABLE ************************* --> |
|
34 |
<html> |
|
35 |
<head> |
|
36 |
<title</title> |
|
37 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|
38 |
<link href="<%=relativeRoot%>/lter.css" rel="stylesheet" type="text/css"> |
|
39 |
<script language="javascript" |
|
40 |
type="text/javascript" src="<%=relativeRoot%>/lter.js"> |
|
41 |
</script> |
|
42 |
<script language="javascript" type="text/javascript"> |
|
43 |
var popupMsg = "If you need to create a new account, \n" |
|
44 |
+"click the \"create new account\" link"; |
|
45 |
function trim(stringToTrim) { |
|
46 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,''); |
|
47 |
} |
|
48 |
function allowSubmit(formObj) { |
|
49 |
if (trim(formObj.elements["loginAction"].value)!="Login") return true; |
|
50 |
//trim username & passwd: |
|
51 |
var username = trim(formObj.elements["username"].value); |
|
52 |
var organization = trim(formObj.elements["organization"].value); |
|
53 |
var password = trim(formObj.elements["password"].value); |
|
54 |
if (username=="") { |
|
55 |
alert("You must type a username. \n"+popupMsg); |
|
56 |
formObj.elements["username"].focus(); |
|
57 |
return false; |
|
58 |
} |
|
59 |
if (organization=="") { |
|
60 |
alert("You must select an organization.\n"+popupMsg); |
|
61 |
formObj.elements["organization"].focus(); |
|
62 |
return false; |
|
63 |
} |
|
64 |
if (password=="") { |
|
65 |
alert("You must type a password. \n"+popupMsg); |
|
66 |
formObj.elements["password"].focus(); |
|
67 |
return false; |
|
68 |
} |
|
69 |
return true; |
|
70 |
} |
|
71 |
<%=(isLoggedIn)? |
|
72 |
" document.cookie = \"JSESSIONID=" + sess_sessionId + ";" |
|
73 |
+" path=" + CONTEXT_NAME + "\";\n" |
|
74 |
:" document.cookie = \"JSESSIONID=" + sess_sessionId + ";" |
|
75 |
+" path=" + CONTEXT_NAME + ";" |
|
76 |
+" expires=Thu, 01-Jan-70 00:00:01 GMT\";\n" |
|
77 |
%> |
|
78 |
</script> |
|
79 |
</head> |
|
80 |
|
|
81 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
|
82 |
<table width="750px" align="center" border="0" cellspacing="0" cellpadding="0"> |
|
83 |
<tr> |
|
84 |
<td width="10"> |
|
85 |
<img src="./images/panelhead_bg_lcorner.gif" width="10" height="21"> |
|
86 |
</td> |
|
87 |
<td class="sectionheader">login & registration</td> |
|
88 |
<td width="10"> |
|
89 |
<img src="./images/panelhead_bg_rcorner.gif" width="10" height="21"> |
|
90 |
</td> |
|
91 |
</tr> |
|
92 |
<tr> |
|
93 |
<td colspan="3"> |
|
94 |
<table width="100%" class="subpanel" border="0" cellpadding="0" |
|
95 |
cellspacing="0"> |
|
96 |
<tr> |
|
97 |
<td width="10"> |
|
98 |
<img src="./images/transparent1x1.gif" width="10" height="10"> |
|
99 |
</td> |
|
100 |
<td class="text_example"> |
|
101 |
<a name="loginanchor"></a> |
|
102 |
<p> |
|
103 |
Logging into your account enables you to search any |
|
104 |
additional, non-public data for which you may have access |
|
105 |
priviliges: |
|
106 |
</p> |
|
107 |
<%= loginStatus %> |
|
108 |
</td> |
|
109 |
<td width="10"> |
|
110 |
<img src="./images/transparent1x1.gif" width="10" height="10"> |
|
111 |
</td> |
|
112 |
</tr> |
|
113 |
<tr> |
|
114 |
<td width="10"> |
|
115 |
<img src="./images/transparent1x1.gif" width="10" height="10"> |
|
116 |
</td> |
|
117 |
<td> |
|
118 |
<form name="loginform" method="post" action="index.jsp" |
|
119 |
target="_top" onSubmit="return allowSubmit(this);"> |
|
120 |
<input type="hidden" name="action" value="login"> |
|
121 |
<input type="hidden" name="ldapusername" value=""> |
|
122 |
<input type="hidden" name="qformat" value="lter"> |
|
123 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
124 |
<tr valign="middle"> |
|
125 |
<td align="left" valign="middle" class="text_plain_smaller"> |
|
126 |
username: |
|
127 |
</td> |
|
128 |
<td width="173" align="left" |
|
129 |
style="padding-top: 2px; padding-bottom: 2px;"> |
|
130 |
<input name="username" type="text" style="width: 140px;" |
|
131 |
value="<%=typedUserName%>" <%=loginEnabledDisabled%>> |
|
132 |
</td> |
|
133 |
<td width="10px"> |
|
134 |
<img src="./images/transparent1x1.gif" width="10"> |
|
135 |
</td> |
|
136 |
<td align="center" class="text_plain"> |
|
137 |
<a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi"> |
|
138 |
create a new account</a> |
|
139 |
</td> |
|
140 |
</tr> |
|
141 |
<tr valign="middle"> |
|
142 |
<td height="28" align="left" |
|
143 |
valign="middle" class="text_plain_smaller"> |
|
144 |
organization: |
|
145 |
</td> |
|
146 |
<td align="left" |
|
147 |
style="padding-top: 2px; padding-bottom: 2px;"> |
|
148 |
<select name="organization" style="width:140px;" |
|
149 |
<%=loginEnabledDisabled%> > |
|
150 |
<option value="" <%=((posted_organization.length()<1)? "selected":"")%>>— choose one —</option> |
|
151 |
<option value="NCEAS" <%=((posted_organization.equalsIgnoreCase("NCEAS"))? "selected":"")%>>NCEAS</option> |
|
152 |
<option value="LTER" <%=((posted_organization.equalsIgnoreCase("LTER"))? "selected":"")%>>LTER</option> |
|
153 |
<option value="NRS" <%=((posted_organization.equalsIgnoreCase("NRS"))? "selected":"")%>>NRS</option> |
|
154 |
<option value="PISCO" <%=((posted_organization.equalsIgnoreCase("PISCO"))? "selected":"")%>>PISCO</option> |
|
155 |
<option value="OBFS" <%=((posted_organization.equalsIgnoreCase("OBFS"))? "selected":"")%>>OBFS</option> |
|
156 |
<option value="unaffiliated" <%=((posted_organization.equalsIgnoreCase("unaffiliated"))? "selected":"")%>>unaffiliated</option> |
|
157 |
</select> |
|
158 |
</td> |
|
159 |
<td width="10px"> |
|
160 |
<img src="./images/transparent1x1.gif" width="10" > |
|
161 |
</td> |
|
162 |
<td align="center" class="text_plain"> |
|
163 |
<a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi?stage=resetpass">forgot your password?</a> |
|
164 |
</td> |
|
165 |
</tr> |
|
166 |
<tr valign="middle"> |
|
167 |
<td width="85" align="left" valign="middle" |
|
168 |
class="text_plain_smaller"> |
|
169 |
password: |
|
170 |
</td> |
|
171 |
<td> |
|
172 |
<input name="password" type="password" maxlength="50" |
|
173 |
style="width:140px;" value="<%=posted_password%>" |
|
174 |
<%=loginEnabledDisabled%>> |
|
175 |
</td> |
|
176 |
<td width="10px"> |
|
177 |
<img src="./images/transparent1x1.gif" width="10"> |
|
178 |
</td> |
|
179 |
<td align="center" class="text_plain"> |
|
180 |
<a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi?stage=changepass">change your password</a> |
|
181 |
</td> |
|
182 |
</tr> |
|
183 |
<tr> |
|
184 |
<td align="center" colspan="2" class="<%= ((isLoggedIn)? "buttonBG_logout": "buttonBG_login") %>"> |
|
185 |
<input type="submit" name="loginAction" |
|
186 |
value="<%=loginButtonLabel%>" class="button_login" /> |
|
187 |
</td> |
|
188 |
</td> |
|
189 |
<td width="10"> |
|
190 |
<img src="./images/transparent1x1.gif" width="10"> |
|
191 |
</td> |
|
192 |
<td> |
|
193 |
<img src="./images/transparent1x1.gif" width="10"> |
|
194 |
</td> |
|
195 |
</tr> |
|
196 |
<tr> |
|
197 |
<td colspan="4"> |
|
198 |
</br> |
|
199 |
</td> |
|
200 |
</tr> |
|
201 |
</table> |
|
202 |
</form> |
|
203 |
</td> |
|
204 |
</tr> |
|
205 |
</table> |
|
206 |
</td> |
|
207 |
</tr> |
|
208 |
</table> |
|
209 |
</body> |
|
0 | 210 |
lib/style/skins/lter/session_vars.jsp | ||
---|---|---|
1 |
<%@ page import="edu.ucsb.nceas.metacat.client.*" %> |
|
2 |
<% |
|
3 |
/** |
|
4 |
* '$RCSfile$' |
|
5 |
* Authors: Matt Jones, CHad Berkley |
|
6 |
* Copyright: 2000 Regents of the University of California and the |
|
7 |
* National Center for Ecological Analysis and Synthesis |
|
8 |
* For Details: http://www.nceas.ucsb.edu/ |
|
9 |
* |
|
10 |
* '$Author$' |
|
11 |
* '$Date$' |
|
12 |
* '$Revision$' |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or modify |
|
15 |
* it under the terms of the GNU General Public License as published by |
|
16 |
* the Free Software Foundation; either version 2 of the License, or |
|
17 |
* (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
27 |
* |
|
28 |
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to |
|
29 |
* convert an XML file showing the resultset of a query |
|
30 |
* into an HTML format suitable for rendering with modern web browsers. |
|
31 |
*/ |
|
32 |
|
|
33 |
////////////////////////////////////////////////////////////////////////////// |
|
34 |
// |
|
35 |
// NOTE: |
|
36 |
// |
|
37 |
// GLOBAL CONSTANTS (SETTINGS SUCH AS METACAT URL, LDAP DOMAIN AND DEBUG |
|
38 |
// SWITCH) ARE ALL IN THE INCLUDE FILE "PORTAL_SETTINGS.jsp" |
|
39 |
// |
|
40 |
////////////////////////////////////////////////////////////////////////////// |
|
41 |
|
|
42 |
// GLOBAL VARIABLES ////////////////////////////////////////////////////////// |
|
43 |
String loginStatus = null; |
|
44 |
String sess_sessionId = null; |
|
45 |
String sessionidField = null; |
|
46 |
String metacatResponse = null; |
|
47 |
String posted_ldapUserName = null; |
|
48 |
String typedUserName = null; |
|
49 |
String posted_organization = null; |
|
50 |
String posted_password = null; |
|
51 |
String loginAction = null; |
|
52 |
String loginButtonLabel = null; |
|
53 |
String loginEnabledDisabled = null; |
|
54 |
Metacat metacat = null; |
|
55 |
HttpSession rfSession = null; |
|
56 |
boolean isLoggedIn = false; |
|
57 |
String relativeRoot = "."; |
|
58 |
|
|
59 |
////////////////////////////////////////////////////////////////////////////// |
|
60 |
|
|
61 |
try { |
|
62 |
rfSession = request.getSession(true); |
|
63 |
|
|
64 |
} catch(Exception e) { |
|
65 |
|
|
66 |
throw new ServletException("trying to get session: "+e); |
|
67 |
} |
|
68 |
|
|
69 |
Object sess_sessionIdObj = rfSession.getAttribute("sess_sessionIdObj"); |
|
70 |
|
|
71 |
if (sess_sessionIdObj!=null) { |
|
72 |
sess_sessionId = (String)sess_sessionIdObj; |
|
73 |
|
|
74 |
// if sess_sessionIdObj is empty string, that means user has logged out |
|
75 |
// (had problems if I set it to null, so used empty string instead) |
|
76 |
if (sess_sessionId.length() < 1) sess_sessionId = null; |
|
77 |
else isLoggedIn = true; |
|
78 |
|
|
79 |
} else { |
|
80 |
|
|
81 |
sess_sessionId = null; |
|
82 |
} |
|
83 |
|
|
84 |
typedUserName = request.getParameter("username"); |
|
85 |
typedUserName = (typedUserName!=null)? typedUserName.trim() : ""; |
|
86 |
|
|
87 |
posted_organization = request.getParameter("organization"); |
|
88 |
posted_organization = (posted_organization!=null)? posted_organization.trim() : ""; |
|
89 |
|
|
90 |
posted_ldapUserName = "uid=" + typedUserName |
|
91 |
+ ",o=" + posted_organization + LDAP_DOMAIN; |
|
92 |
|
|
93 |
posted_password = request.getParameter("password"); |
|
94 |
posted_password = (posted_password!=null)? posted_password.trim() : ""; |
|
95 |
|
|
96 |
loginAction = request.getParameter("loginAction"); |
|
97 |
loginAction = (loginAction!=null)? loginAction.trim() : ""; |
|
98 |
|
|
99 |
////////////////////////////////////////////////////////////////////////////// |
|
100 |
|
|
101 |
if (loginAction.equals(LOGOUT_LABEL)) { |
|
102 |
// DO LOGOUT ////////////////////////////////////////////////////////////// |
|
103 |
|
|
104 |
if (sess_sessionId!=null && rfSession.getAttribute("sess_metacatObj")!=null) { |
|
105 |
metacat = (Metacat)(rfSession.getAttribute("sess_metacatObj")); |
|
106 |
metacat.logout(); |
|
107 |
} |
|
108 |
sess_sessionId = null; |
|
109 |
rfSession.setAttribute("sess_sessionIdObj", ""); |
|
110 |
isLoggedIn = false; |
|
111 |
|
|
112 |
} else if (loginAction.equals(LOGIN_LABEL)) { |
|
113 |
// DO LOGIN //////////////////////////////////////////////////////////////// |
|
114 |
|
|
115 |
if (sess_sessionId!=null) isLoggedIn = true; |
|
116 |
else { |
|
117 |
|
|
118 |
// get metacat object - either cached from session... |
|
119 |
if (rfSession.getAttribute("sess_metacatObj")!=null) { |
|
120 |
|
|
121 |
metacat = (Metacat)(rfSession.getAttribute("sess_metacatObj")); |
|
122 |
|
|
123 |
} else { // ...or create it if it doesn't already exist |
|
124 |
try { |
|
125 |
metacat = MetacatFactory.createMetacatConnection(METACAT_URL); |
|
126 |
} catch (MetacatInaccessibleException mie) { |
|
127 |
throw new ServletException("Metacat connection to "+METACAT_URL |
|
128 |
+" failed." + mie.getMessage()); |
|
129 |
} |
|
130 |
if (metacat==null) { |
|
131 |
throw new ServletException("Metacat connection to "+METACAT_URL |
|
132 |
+" failed - Metacat object is NULL!"); |
|
133 |
} |
|
134 |
rfSession.setAttribute("sess_metacatObj", metacat); |
|
135 |
} |
|
136 |
// now do login... |
|
137 |
try { |
|
138 |
metacatResponse = metacat.login(posted_ldapUserName, posted_password); |
|
139 |
|
|
140 |
if (metacatResponse!=null && metacatResponse.indexOf("<login>") >= 0) { |
|
141 |
sess_sessionId = metacat.getSessionId(); |
|
142 |
rfSession.setAttribute("sess_sessionIdObj", |
|
143 |
((sess_sessionId!=null)? sess_sessionId: "") ); |
|
144 |
isLoggedIn = true; |
|
145 |
} else { |
|
146 |
loginStatus = "<em class=\"loginStatus\">Incorrect username or password - please try again</em>"; |
|
147 |
isLoggedIn = false; |
|
148 |
} |
|
149 |
} catch (MetacatAuthException mae) { |
|
150 |
loginStatus = "<em class=\"loginStatus\">Incorrect username or password! - please try again</em>"; |
|
151 |
isLoggedIn = false; |
|
152 |
} catch (MetacatInaccessibleException mie) { |
|
153 |
isLoggedIn = false; |
|
154 |
loginStatus = "<em class=\"loginStatus\">ERROR logging in - problems connecting - please try later</em>"; |
|
155 |
} |
|
156 |
} |
|
157 |
} |
|
158 |
|
|
159 |
////////////////////////////////////////////////////////////////////////////// |
|
160 |
|
|
161 |
if (isLoggedIn) { |
|
162 |
loginButtonLabel = LOGOUT_LABEL; |
|
163 |
loginEnabledDisabled = "disabled"; |
|
164 |
if (sess_sessionId!=null && sess_sessionId.length()>0) { |
|
165 |
sessionidField = "<input type=\"hidden\" name=\"sessionid\" value=\"" |
|
166 |
+sess_sessionId+"\">"; |
|
167 |
} else { |
|
168 |
sessionidField = ""; |
|
169 |
} |
|
170 |
// if loginStatus has already been set above, don't overwrite it... |
|
171 |
if (loginStatus==null) loginStatus |
|
172 |
= "<em class=\"loginStatus\">You ARE logged in</em>"; |
|
173 |
} else { |
|
174 |
loginButtonLabel = LOGIN_LABEL; |
|
175 |
loginEnabledDisabled = ""; |
|
176 |
sessionidField = ""; |
|
177 |
// if loginStatus has already been set above, don't overwrite it... |
|
178 |
if (loginStatus==null) loginStatus |
|
179 |
= "<em class=\"loginStatus\">You are NOT logged in</em>"; |
|
180 |
} |
|
181 |
|
|
182 |
if (DEBUG_TO_BROWSER) { |
|
183 |
%> |
|
184 |
<table> |
|
185 |
<tr> |
|
186 |
<td colspan="4" align="left" valign="top" class="text_plain" bgcolor="#ffff00"> |
|
187 |
<ul> |
|
188 |
<li>METACAT_URL: <%=METACAT_URL%></li> |
|
189 |
<li>rfSession: <%=rfSession%></li> |
|
190 |
<li>metacatResponse: <%=metacatResponse%></li> |
|
191 |
<li>posted_ldapUserName: <%=posted_ldapUserName%></li> |
|
192 |
<li>posted_password: <%=posted_password%></li> |
|
193 |
<li>isLoggedIn: <%=isLoggedIn%></li> |
|
194 |
<li>sess_sessionId LOCAL: <%=sess_sessionId%></li> |
|
195 |
<li>sess_sessionIdObj FROM SESSION: <%=rfSession.getAttribute("sess_sessionIdObj")%></li> |
|
196 |
</ul></td> |
|
197 |
</tr> |
|
198 |
</table> |
|
199 |
<% |
|
200 |
} |
|
201 |
%> |
|
0 | 202 |
lib/style/skins/lter/settings.jsp | ||
---|---|---|
1 |
<%@ page errorPage="jsperrorpage.html" %> |
|
2 |
<!-- |
|
3 |
* '$RCSfile$' |
|
4 |
* Authors: Matthew Brooke |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* For Details: http://www.nceas.ucsb.edu/ |
|
8 |
* |
|
9 |
* '$Author$' |
|
10 |
* '$Date$' |
|
11 |
* '$Revision$' |
|
12 |
* |
|
13 |
* Settings file for the default metacat skin |
|
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 |
<% |
|
30 |
|
|
31 |
// GLOBAL CONSTANTS FOR KNB PORTAL PAGE ///////////////////////////////////// |
|
32 |
|
|
33 |
// URL of metacat to be used for login & searching: |
|
34 |
String METACAT_URL = "@systemidserver@@servlet-path@"; |
|
35 |
|
|
36 |
// CONTEXT NAME of metacat installed: |
|
37 |
String CONTEXT_NAME = "@html-path@"; |
|
38 |
|
|
39 |
//String relativeRoot = "."; |
|
40 |
// label for logout form button when user *is* logged in: |
|
41 |
String LOGOUT_LABEL = "Logout"; |
|
42 |
|
|
43 |
// label for login form button when user is *not* logged in: |
|
44 |
String LOGIN_LABEL = "Login"; |
|
45 |
|
|
46 |
// last part of LDAP username to be appended after organization |
|
47 |
String LDAP_DOMAIN = ",dc=ecoinformatics,dc=org"; |
|
48 |
|
|
49 |
// if true, POST variables echoed at bottom of client's browser window in a big yellow box |
|
50 |
boolean DEBUG_TO_BROWSER = false; |
|
51 |
|
|
52 |
|
|
53 |
String COMMON_SEARCH_METACAT_POST_FIELDS = |
|
54 |
"<input type=\"hidden\" name=\"action\" value=\"query\"\\>\n" |
|
55 |
+"<input type=\"hidden\" name=\"qformat\" value=\"lter\"\\>\n" |
|
56 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"originator/individualName/surName\"\\>\n" |
|
57 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"originator/individualName/givenName\"\\>\n" |
|
58 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"originator/organizationName\"\\>\n" |
|
59 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"creator/individualName/surName\"\\>\n" |
|
60 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"creator/organizationName\"\\>\n" |
|
61 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"dataset/title\"\\>\n" |
|
62 |
// +"<input type=\"hidden\" name=\"returnfield\" value=\"title\"\\>\n" |
|
63 |
+"<input type=\"hidden\" name=\"returnfield\" value=\"keyword\"\\>\n" |
|
64 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN\"\\>\n" |
|
65 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN\"\\>\n" |
|
66 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"eml://ecoinformatics.org/eml-2.0.0\"\\>\n" |
|
67 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"eml://ecoinformatics.org/eml-2.0.1\"\\>\n" |
|
68 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"-//NCEAS//eml-dataset-2.0//EN\"\\>\n" |
|
69 |
+"<input type=\"hidden\" name=\"returndoctype\" value=\"-//NCEAS//resource//EN\"\\>\n"; |
|
70 |
|
|
71 |
String SIMPLE_SEARCH_METACAT_POST_FIELDS = |
|
72 |
"<input type=\"hidden\" name=\"operator\" value=\"UNION\"\\>\n" |
|
73 |
+COMMON_SEARCH_METACAT_POST_FIELDS; |
|
74 |
|
|
75 |
String ADVANCED_SEARCH_METACAT_POST_FIELDS = |
|
76 |
"<input type=\"hidden\" name=\"operator\" value=\"INTERSECT\"\\>\n" |
|
77 |
+COMMON_SEARCH_METACAT_POST_FIELDS; |
|
78 |
|
|
79 |
/*******************************************************************************/ |
|
80 |
/*******************************************************************************/ |
|
81 |
%> |
|
0 | 82 |
lib/style/skins/lter/include_searchbox.jsp | ||
---|---|---|
1 |
<%@ page language="java" %> |
|
2 |
<!-- |
|
3 |
/** |
|
4 |
* '$RCSfile$' |
|
5 |
* Authors: Matt Jones, CHad Berkley |
|
6 |
* Copyright: 2000 Regents of the University of California and the |
|
7 |
* National Center for Ecological Analysis and Synthesis |
|
8 |
* For Details: http://www.nceas.ucsb.edu/ |
|
9 |
* |
|
10 |
* '$Author$' |
|
11 |
* '$Date$' |
|
12 |
* '$Revision$' |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or modify |
|
15 |
* it under the terms of the GNU General Public License as published by |
|
16 |
* the Free Software Foundation; either version 2 of the License, or |
|
17 |
* (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
27 |
* |
|
28 |
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to |
|
29 |
* convert an XML file showing the resultset of a query |
|
30 |
* into an HTML format suitable for rendering with modern web browsers. |
|
31 |
*/ |
|
32 |
--> |
|
33 |
<%@ include file="settings.jsp"%> |
|
34 |
<%@ include file="session_vars.jsp"%> |
|
35 |
<!-- *********************** START SEARCHBOX TABLE ************************* --> |
|
36 |
<html> |
|
37 |
<head> |
|
38 |
<title>LTER Data Catalog Search Page</title> |
|
39 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
|
40 |
<link href="<%=relativeRoot%>/lter.css" rel="stylesheet" type="text/css"> |
|
41 |
<script language="javascript" |
|
42 |
type="text/javascript" src="<%=relativeRoot%>/lter.js"> |
|
43 |
</script> |
|
44 |
<script language="javascript" type="text/javascript"> |
|
45 |
function trim(stringToTrim) { |
|
46 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,''); |
|
47 |
} |
|
48 |
function allowSearch(formObj) { |
|
49 |
var canSearch = true; |
|
50 |
var searchString = trim(formObj.elements["anyfield"].value); |
|
51 |
if (searchString=="") { |
|
52 |
if (confirm("Show *all* data in the Catalog?\n(this may take some time!) ")) { |
|
53 |
formObj.elements["anyfield"].value = "%"; |
|
54 |
canSearch = true; |
|
55 |
} else { |
|
56 |
formObj.elements["anyfield"].focus(); |
|
57 |
canSearch = false; |
|
58 |
} |
|
59 |
} |
|
60 |
return canSearch; |
|
61 |
} |
|
62 |
function keywordSearch(formObj, searchKeyword) { |
|
63 |
var searchString = trim(searchKeyword); |
|
64 |
if (searchString=="") searchString="%"; |
|
65 |
formObj.anyfield.value=searchString; |
|
66 |
formObj.submit(); |
|
67 |
return true; |
|
68 |
} |
|
69 |
</script> |
|
70 |
</head> |
|
71 |
|
|
72 |
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
|
73 |
<table width="750px" align="center" cellspacing="0" cellpadding="0"> |
|
74 |
<tr> |
|
75 |
<td width="10" align="right" valign="top"> |
|
76 |
<img src="<%=relativeRoot%>/images/panelhead_bg_lcorner.gif" |
|
77 |
width="10" height="21"> |
|
78 |
</td> |
|
79 |
<td class="sectionheader"> |
|
80 |
search for data |
|
81 |
</td> |
|
82 |
<td width="10" align="left" valign="top"> |
|
83 |
<img src="<%=relativeRoot%>/images/panelhead_bg_rcorner.gif" |
|
84 |
width="10" height="21"> |
|
85 |
</td> |
|
86 |
</tr> |
|
87 |
<tr> |
|
88 |
<td colspan="3"> |
|
89 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" |
|
90 |
class="subpanel"> |
|
91 |
<tr> |
|
92 |
<td colspan="2"></td> |
|
93 |
</tr> |
|
94 |
<tr valign="baseline"> |
|
95 |
<td colspan="2"> |
|
96 |
<form action="<%=METACAT_URL%>" name="searchForm" method="post" |
|
97 |
target="_top" onSubmit="return allowSearch(this);"> |
|
98 |
<%=sessionidField%> |
|
99 |
<%=SIMPLE_SEARCH_METACAT_POST_FIELDS%> |
|
100 |
<table width="100%" border="0" cellpadding="5" cellspacing="0"> |
|
101 |
<tr> |
|
102 |
<td width="94" rowspan="2" align="left" valign="top"> |
|
103 |
<img src="<%=relativeRoot%>/images/LTERLogo86x111.gif" |
|
104 |
width="86" height="111"> |
|
105 |
</td> |
|
106 |
<td colspan="2" valign="middle" class="text_example"> |
|
107 |
<p> |
|
108 |
<%= loginStatus %> |
|
109 |
(<a href="<%=relativeRoot%>/index.jsp#loginanchor" |
|
110 |
target="_top"><%=loginButtonLabel%></a>). |
|
111 |
You may search the data catalog without being logged |
|
112 |
into your account, but will have access only to |
|
113 |
"public" data (see "login & |
|
114 |
registration") |
|
115 |
</p> |
|
116 |
<p> |
|
117 |
Enter a search phrase (e.g. biodiversity) to search |
|
118 |
for data sets in the data catalog, or simply browse |
|
119 |
by category using the links below. |
|
120 |
</p> |
|
121 |
</td> |
|
122 |
</tr> |
|
123 |
<tr valign="middle"> |
|
124 |
<td align="right" class="searchcat"> |
|
125 |
<input type="text" name="anyfield" size="30" |
|
126 |
maxlength="200"> |
|
127 |
</td> |
|
128 |
<td width="365" align="left" class="searchcat"> |
|
129 |
<input type="submit" value="Search Data Catalog"> |
|
130 |
|
|
131 |
<!-- Implement this later |
|
132 |
<a target="_top" |
|
133 |
href="<%=relativeRoot%>/advancedsearch.jsp"> |
|
134 |
» advanced search «</a> |
|
135 |
--> |
|
136 |
</td> |
|
137 |
</tr> |
|
138 |
</table> |
|
139 |
</form> |
|
140 |
</td> |
|
141 |
</tr> |
|
142 |
<% |
|
143 |
/* |
|
144 |
US Geography |
|
145 |
------------ |
|
146 |
Northeast, Southeast, South, Midwest, Northwest, Southwest, Pacific Ocean, Atlantic Ocean, |
|
147 |
Great Lakes, (could also list states here) |
|
148 |
*/ |
|
149 |
%> |
|
150 |
<tr> |
|
151 |
<td width="375"> </td> |
|
152 |
<td width="365" class="searchsubcat"> </td> |
|
153 |
</tr> |
|
154 |
<tr> |
|
155 |
<td width="375" class="searchcat">Ecology</td> |
|
156 |
<td width="365" class="searchcat">Evolution</td> |
|
157 |
</tr> |
|
158 |
<tr valign="top"> |
|
159 |
<td width="375" class="searchsubcat"> |
|
160 |
<a href="#" onClick="keywordSearch(document.searchForm, 'biodiversity')" class="searchsubcat">Biodiversity,</a> |
|
161 |
<a href="#" onClick="keywordSearch(document.searchForm, 'competition')" class="searchsubcat">Competition,</a> |
|
162 |
<a href="#" onClick="keywordSearch(document.searchForm, 'decomposition')" class="searchsubcat">Decomposition,</a> |
|
163 |
<a href="#" onClick="keywordSearch(document.searchForm, 'disturbance')" class="searchsubcat">Disturbance,</a> |
|
164 |
<a href="#" onClick="keywordSearch(document.searchForm, 'endangered species')" class="searchsubcat">Endangered Species,</a> |
|
165 |
<a href="#" onClick="keywordSearch(document.searchForm, 'herbivory')" class="searchsubcat">Herbivory,</a> |
|
166 |
<a href="#" onClick="keywordSearch(document.searchForm, 'invasive species')" class="searchsubcat">Invasive Species,</a> |
|
167 |
<a href="#" onClick="keywordSearch(document.searchForm, 'nutrient cycling')" class="searchsubcat">Nutrient Cycling,</a> |
|
168 |
<a href="#" onClick="keywordSearch(document.searchForm, 'parasitism')" class="searchsubcat">Parasitism,</a> |
|
169 |
<a href="#" onClick="keywordSearch(document.searchForm, 'population dynamics')" class="searchsubcat">Population Dynamics,</a> |
|
170 |
<a href="#" onClick="keywordSearch(document.searchForm, 'predation')" class="searchsubcat">Predation,</a> |
|
171 |
<a href="#" onClick="keywordSearch(document.searchForm, 'productivity')" class="searchsubcat">Productivity,</a> |
|
172 |
<a href="#" onClick="keywordSearch(document.searchForm, 'succession')" class="searchsubcat">Succession,</a> |
|
173 |
<a href="#" onClick="keywordSearch(document.searchForm, 'symbiosis')" class="searchsubcat">Symbiosis,</a> |
|
174 |
<a href="#" onClick="keywordSearch(document.searchForm, 'trophic dynamics')" class="searchsubcat">Trophic Dynamics</a> |
|
175 |
</td> |
|
176 |
<td width="365" class="searchsubcat"> |
|
177 |
<a href="#" onClick="keywordSearch(document.searchForm, 'adaptation')" class="searchsubcat">Adaptation,</a> |
|
178 |
<a href="#" onClick="keywordSearch(document.searchForm, 'evolution')" class="searchsubcat">Evolution,</a> |
|
179 |
<a href="#" onClick="keywordSearch(document.searchForm, 'extinct')" class="searchsubcat">Extinction,</a> |
|
180 |
<a href="#" onClick="keywordSearch(document.searchForm, 'genetics')" class="searchsubcat">Genetics,</a> |
|
181 |
<a href="#" onClick="keywordSearch(document.searchForm, 'mutation')" class="searchsubcat">Mutation,</a> |
|
182 |
<a href="#" onClick="keywordSearch(document.searchForm, 'selection')" class="searchsubcat">Selection,</a> |
|
183 |
<a href="#" onClick="keywordSearch(document.searchForm, 'speciation')" class="searchsubcat">Speciation,</a> |
|
184 |
<a href="#" onClick="keywordSearch(document.searchForm, 'survival')" class="searchsubcat">Survival</a> |
|
185 |
</td> |
|
186 |
</tr> |
|
187 |
<tr> |
|
188 |
<td width="375"> </td> |
|
189 |
<td width="365"> </td> |
|
190 |
</tr> |
|
191 |
<tr> |
|
192 |
<td width="365" class="searchcat">Habitat</td> |
|
193 |
<td width="375" class="searchcat">Level of Organization</td> |
|
194 |
</tr> |
|
195 |
<tr valign="top"> |
|
196 |
<td width="365" class="searchsubcat"> |
|
197 |
<a href="#" onClick="keywordSearch(document.searchForm, 'alpine')" class="searchsubcat">Alpine,</a> |
|
198 |
<a href="#" onClick="keywordSearch(document.searchForm, 'benthic')" class="searchsubcat">Benthic,</a> |
|
199 |
<a href="#" onClick="keywordSearch(document.searchForm, 'desert')" class="searchsubcat">Desert,</a> |
|
200 |
<a href="#" onClick="keywordSearch(document.searchForm, 'estuar')" class="searchsubcat">Estuary,</a> |
|
201 |
<a href="#" onClick="keywordSearch(document.searchForm, 'forest')" class="searchsubcat">Forest,</a> |
|
202 |
<a href="#" onClick="keywordSearch(document.searchForm, 'freshwater')" class="searchsubcat">Freshwater,</a> |
|
203 |
<a href="#" onClick="keywordSearch(document.searchForm, 'grassland')" class="searchsubcat">Grassland,</a> |
|
204 |
<a href="#" onClick="keywordSearch(document.searchForm, 'marine')" class="searchsubcat">Marine,</a> |
|
205 |
<a href="#" onClick="keywordSearch(document.searchForm, 'montane')" class="searchsubcat">Montane,</a> |
|
206 |
<a href="#" onClick="keywordSearch(document.searchForm, 'terrestrial')" class="searchsubcat">Terrestrial,</a> |
|
207 |
<a href="#" onClick="keywordSearch(document.searchForm, 'tundra')" class="searchsubcat">Tundra,</a> |
|
208 |
<a href="#" onClick="keywordSearch(document.searchForm, 'urban')" class="searchsubcat">Urban,</a> |
|
209 |
<a href="#" onClick="keywordSearch(document.searchForm, 'wetland')" class="searchsubcat">Wetland</a> |
|
210 |
</td> |
|
211 |
<td width="375" class="searchsubcat"> |
|
212 |
<a href="#" onClick="keywordSearch(document.searchForm, 'cell')" class="searchsubcat">Cell,</a> |
|
213 |
<a href="#" onClick="keywordSearch(document.searchForm, 'community')" class="searchsubcat">Community,</a> |
|
214 |
<a href="#" onClick="keywordSearch(document.searchForm, 'ecosystem')" class="searchsubcat">Ecosystem,</a> |
|
215 |
<a href="#" onClick="keywordSearch(document.searchForm, 'global')" class="searchsubcat">Global</a> |
|
216 |
<a href="#" onClick="keywordSearch(document.searchForm, 'landscape')" class="searchsubcat">Landscape,</a> |
|
217 |
<a href="#" onClick="keywordSearch(document.searchForm, 'molecul')" class="searchsubcat">Molecule,</a> |
|
218 |
<a href="#" onClick="keywordSearch(document.searchForm, 'organism')" class="searchsubcat">Organism,</a> |
|
219 |
<a href="#" onClick="keywordSearch(document.searchForm, 'population')" class="searchsubcat">Population,</a> |
|
220 |
</td> |
|
221 |
</tr> |
|
222 |
<tr> |
|
223 |
<td width="375"> </td> |
|
224 |
<td width="365" class="searchsubcat"> </td> |
|
225 |
</tr> |
|
226 |
<tr> |
|
227 |
<td width="365" class="searchcat">Measurements</td> |
|
228 |
<td width="375" class="searchcat">Taxonomy</td> |
|
229 |
</tr> |
|
230 |
<tr valign="top"> |
|
231 |
<td width="365" class="searchsubcat"> |
|
232 |
<a href="#" onClick="keywordSearch(document.searchForm, 'biomass')" class="searchsubcat">Biomass,</a> |
|
233 |
<a href="#" onClick="keywordSearch(document.searchForm, 'carbon')" class="searchsubcat">Carbon,</a> |
|
234 |
<a href="#" onClick="keywordSearch(document.searchForm, 'chlorophyll')" class="searchsubcat">Chlorophyll,</a> |
|
235 |
<a href="#" onClick="keywordSearch(document.searchForm, 'gis')" class="searchsubcat">GIS,</a> |
|
236 |
<a href="#" onClick="keywordSearch(document.searchForm, 'nitrate')" class="searchsubcat">Nitrate,</a> |
|
237 |
<a href="#" onClick="keywordSearch(document.searchForm, 'nutrient')" class="searchsubcat">Nutrients,</a> |
|
238 |
<a href="#" onClick="keywordSearch(document.searchForm, 'precipitation')" class="searchsubcat">Precipitation,</a> |
|
239 |
<a href="#" onClick="keywordSearch(document.searchForm, 'radiation')" class="searchsubcat">Radiation,</a> |
|
240 |
<a href="#" onClick="keywordSearch(document.searchForm, 'temperature')" class="searchsubcat">Temperature,</a> |
|
241 |
<a href="#" onClick="keywordSearch(document.searchForm, 'weather')" class="searchsubcat">Weather</a> |
|
242 |
</td> |
|
243 |
<td width="375" class="searchsubcat"> |
|
244 |
<a href="#" onClick="keywordSearch(document.searchForm, 'amphibian')" class="searchsubcat">Amphibian,</a> |
|
245 |
<a href="#" onClick="keywordSearch(document.searchForm, 'bird')" class="searchsubcat">Bird,</a> |
|
246 |
<a href="#" onClick="keywordSearch(document.searchForm, 'fish')" class="searchsubcat">Fish,</a> |
|
247 |
<a href="#" onClick="keywordSearch(document.searchForm, 'fungus')" class="searchsubcat">Fungus,</a> |
|
248 |
<a href="#" onClick="keywordSearch(document.searchForm, 'invertebrate')" class="searchsubcat">Invertebrate,</a> |
|
249 |
<a href="#" onClick="keywordSearch(document.searchForm, 'mammal')" class="searchsubcat">Mammal,</a> |
|
250 |
<a href="#" onClick="keywordSearch(document.searchForm, 'microbe')" class="searchsubcat">Microbe,</a> |
|
251 |
<a href="#" onClick="keywordSearch(document.searchForm, 'plant')" class="searchsubcat">Plant,</a> |
|
252 |
<a href="#" onClick="keywordSearch(document.searchForm, 'reptile')" class="searchsubcat">Reptile,</a> |
|
253 |
<a href="#" onClick="keywordSearch(document.searchForm, 'virus')" class="searchsubcat">Virus</a> |
|
254 |
</td> |
|
255 |
</tr> |
|
256 |
<tr> |
|
257 |
<td width="375"> </td> |
|
258 |
<td width="365"> </td> |
|
259 |
</tr> |
|
260 |
</table> |
|
261 |
</td> |
|
262 |
</tr> |
|
263 |
</table> |
|
264 |
</body> |
|
265 |
<!-- ************************* END SEARCHBOX TABLE ************************* --> |
|
0 | 266 |
lib/style/skins/lter/lter.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 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* set the correct iframe sizes to accomodate the |
|
33 |
* header, footer, left and right areas. |
|
34 |
* NOTE: these styles apply only to each |
|
35 |
* container frame, *NOT* to the document within it! |
|
36 |
*/ |
|
37 |
|
|
38 |
.iframeheaderclass { |
|
39 |
height: 80px; |
|
40 |
width: 100%; |
|
41 |
border: 0px; |
|
42 |
margin: 0px; |
|
43 |
} |
|
44 |
|
|
45 |
.iframesearchboxclass { |
|
46 |
height: 500px; |
|
47 |
width: 100%; |
|
48 |
border: 0px; |
|
49 |
margin: 0px; |
|
50 |
} |
|
51 |
|
|
52 |
.iframeloginboxclass { |
|
53 |
height: 250px; |
|
54 |
width: 100%; |
|
55 |
border: 0px; |
|
56 |
margin: 0px; |
|
57 |
} |
|
58 |
|
|
59 |
.iframeleftcolclass { /* not used */ } |
|
60 |
.iframerightcolclass { /* not used */ } |
|
61 |
.iframefooterclass { /* not used */ } |
|
62 |
|
|
63 |
/** |
|
64 |
* set the size and alignment etc of the top-level layout table |
|
65 |
*/ |
|
66 |
.templatetableclass { |
|
67 |
width: 100%; |
|
68 |
border: 0px; |
|
69 |
padding: 0px; |
|
70 |
margin: 0px; |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* set the style of the main content area and its contents |
|
75 |
*/ |
|
76 |
.templatecontentareaclass { |
|
77 |
border: 0px; |
|
78 |
padding: 0px; |
|
79 |
margin: 0px; |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* set the correct <td> sizes to accomodate the |
|
84 |
* header, footer, left and right iframes. |
|
85 |
* NOTE: these styles apply only to each |
|
86 |
* container frame, *NOT* to the document in |
|
87 |
* the iframe within it! |
|
88 |
*/ |
|
89 |
.templateheaderrowclass { |
|
90 |
height: 80px; |
|
91 |
/* |
|
92 |
no width allowed - uses same width as table class |
|
93 |
*/ |
|
94 |
border: 0px; |
|
95 |
padding: 0px; |
|
96 |
margin: 0px; |
|
97 |
} |
|
98 |
|
|
99 |
.templateleftcolclass { |
|
100 |
height: 100%; |
|
101 |
width: 0px; |
|
102 |
border: 0px; |
|
103 |
padding: 0px; |
|
104 |
margin: 0px; |
Also available in: Unified diff
Adding lter skin.