Mercurial > hg > digilib-old
annotate client/digitallibrary/modules/newReferences.js @ 313:24dbc008be14
big autumn cleaning :-)
- finally digilib.jsp uses the new javascript code
- dito digicat.jsp
- all files corresponding to the old frontend moved into /oldskin
- all icons moved into /img
| author | robcast |
|---|---|
| date | Thu, 28 Oct 2004 22:25:58 +0200 |
| parents | 5309ee93e249 |
| children |
| rev | line source |
|---|---|
| 135 | 1 /* |
| 2 | |
| 3 Copyright (C) 2003 WTWG, Uni Bern | |
| 4 | |
| 5 This program is free software; you can redistribute it and/or | |
| 6 modify it under the terms of the GNU General Public License | |
| 7 as published by the Free Software Foundation; either version 2 | |
| 8 of the License, or (at your option) any later version. | |
| 9 | |
| 10 This program is distributed in the hope that it will be useful, | |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 GNU General Public License for more details. | |
| 14 | |
| 15 You should have received a copy of the GNU General Public License | |
| 16 along with this program; if not, write to the Free Software | |
| 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
| 18 | |
| 19 Author: Christian Luginbuehl, 22.05.2003 , Version Alcatraz 0.4 | |
| 20 | |
| 21 */ | |
| 22 | |
| 23 /************************************************************************* | |
| 24 * newReferences.js : digilib-module * | |
| 25 * * | |
| 26 * desc: creates references in the new parameter format (key-value) * | |
| 27 * * | |
| 28 *************************************************************************/ | |
| 29 | |
| 30 | |
| 31 /** | |
| 32 * ref, overriding original one | |
| 33 */ | |
| 34 function ref(select) { | |
| 35 | |
| 36 var hyperlinkRef = baseUrl + "/digilib.jsp?"; | |
| 37 | |
|
229
5309ee93e249
new versions on modules and contexto tool to show text
luginbue
parents:
135
diff
changeset
|
38 if ( select >= 2 ) { |
| 135 | 39 |
| 40 // no original size is referenced at the moment, | |
| 41 // because the dpi values are not constant from user to user | |
| 42 removeMoFlag('osize'); | |
| 43 | |
| 44 var parameterString = ''; | |
| 45 | |
| 46 for ( param in dlParams ) { | |
| 47 if ( (dlParams[param].detail < 9) && (dlParams[param].defaultValue != dlParams[param].value) ) { | |
| 48 parameterString += "&" + param + "=" + dlParams[param].value; | |
| 49 } | |
| 50 } | |
| 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 | 61 |
| 62 } else { | |
| 63 | |
| 64 var parameterString = ''; | |
| 65 | |
| 66 parameterString += dlParams.fn.value + "+" + dlParams.pn.value + "+" + dlParams.ws.value + "+"; | |
| 67 parameterString += dlParams.mo.value + "+" + dlParams.mk.value; | |
| 68 | |
| 69 if ( (dlParams.wx.value != 0) || (dlParams.wy.value != 0) || (dlParams.ww.value != 1) || (dlParams.wh.value != 1) ) { | |
| 70 parameterString += "+" + dlParams.wx.value + "+" + dlParams.wy.value + "+" + dlParams.ww.value; | |
| 71 parameterString += "+" + dlParams.wh.value; | |
| 72 } | |
| 73 | |
| 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 | 76 } |
| 77 | |
| 78 if ( select == 0 ) { | |
| 79 prompt("Link for LaTeX-documents", "\\href{" + hyperlinkRef + parameterString + "}{TEXT}"); | |
| 80 } | |
| 81 } | |
| 82 } |
