annotate client/digitallibrary/modules/newReferences.js @ 517:72604a10ee1a Root_jquery

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