annotate client/digitallibrary/modules/newReferences.js @ 139:f70645db91a0

Servlet version 1.12b3
author robcast
date Mon, 18 Aug 2003 11:53:14 +0200
parents 7dc74e541d7c
children 825d2dc1da11
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
1 /*
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
2
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
3 Copyright (C) 2003 WTWG, Uni Bern
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
4
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
5 This program is free software; you can redistribute it and/or
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
6 modify it under the terms of the GNU General Public License
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
7 as published by the Free Software Foundation; either version 2
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
8 of the License, or (at your option) any later version.
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
9
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
13 GNU General Public License for more details.
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
14
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
16 along with this program; if not, write to the Free Software
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
18
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
19 Author: Christian Luginbuehl, 22.05.2003 , Version Alcatraz 0.4
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
20
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
21 */
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
22
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
23 /*************************************************************************
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
24 * newReferences.js : digilib-module *
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
25 * *
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
26 * desc: creates references in the new parameter format (key-value) *
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
27 * *
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
28 *************************************************************************/
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
29
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
30
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
31 /**
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
32 * ref, overriding original one
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
33 */
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
34 function ref(select) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
35
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
36 var hyperlinkRef = baseUrl + "/digilib.jsp?";
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
37
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
38 if ( select == 2 ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
39
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
40 // no original size is referenced at the moment,
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
41 // because the dpi values are not constant from user to user
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
42 removeMoFlag('osize');
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
43
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
44 var parameterString = '';
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
45
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
46 for ( param in dlParams ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
47 if ( (dlParams[param].detail < 9) && (dlParams[param].defaultValue != dlParams[param].value) ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
48 parameterString += "&" + param + "=" + dlParams[param].value;
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
49 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
50 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
51
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
52 parameterString += "&lv=3"; // level three
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
53
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
54 parameterString = parameterString.slice(1);
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
55
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
56 prompt("Alcatraz-style HTML link", hyperlinkRef + parameterString);
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
57
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
58 } else {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
59
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
60 var parameterString = '';
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
61
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
62 parameterString += dlParams.fn.value + "+" + dlParams.pn.value + "+" + dlParams.ws.value + "+";
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
63 parameterString += dlParams.mo.value + "+" + dlParams.mk.value;
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
64
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
65 if ( (dlParams.wx.value != 0) || (dlParams.wy.value != 0) || (dlParams.ww.value != 1) || (dlParams.wh.value != 1) ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
66 parameterString += "+" + dlParams.wx.value + "+" + dlParams.wy.value + "+" + dlParams.ww.value;
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
67 parameterString += "+" + dlParams.wh.value;
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
68 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
69
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
70 if ( select == 1 ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
71 prompt("Link for HTML-documents", hyperlinkRef+ parameterString);
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
72 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
73
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
74 if ( select == 0 ) {
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
75 prompt("Link for LaTeX-documents", "\\href{" + hyperlinkRef + parameterString + "}{TEXT}");
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
76 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
77 }
7dc74e541d7c unified scripts, nice xul sidebar, bugfixes
luginbue
parents:
diff changeset
78 }