1 |
3005
|
costa
|
/*
|
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 |
|
|
* inserts an iframe into the document and assigns it the passed source URL
|
32 |
|
|
* and class attribute
|
33 |
|
|
*/
|
34 |
|
|
function _createAutoscrollIFrameWithURL(targetURL, cssClass) {
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
if (_isBlank(targetURL)) {
|
38 |
|
|
|
39 |
|
|
document.write(" ");
|
40 |
|
|
|
41 |
|
|
} else {
|
42 |
|
|
|
43 |
|
|
document.write("<iframe src=\""+targetURL+"\" class=\""+cssClass+"\" "
|
44 |
|
|
+" id=\"" + cssClass + "\""
|
45 |
|
|
+" name=\"" + cssClass + "\""
|
46 |
|
|
+ "\" marginwidth=\"0\" scrolling=\"auto\" "
|
47 |
|
|
+" marginheight=\"0\" marginwidth=\"0\" "
|
48 |
|
|
+" border=\"0\" frameborder=\"0\" framespacing=\"0\" "
|
49 |
|
|
+" hspace=\"0\" vspace=\"0\">Your browser does not support"
|
50 |
|
|
+" the iframe tag. <a href=\""+targetURL+"\" "
|
51 |
|
|
+"target=\"_blank\">This content</a>"
|
52 |
|
|
+" should have been displayed at this location</iframe>");
|
53 |
|
|
}
|
54 |
|
|
}
|
55 |
|
|
/**
|
56 |
|
|
* inserts the header referenced by the ADVANCED_BROWSEBOX_URL setting
|
57 |
|
|
*/
|
58 |
|
|
function insertAdvancedBrowseBox() {
|
59 |
|
|
|
60 |
|
|
if (!_isBlank(ADVANCED_BROWSEBOX_URL)) {
|
61 |
|
|
|
62 |
|
|
_createIFrameWithURL(ADVANCED_BROWSEBOX_URL, IFRAME_ADVANCED_BROWSEBOX_CLASS);
|
63 |
|
|
}
|
64 |
|
|
|
65 |
|
|
}
|
66 |
|
|
|
67 |
|
|
/**
|
68 |
|
|
* inserts the header referenced by the LOGINBOX_URL setting
|
69 |
|
|
*/
|
70 |
4777
|
daigle
|
function insertLoginBox(loginFailure, serverContextUrl) {
|
71 |
3005
|
costa
|
|
72 |
|
|
if (!_isBlank(LOGINBOX_URL)) {
|
73 |
4777
|
daigle
|
|
74 |
|
|
LOGINBOX_URL = prependUrl(serverContextUrl, LOGINBOX_URL);
|
75 |
3005
|
costa
|
|
76 |
|
|
if (!_isBlank(loginFailure)) {
|
77 |
|
|
LOGINBOX_URL = LOGINBOX_URL + "?loginFailure=" + loginFailure;
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
_createIFrameWithURL(LOGINBOX_URL, IFRAME_LOGINBOX_CLASS);
|
81 |
|
|
}
|
82 |
|
|
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
/**
|
87 |
|
|
* inserts a URL to the metacat server to read a document
|
88 |
|
|
*/
|
89 |
3780
|
daigle
|
function insertDocument(servletURL, docid) {
|
90 |
3005
|
costa
|
|
91 |
|
|
if (!_isBlank(docid)) {
|
92 |
|
|
|
93 |
3780
|
daigle
|
documentURL = servletURL + "?action=read&docid=" + docid + "&qformat=lter&insertTemplate=0";
|
94 |
3005
|
costa
|
|
95 |
|
|
_createAutoscrollIFrameWithURL(documentURL, IFRAME_DOCUMENT_CLASS);
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
}
|