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

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