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

Last change on this file since 644 was 644, 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: 7.8 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
37 function initialize () \{
38 for (i = 0; i < document.links.length; i++)
39 savedhrefs[i] = document.links[i].href;
40 \}
41
42 function updatehrefs () \{
43 for (i = 0; i < document.links.length; i++)
44 document.links[i].href = savedhrefs[i] + argk + args + argm + argo + argb;
45 \}
46
47 function updatek (value) \{
48 if (value != _cgiargk_) argk = "&k=" + value;
49 else argk = "";
50 updatehrefs();
51 \}
52
53 function updates (value) \{
54 if (value != _cgiargs_) args = "&s=" + value;
55 else args = "";
56 updatehrefs();
57 \}
58
59 function updatem () \{
60 value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
61 if (value != _cgiargm_) argm = "&r=1&m=" + value;
62 else argm = "";
63 updatehrefs();
64 \}
65
66 function updateo () \{
67 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
68 if (value != _cgiargo_) argo = "&r=1&o=" + value;
69 else argo = "";
70 updatehrefs();
71 \}
72
73 function updateb (value) \{
74 if (value != _cgiargb_) argb = "&b=" + value;
75 else argb = "";
76 updatehrefs();
77 \}
78
79 function updatel () \{
80 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
81 location.href = location.href + argk + args + argm + argo + argb + "&l=" + value;
82 \}
83
84 function updatev () \{
85 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
86 location.href = location.href + argk + args + argm + argo + argb + "&v=" + value;
87 \}
88
89 function updatew () \{
90 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
91 location.href = location.href + argk + args + argm + argo + argb + "&nw=" + value;
92 \}
93
94}
95
96#######################################################################
97# headers
98# these are overridden so we can put an onLoad event handler
99# in the <body> tag of this page
100#######################################################################
101
102
103_header_ {_cgihead_
104_htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
105}
106
107# this declaration ends up being the same as style=restrict, never mind
108_header_[v=1] {_cgihead_
109_htmlhead_(onLoad="initialize();")_pagebanner_
110}
111
112
113#######################################################################
114# page content
115#######################################################################
116
117_pagetitle_ {_collectionname_: _textpreferences_}
118_imagethispage_ {_iconthispage_}
119
120_caseoption_ {
121<input type=radio name=k value=1 onClick="updatek(1);"
122 _If_(_cgiargk_, checked)>_textignorecase_<br>
123<input type=radio name=k value=0 onClick="updatek(0);"
124 _If_(_cgiargk_,, checked)>_textmatchcase_
125}
126
127_stemoption_ {
128<input type=radio name=s value=1 onClick="updates(1);"
129 _If_(_cgiargs_, checked)>_textstem_<br>
130<input type=radio name=s value=0 onClick="updates(0);"
131 _If_(_cgiargs_,, checked)>_textnostem_
132}
133
134_maxdocoption_ {
135<select name="m" onChange="updatem();">
136 <option value="50"_If_("_cgiargm_" eq "50", selected)>50
137 <option value="100"_If_("_cgiargm_" eq "100", selected)>100
138 <option value="200"_If_("_cgiargm_" eq "200", selected)>200
139</select>
140}
141
142_hitsperpageoption_ {
143<select name="o" onChange="updateo();">
144 <option value="10"_If_("_cgiargo_" eq "10", selected)>10
145 <option value="20"_If_("_cgiargo_" eq "20", selected)>20
146 <option value="50"_If_("_cgiargo_" eq "50", selected)>50
147 <option value="100")_If_("_cgiargo_" eq "100", selected)>all
148</select>
149}
150
151_modeoption_ {
152<input type=radio name=b value=0 onClick="updateb(0);"
153 _If_(_cgiargb_,, checked)>_textsimplemode_<br>
154<input type=radio name=b value=1 onClick="updateb(1);"
155 _If_(_cgiargb_, checked)>_textadvancedmode_
156}
157
158_languageoption_ {
159_textlanguage_
160<select name="l" onChange="updatel();">
161 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
162 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>M&auml;ori
163 <option value="zh"_If_("_cgiargl_" eq "zh", selected)>Chinese
164</select>
165}
166
167_encodingoption_ {
168_textencoding_
169<select name="w" onChange="updatew();">
170 <option value="w" _If_("_cgiargw_" eq "w",selected)>Western (ISO-8859-1)
171 <option value="u" _If_("_cgiargw_" eq "u",selected)>UTF-8
172 <option value="g" _If_("_cgiargw_" eq "g",selected)>GBK
173</select>
174}
175
176_formatoption_ {
177_textformat_
178<select name="v" onChange="updatev();">
179 <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
180 <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
181</select>
182}
183
184_content_ {
185<center>
186_navigationbar_
187</center>
188<blockquote>
189
190<form name=PrefForm method=get action="_gwcgi_">
191
192<input type="hidden" name="e" value="_compressedoptions_">
193
194<p>_caseoption_
195
196<p>_stemoption_
197
198<p>
199_textprefop_
200
201<p>
202_modeoption_
203
204<p>
205_languageoption_
206
207<p>
208_encodingoption_
209
210<p>
211_formatoption_
212
213</blockquote>
214</form>
215}
216
217
218#######################################################################
219# https
220#######################################################################
221
222_httpiconhpref_ {_httpimg_/h\_pref.gif}
223_httpiconhpref_ [l=mi] {_httpimg_/mh\_pref.gif}
224_widthhpref_ {200}
225_widthhpref_ [l=mi] {220}
226_heighthpref_ {57}
227
228
229#######################################################################
230# icons
231#######################################################################
232
233_iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
234_iconthispage_ [l=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
235
236
237#######################################################################
238# english macros
239#######################################################################
240
241_textpreferences_ {Preferences}
242_textignorecase_ { ignore case differences}
243_textmatchcase_ { upper/lower case must match}
244_textstem_ { ignore word endings}
245_textnostem_ { whole word must match}
246_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
247_textlanguage_ {Interface language: }
248_textencoding_ {Encoding: }
249_textformat_ {Interface format: }
250_textsimplemode_ {simple query mode}
251_textadvancedmode_ {advanced query mode (allows boolean searching using !, &, |, and parenthesis)}
252_textgraphical_ {Graphical}
253_texttextual_ {Textual}
254
255
256#######################################################################
257# maori macros
258#######################################################################
259
260_textpreferences_ [l=mi] {Whiriwhiringa}
261_textignorecase_ [l=mi] { hei aha te p&uuml; matua me te p&uuml; iti}
262_textmatchcase_ [l=mi] { me tika te p&uuml; matua me te p&uuml; iti}
263_textstem_ [l=mi] { hei aha te k&uuml;muri}
264_textnostem_ [l=mi] { me tika te k&uuml;muri}
265_textprefop_ [l=mi] {Whakahokia mai te _maxdocoption_ kupu, &auml;, kia _hitsperpageoption_ kupu ki ia wh&auml;rangi.}
266_textlanguage_ [l=mi] {Reo: }
267_textencoding_ [l=mi] {Whakatakotoranga p&uuml;: }
268_textformat_ [l=mi] {Whakatakotoranga wh&auml;rangi: }
269_textsimplemode_ [l=mi] {te rapu wh&auml;iti}
270_textadvancedmode_ [l=mi] {te rapu wh&auml;nui (ka taea te whakamahia ng&auml; p&uuml; boolean,
271p&euml;r&auml; i te !, &, |, me te "()" hoki)}
272_textgraphical_ [l=mi] {Whakaahua}
273_texttextual_ [l=mi] {K&auml;ore he whakaahua}
274
275
276
277
Note: See TracBrowser for help on using the repository browser.