source: trunk/gsdl/macros/pref.dm@ 735

Last change on this file since 735 was 735, checked in by sjboddie, 25 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 9.6 KB
Line 
1package preferences
2
3
4#######################################################################
5# java images/scripts
6#######################################################################
7
8# the _javalinks_ macros are the flashy image links at the top right of
9# the page. this is overridden here as we don't want a 'preferences'
10# link on this page
11
12_javalinks_ {_imagehome__imagehelp_}
13_javalinks_ [v=1] {
14_imagehome_<br>
15_imagehelp_<br>
16}
17
18
19#######################################################################
20# scripts
21# note that changing either the "m" or the "o" argument
22# from the preferences page necessitates reseting the "r"
23# argument to 1
24#######################################################################
25
26_pagescriptextra_ {
27// preferences scripts generated from \_preferences:pagescriptextra\_
28
29 savedhrefs = new Object();
30
31 argk = "";
32 args = "";
33 argm = "";
34 argo = "";
35 argb = "";
36 argel = "";
37 argil = "";
38
39 function initialize () \{
40 for (i = 0; i < document.links.length; i++)
41 savedhrefs[i] = document.links[i].href;
42 \}
43
44 function updatehrefs () \{
45 for (i = 0; i < document.links.length; i++)
46 document.links[i].href = savedhrefs[i] + argk + args + argm + argo + argb + argel + argil;
47 \}
48
49 function updatek (value) \{
50 if (value != _cgiargk_) argk = "&k=" + value;
51 else argk = "";
52 updatehrefs();
53 \}
54
55 function updates (value) \{
56 if (value != _cgiargs_) args = "&s=" + value;
57 else args = "";
58 updatehrefs();
59 \}
60
61 function updatem () \{
62 value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
63 if (value != _cgiargm_) argm = "&r=1&m=" + value;
64 else argm = "";
65 updatehrefs();
66 \}
67
68 function updateo () \{
69 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
70 if (value != _cgiargo_) argo = "&r=1&o=" + value;
71 else argo = "";
72 updatehrefs();
73 \}
74
75 function updateb (value) \{
76 if (value != _cgiargb_) argb = "&b=" + value;
77 else argb = "";
78 updatehrefs();
79 \}
80
81 function updateel () \{
82 value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value;
83 if (value != "_cgiargel_") argel = "&el=" + value;
84 else argel = "";
85 updatehrefs();
86 \}
87
88 function updateil () \{
89 value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value;
90 if (value != "_cgiargil_") argil = "&il=" + value;
91 else argil = "";
92 updatehrefs();
93 \}
94
95 function updatel () \{
96 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
97 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&l=" + value;
98 \}
99
100 function updatev () \{
101 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
102 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&v=" + value;
103 \}
104
105 function updatew () \{
106 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
107 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&nw=" + value;
108 \}
109
110}
111
112#######################################################################
113# headers
114# these are overridden so we can put an onLoad event handler
115# in the <body> tag of this page
116#######################################################################
117
118
119_header_ {_cgihead_
120_htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
121}
122
123# this declaration ends up being the same as style=restrict, never mind
124_header_[v=1] {_cgihead_
125_htmlhead_(onLoad="initialize();")_pagebanner_
126}
127
128
129#######################################################################
130# page content
131#######################################################################
132
133_pagetitle_ {_collectionname_: _textpreferences_}
134_imagethispage_ {_iconthispage_}
135
136_caseoption_ {
137<input type=radio name=k value=1 onClick="updatek(1);"
138 _If_(_cgiargk_, checked)>_textignorecase_<br>
139<input type=radio name=k value=0 onClick="updatek(0);"
140 _If_(_cgiargk_,, checked)>_textmatchcase_
141}
142
143_caseoption_ [l=zh] {}
144
145_stemoption_ {
146<input type=radio name=s value=1 onClick="updates(1);"
147 _If_(_cgiargs_, checked)>_textstem_<br>
148<input type=radio name=s value=0 onClick="updates(0);"
149 _If_(_cgiargs_,, checked)>_textnostem_
150}
151
152_stemoption_ [l=zh] {}
153
154_maxdocoption_ {
155<select name="m" onChange="updatem();">
156 <option value="50"_If_("_cgiargm_" eq "50", selected)>50
157 <option value="100"_If_("_cgiargm_" eq "100", selected)>100
158 <option value="200"_If_("_cgiargm_" eq "200", selected)>200
159</select>
160}
161
162_hitsperpageoption_ {
163<select name="o" onChange="updateo();">
164 <option value="10"_If_("_cgiargo_" eq "10", selected)>10
165 <option value="20"_If_("_cgiargo_" eq "20", selected)>20
166 <option value="50"_If_("_cgiargo_" eq "50", selected)>50
167 <option value="100")_If_("_cgiargo_" eq "100", selected)>all
168</select>
169}
170
171_modeoption_ {
172<input type=radio name=b value=0 onClick="updateb(0);"
173 _If_(_cgiargb_,, checked)>_textsimplemode_<br>
174<input type=radio name=b value=1 onClick="updateb(1);"
175 _If_(_cgiargb_, checked)>_textadvancedmode_
176}
177
178_extlinkoption_ {
179_textextlink_
180<select name="el" onChange="updateel();">
181 <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)>
182 through intermediate page
183 <option value="direct"_If_("_cgiargel_" eq "direct", selected)>
184 go directly there
185</select>
186}
187
188_intlinkoption_ {
189_textintlink_
190<select name="il" onChange="updateil();">
191 <option value="l"_If_("_cgiargil_" eq "l", selected)>
192 the digital library
193 <option value="w"_If_("_cgiargil_" eq "w", selected)>
194 the Web
195</select>
196}
197
198
199_languageoption_ {
200_textlanguage_
201<select name="l" onChange="updatel();">
202 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
203 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>M&auml;ori
204 <option value="zh"_If_("_cgiargl_" eq "zh", selected)>Chinese
205</select>
206}
207
208_encodingoption_ {
209_textencoding_
210<select name="w" onChange="updatew();">
211 <option value="w" _If_("_cgiargw_" eq "w",selected)>Western (ISO-8859-1)
212 <option value="u" _If_("_cgiargw_" eq "u",selected)>UTF-8
213 <option value="g" _If_("_cgiargw_" eq "g",selected)>GBK
214</select>
215}
216
217_formatoption_ {
218_textformat_
219<select name="v" onChange="updatev();">
220 <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
221 <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
222</select>
223}
224
225_content_ {
226<center>
227_navigationbar_
228</center>
229<blockquote>
230
231<form name=PrefForm method=get action="_gwcgi_">
232
233<input type="hidden" name="e" value="_compressedoptions_">
234
235<p>
236_caseoption_
237
238<p>
239_stemoption_
240
241<p>
242_textprefop_
243
244<p>
245_modeoption_
246
247<p>
248_extlinkoption_
249
250<p>
251_intlinkoption_
252
253<p>
254_languageoption_
255
256<p>
257_encodingoption_
258
259<p>
260_formatoption_
261
262</blockquote>
263</form>
264}
265
266
267#######################################################################
268# https
269#######################################################################
270
271_httpiconhpref_ {_httpimg_/h\_pref.gif}
272_httpiconhpref_ [l=mi] {_httpimg_/mh\_pref.gif}
273_widthhpref_ {200}
274_widthhpref_ [l=mi] {220}
275_heighthpref_ {57}
276
277
278#######################################################################
279# icons
280#######################################################################
281
282_iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
283_iconthispage_ [l=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
284
285
286#######################################################################
287# english macros
288#######################################################################
289
290_textpreferences_ {Preferences}
291_textignorecase_ { ignore case differences}
292_textmatchcase_ { upper/lower case must match}
293_textstem_ { ignore word endings}
294_textnostem_ { whole word must match}
295_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
296_textextlink_ {Access to external Web pages: }
297_textintlink_ {Source documents retrieved from:}
298_textlanguage_ {Interface language: }
299_textencoding_ {Encoding: }
300_textformat_ {Interface format: }
301_textsimplemode_ {simple query mode}
302_textadvancedmode_ {advanced query mode (allows boolean searching using !, &, |, and parenthesis)}
303_textgraphical_ {Graphical}
304_texttextual_ {Textual}
305
306
307#######################################################################
308# chinese macros
309#######################################################################
310_textintlink_ [l=zh] {}
311_textextlink_ [l=zh] {}
312
313_textprefop_ [l=zh] {查询最倚返回 
314  _maxdocoption_ 记圕每页返回
315_hitsperpageoption_ 记圕}
316_textlanguage_ [l=zh] {界面语蚀}
317_textsimplemode_ [l=zh] {简单查询方匏}
318_textadvancedmode_ [l=zh] {高级查询方匏(可以䜿甚 !、&、| 和括号来进行垃尔查询)}
319_textencoding_ [l=zh] {猖码方匏}
320_textformat_ [l=zh] {界面栌匏}
321
322#######################################################################
323# maori macros
324#######################################################################
325
326_textpreferences_ [l=mi] {Whiriwhiringa}
327_textignorecase_ [l=mi] { hei aha te p&uuml; matua me te p&uuml; iti}
328_textmatchcase_ [l=mi] { me tika te p&uuml; matua me te p&uuml; iti}
329_textstem_ [l=mi] { hei aha te k&uuml;muri}
330_textnostem_ [l=mi] { me tika te k&uuml;muri}
331_textprefop_ [l=mi] {Whakahokia mai te _maxdocoption_ kupu, &auml;, kia _hitsperpageoption_ kupu ki ia wh&auml;rangi.}
332_textlanguage_ [l=mi] {Reo: }
333_textencoding_ [l=mi] {Whakatakotoranga p&uuml;: }
334_textformat_ [l=mi] {Whakatakotoranga wh&auml;rangi: }
335_textsimplemode_ [l=mi] {te rapu wh&auml;iti}
336_textadvancedmode_ [l=mi] {te rapu wh&auml;nui (ka taea te whakamahia ng&auml; p&uuml; boolean,
337p&euml;r&auml; i te !, &, |, me te "()" hoki)}
338_textgraphical_ [l=mi] {Whakaahua}
339_texttextual_ [l=mi] {K&auml;ore he whakaahua}
340
341
342
343
Note: See TracBrowser for help on using the repository browser.