Revision 5501
Added by Jing Tao almost 14 years ago
kepler.js | ||
---|---|---|
84 | 84 |
// ( e.g. if you do not want a header to be included, set: HEADER_URL="";) |
85 | 85 |
//////////////////////////////////////////////////////////////////////////////// |
86 | 86 |
|
87 |
|
|
88 | 87 |
// Location of the header that will be displayed at the top of the page |
89 |
var HEADER_URL = "style/skins/kepler/header.jsp"; |
|
88 |
var HEADER_URL |
|
89 |
= "style/skins/kepler/header.jsp"; |
|
90 | 90 |
|
91 |
var LEFTCOL_URL = ""; |
|
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/kepler/searchform.jsp"; |
|
92 | 95 |
|
93 |
var RIGHTCOL_URL = ""; |
|
96 |
// Location of the advanced search box |
|
97 |
var ADVANCED_SEARCHBOX_URL |
|
98 |
= ""; |
|
94 | 99 |
|
95 |
var FOOTER_URL = ""; |
|
100 |
var LOGINBOX_URL |
|
101 |
= ""; |
|
96 | 102 |
|
97 |
// Location of the search box that will be displayed above the |
|
98 |
// results on the results page (optional) |
|
99 |
var SEARCHBOX_URL = "style/skins/kepler/searchform.jsp"; |
|
103 |
var MAP_URL |
|
104 |
= ""; |
|
100 | 105 |
|
106 |
// Location of the header that will be displayed at the top of the page |
|
107 |
var LEFTCOL_URL |
|
108 |
= ""; |
|
101 | 109 |
|
110 |
// Location of the header that will be displayed at the top of the page |
|
111 |
var RIGHTCOL_URL |
|
112 |
= ""; |
|
113 |
|
|
114 |
// Location of the header that will be displayed at the top of the page |
|
115 |
var FOOTER_URL |
|
116 |
= ""; |
|
117 |
|
|
102 | 118 |
|
103 | 119 |
|
104 | 120 |
|
... | ... | |
127 | 143 |
//(metacat only) search box iframe class |
128 | 144 |
var IFRAME_SEARCHBOX_CLASS = "iframesearchboxclass"; |
129 | 145 |
|
146 |
//(metacat only) advanced search box iframe class |
|
147 |
var IFRAME_ADVANCED_SEARCHBOX_CLASS = "iframeadvancedsearchboxclass"; |
|
148 |
|
|
149 |
// Interactive Map |
|
150 |
var IFRAME_MAP_CLASS = "iframemapclass"; |
|
151 |
|
|
152 |
//(metacat only) login box iframe class |
|
153 |
var IFRAME_LOGINBOX_CLASS = "iframeloginboxclass"; |
|
154 |
|
|
130 | 155 |
//left column iframe class |
131 | 156 |
var IFRAME_LEFTCOL_CLASS = "iframeleftcolclass"; |
132 | 157 |
|
... | ... | |
173 | 198 |
//includes a colspan |
174 | 199 |
var TEMPLATE_FOOTERROW_CLASS = "templatefooterrowclass"; |
175 | 200 |
|
176 |
// |
|
177 |
// Skin specific functions |
|
178 |
function submitform(formObj) { |
|
179 | 201 |
|
180 |
if (trim(formObj.elements["loginAction"].value)!="Login") return true; |
|
181 |
//trim username & passwd: |
|
182 |
var username = trim(formObj.elements["uid"].value); |
|
183 |
var organization = trim(formObj.elements["organization"].value); |
|
184 |
var password = trim(formObj.elements["password"].value); |
|
185 |
|
|
186 |
if (username=="") { |
|
187 |
alert("You must type a username. \n"+popupMsg); |
|
188 |
formObj.elements["uid"].focus(); |
|
189 |
return false; |
|
190 |
} |
|
191 |
|
|
192 |
if (organization=="") { |
|
193 |
alert("You must select an organization. \n"+popupMsg); |
|
194 |
formObj.elements["organization"].focus(); |
|
195 |
return false; |
|
196 |
} |
|
197 |
|
|
198 |
if (password=="") { |
|
199 |
alert("You must type a password. \n"+popupMsg); |
|
200 |
formObj.elements["password"].focus(); |
|
201 |
return false; |
|
202 |
} |
|
203 |
|
|
204 |
formObj.username.value="uid="+formObj.elements["uid"].value+",o="+formObj.elements["organization"].value+",dc=ecoinformatics,dc=org"; |
|
205 |
return true; |
|
206 |
} |
|
207 |
|
|
208 |
function trim(stringToTrim) { |
|
209 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,''); |
|
210 |
} |
Also available in: Unified diff
Merge 1.9.3 branch to the trunk.