1
|
/*
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: Default style sheet for KNP project web pages
|
4
|
* Using this stylesheet rather than placing styles directly in
|
5
|
* the KNP 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: leinfelder $'
|
12
|
* '$Date: 2007-09-12 11:28:05 -0700 (Wed, 12 Sep 2007) $'
|
13
|
* '$Revision: 3426 $'
|
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
|
* * * * * * CONFIGURATION SETTINGS - EDIT THESE FOR YOUR ENVIRONMENT * * * *
|
32
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
33
|
|
34
|
|
35
|
// These settings allow you to include and display common content (eg a common
|
36
|
// header) on all your pages, in much the same way as a frameset allows you to
|
37
|
// do, but through the use of iframes and a table instead. You can include up
|
38
|
// to 4 external pages, each one within the header, footer, left or right areas
|
39
|
//
|
40
|
// looks like this (if you're using a fixed width font to display these notes):
|
41
|
// ___________________
|
42
|
// | header |
|
43
|
// |-----------------|
|
44
|
// | | | |
|
45
|
// | | | |
|
46
|
// |L| content |R|
|
47
|
// | | | |
|
48
|
// | | | |
|
49
|
// |-----------------|
|
50
|
// | footer |
|
51
|
// -------------------
|
52
|
//
|
53
|
// Each area may display another page on the local site, or a page on a
|
54
|
// different server, or may be set to display nothing (in which case an iframe
|
55
|
// will not be drawn, although the containing table cell will still need to be
|
56
|
// resized using the css style - see below)
|
57
|
//
|
58
|
// NOTES:
|
59
|
//
|
60
|
// 1) if you have any links in the included documents, the target attribute for
|
61
|
// these *MUST* be set to _top, otherwise the new document will be displayed
|
62
|
// inside the small iframe areas, instead of replacing the entire page!
|
63
|
// - example: <a href="index.html" target="_top">HOME</a>
|
64
|
//
|
65
|
// 2) you will need to set the correct iframe size, in order to accomodate
|
66
|
// each of these areas on the page. The default location for these size
|
67
|
// settings is in the default.css file - see the "IFRAME_XXXXXX_CLASS"
|
68
|
// variables (below) for the name of the style to edit
|
69
|
//
|
70
|
// 3) you will also need to set the correct table cell sizes and/or overall
|
71
|
// table size for similar reasons. The default location for these size
|
72
|
// settings is in the default.css file - see the "TEMPLATE_XXXXXX_CLASS"
|
73
|
// variables (below) for the name of the style to edit
|
74
|
|
75
|
|
76
|
|
77
|
////////////////////////////////////////////////////////////////////////////////
|
78
|
// Edit these variables to define the content that will be loaded into the
|
79
|
// various iframes. Each may be a relative path to another page on the local
|
80
|
// site, or a full URL to a page on a remote server, or may be set to the empty
|
81
|
// string if no content is required at that position on the page (and in which
|
82
|
// case an iframe will not be drawn, although an empty table cell will still
|
83
|
// exist unless it is resized smaller) .
|
84
|
// ( e.g. if you do not want a header to be included, set: HEADER_URL="";)
|
85
|
////////////////////////////////////////////////////////////////////////////////
|
86
|
|
87
|
|
88
|
// Location of the header that will be displayed at the top of the page
|
89
|
var HEADER_URL = "@style-skins-path@/sanparks/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 = ""; //= "searchform.html"
|
94
|
//var SEARCHBOX_URL = "@style-skins-path@/sanparks/SaeonLogin.jspx";
|
95
|
|
96
|
// Location of the header that will be displayed at the top of the page
|
97
|
var LEFTCOL_URL = "@style-skins-path@/sanparks/leftnav.jsp";
|
98
|
|
99
|
// Location of the header that will be displayed at the top of the page
|
100
|
//var RIGHTCOL_URL = "@style-skins-path@/sanparks/spatial/pma.html";
|
101
|
var RIGHTCOL_URL = "";
|
102
|
|
103
|
// Location of the header that will be displayed at the top of the page
|
104
|
var FOOTER_URL = "@style-skins-path@/sanparks/footer.jspx";
|
105
|
|
106
|
//var LOGINBOX_URL = "";
|
107
|
var LOGINBOX_URL = "@style-skins-path@/sanparks/SaeonLogin.jspx";
|
108
|
|
109
|
|
110
|
|
111
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
112
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
113
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
114
|
/* * * * * * * * * MAY CHANGE THE FOLLOWING, BUT SHOULDN'T NEED TO* * * * * */
|
115
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
116
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
117
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
118
|
|
119
|
|
120
|
////////////////////////////////////////////////////////////////////////////////
|
121
|
// Edit the default.css file to set the correct iframe sizes to accomodate the
|
122
|
// header, footer, left and right areas.
|
123
|
// The following variables set the names of the styles that will be applied to
|
124
|
// each of the iframes - they can be anythign you wish, provided you use the
|
125
|
// same names for your classes in the css file
|
126
|
// NOTE: these styles apply only to each container frame, *NOT* to the document
|
127
|
// within it!
|
128
|
////////////////////////////////////////////////////////////////////////////////
|
129
|
|
130
|
//header iframe class
|
131
|
var IFRAME_HEADER_CLASS = "iframeheaderclass";
|
132
|
|
133
|
//(metacat only) search box iframe class
|
134
|
//var IFRAME_SEARCHBOX_CLASS = "iframesearchboxclass";
|
135
|
var IFRAME_SEARCHBOX_CLASS = "iframeloginboxclass";
|
136
|
|
137
|
//left column iframe class
|
138
|
var IFRAME_LEFTCOL_CLASS = "iframeleftcolclass";
|
139
|
|
140
|
//right column iframe class
|
141
|
var IFRAME_RIGHTCOL_CLASS = "mapFrame";
|
142
|
|
143
|
//footer iframe class
|
144
|
var IFRAME_FOOTER_CLASS = "iframefooterclass";
|
145
|
|
146
|
//(metacat only) login box iframe class
|
147
|
var IFRAME_LOGINBOX_CLASS = "iframeloginboxclass";
|
148
|
|
149
|
////////////////////////////////////////////////////////////////////////////////
|
150
|
// Edit the default.css file to set the correct table sizes to accomodate the
|
151
|
// header, footer, left and right iframes.
|
152
|
// The following variables set the names of the styles that will be applied to
|
153
|
// each of the table cells (or the table itself - see below) - they can be
|
154
|
// anything you wish, provided you use the same names for your classes in the
|
155
|
// css file
|
156
|
// NOTE: these styles apply only to each table cell, *NOT* to the document
|
157
|
// inside the iframe that is nested within it! (the exception is
|
158
|
// TEMPLATE_CONTENTAREA_CLASS, since the content probably isn't within an
|
159
|
// iframe - so style elements in this class will apply to the content istelf)
|
160
|
////////////////////////////////////////////////////////////////////////////////
|
161
|
|
162
|
//entire table class
|
163
|
var TEMPLATE_TABLE_CLASS = "templatetableclass";
|
164
|
|
165
|
//header table-cell class. Note you should not set css "width" on this, since it
|
166
|
//includes a colspan
|
167
|
var TEMPLATE_HEADERROW_CLASS = "templateheaderrowclass";
|
168
|
|
169
|
//left column table-cell class. Note that restricting css "height" on this may
|
170
|
//affect visibility of the main content, since it's in the same table row
|
171
|
var TEMPLATE_LEFTCOL_CLASS = "templateleftcolclass";
|
172
|
|
173
|
//main central content table-cell class. Note that css attributes set here may
|
174
|
//apply to the content nested inside this cell
|
175
|
var TEMPLATE_CONTENTAREA_CLASS = "templatecontentareaclass";
|
176
|
|
177
|
//rigth column table-cell class. Note that restricting css "height" on this may
|
178
|
//affect visibility of the main content, since it's in the same table row
|
179
|
var TEMPLATE_RIGHTCOL_CLASS = "templaterightcolclass";
|
180
|
|
181
|
//footer table-cell class. Note you should not set "width" on this, since it
|
182
|
//includes a colspan
|
183
|
var TEMPLATE_FOOTERROW_CLASS = "templatefooterrowclass";
|
184
|
|
185
|
//
|
186
|
// Skin specific functions
|
187
|
function submitform(formObj) {
|
188
|
|
189
|
if (trim(formObj.elements["loginAction"].value)!="Login") return true;
|
190
|
//trim username & passwd:
|
191
|
var username = trim(formObj.elements["uid"].value);
|
192
|
var organization = trim(formObj.elements["organization"].value);
|
193
|
var password = trim(formObj.elements["password"].value);
|
194
|
|
195
|
if (username=="") {
|
196
|
alert("You must type a username. \n"+popupMsg);
|
197
|
formObj.elements["uid"].focus();
|
198
|
return false;
|
199
|
}
|
200
|
|
201
|
if (organization=="") {
|
202
|
alert("You must select an organization. \n"+popupMsg);
|
203
|
formObj.elements["organization"].focus();
|
204
|
return false;
|
205
|
}
|
206
|
|
207
|
if (password=="") {
|
208
|
alert("You must type a password. \n"+popupMsg);
|
209
|
formObj.elements["password"].focus();
|
210
|
return false;
|
211
|
}
|
212
|
|
213
|
formObj.username.value="uid="+formObj.elements["uid"].value+",o="+formObj.elements["organization"].value+",dc=ecoinformatics,dc=org";
|
214
|
return true;
|
215
|
}
|
216
|
|
217
|
function trim(stringToTrim) {
|
218
|
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
|
219
|
}
|