1 |
4080
|
daigle
|
/*
|
2 |
|
|
* '$RCSfile$'
|
3 |
|
|
* Purpose: Default style sheet for admin web pages
|
4 |
|
|
* Copyright: 2008 Regents of the University of California and the
|
5 |
|
|
* National Center for Ecological Analysis and Synthesis
|
6 |
|
|
* Authors: Matt Jones
|
7 |
|
|
*
|
8 |
|
|
* '$Author$'
|
9 |
|
|
* '$Date$'
|
10 |
|
|
* '$Revision$'
|
11 |
|
|
*
|
12 |
|
|
* This program is free software; you can redistribute it and/or modify
|
13 |
|
|
* it under the terms of the GNU General Public License as published by
|
14 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
15 |
|
|
* (at your option) any later version.
|
16 |
|
|
*
|
17 |
|
|
* This program is distributed in the hope that it will be useful,
|
18 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
|
|
* GNU General Public License for more details.
|
21 |
|
|
*
|
22 |
|
|
* You should have received a copy of the GNU General Public License
|
23 |
|
|
* along with this program; if not, write to the Free Software
|
24 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25 |
|
|
*/
|
26 |
|
|
|
27 |
|
|
function validateForm(form_ref) {
|
28 |
|
|
j = form_ref.length
|
29 |
|
|
for (i = 0; i < j; i++) {
|
30 |
|
|
if (form_ref.elements[i].value == "") {
|
31 |
|
|
alert("All form fields must be populated");
|
32 |
|
|
return false;
|
33 |
|
|
}
|
34 |
|
|
}
|
35 |
|
|
return true;
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
function submitForm(action,form_ref) {
|
39 |
|
|
form_ref.action.value=action;
|
40 |
|
|
form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
|
41 |
|
|
form_ref.submit();
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
function validataAndSubmitForm(action,form_ref) {
|
45 |
|
|
form_ref.action.value=action;
|
46 |
|
|
form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
|
47 |
|
|
validateForm(form_ref)
|
48 |
|
|
form_ref.submit();
|
49 |
|
|
}
|
50 |
|
|
|
51 |
|
|
function forward(location) {
|
52 |
|
|
window.location = location;
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
function toggleHiddenRow(thisObj, id) {
|
56 |
|
|
if (thisObj.checked) {
|
57 |
|
|
showRow(id);
|
58 |
|
|
} else {
|
59 |
|
|
hideObject(id);
|
60 |
|
|
}
|
61 |
|
|
}
|
62 |
|
|
|
63 |
|
|
function toggleHiddenInline(thisObj, id) {
|
64 |
|
|
if (thisObj.checked) {
|
65 |
|
|
showInline(id);
|
66 |
|
|
} else {
|
67 |
|
|
hideObject(id);
|
68 |
|
|
}
|
69 |
|
|
}
|
70 |
|
|
|
71 |
|
|
function toggleHiddenTable(thisObj, id) {
|
72 |
|
|
if (thisObj.checked) {
|
73 |
|
|
showSection(id);
|
74 |
|
|
} else {
|
75 |
|
|
hideObject(id);
|
76 |
|
|
}
|
77 |
|
|
}
|
78 |
|
|
|
79 |
|
|
function hideObject(objectID)
|
80 |
|
|
{
|
81 |
|
|
document.getElementById(objectID).style.display = 'none';
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
function showRow(objectID)
|
85 |
|
|
{
|
86 |
|
|
document.getElementById(objectID).style.display = 'table-row';
|
87 |
|
|
}
|
88 |
|
|
|
89 |
|
|
function showInline(objectID)
|
90 |
|
|
{
|
91 |
|
|
document.getElementById(objectID).style.display = 'inline';
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
function showSection(objectID)
|
95 |
|
|
{
|
96 |
|
|
document.getElementById(objectID).style.display = 'table';
|
97 |
|
|
}
|