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

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

lots of little changes to macro files

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.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__imageabout__imagehelp_}
13_javalinks_ [version=text] {
14_imagehome_<br>
15_imageabout_<br>
16_imagehelp_<br>
17}
18
19
20#######################################################################
21# scripts
22# note that changing either the "m" or the "o" argument
23# from the preferences page necessitates reseting the "r"
24# argument to 1
25#######################################################################
26
27_pagescriptextra_ {
28// preferences scripts generated from \_preferences:pagescriptextra\_
29
30 savedhrefs = new Object();
31
32 k\_arg = "";
33 s\_arg = "";
34 m\_arg = "";
35 o\_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;
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 l\_update () \{
74 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
75 location.href = location.href + k\_arg + s\_arg + m\_arg + o\_arg + "&l=" + value;
76 \}
77
78 function v\_update () \{
79 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
80 location.href = location.href + k\_arg + s\_arg + m\_arg + o\_arg + "&v=" + value;
81 \}
82}
83
84#######################################################################
85# headers
86# these are overridden so we can put an onLoad event handler
87# in the <body> tag of this page
88#######################################################################
89
90
91_header_ {_cgihead_
92_htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
93}
94
95# this declaration ends up being the same as style=restrict, never mind
96_header_[version=text] {_cgihead_
97_htmlhead_(onLoad="initialize();")_pagebanner_
98}
99
100# style=restrict lacks the sidestripe, version links and
101# language links
102_header_[style=restrict] {_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_languageoption_ {
146_textlanguage_
147<select name="l" onChange="l\_update();">
148 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
149 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>Maori
150</select>
151}
152
153_formatoption_ {
154_textformat_
155<select name="v" onChange="v\_update();">
156 <option value="0"_If_("_cgiargv_" eq "0", selected)>Graphical
157 <option value="1"_If_("_cgiargv_" eq "1", selected)>Textual
158</select>
159}
160
161_content_ {
162<center>
163_navigationbar_
164</center>
165<blockquote>
166
167<form name=PrefForm method=get action="_gwcgi_">
168
169<input type="hidden" name="e" value="_compressedoptions_">
170
171<p>_caseoption_
172
173<p>_stemoption_
174
175<p>
176_textprefop_
177
178<p>
179_languageoption_
180
181<p>
182_formatoption_
183
184</blockquote>
185</form>
186}
187
188
189#######################################################################
190# https
191#######################################################################
192
193_httpiconhpref_ {_httpimg_/h\_pref.gif}
194_httpiconhpref_ [language=mi] {_httpimg_/mh\_pref.gif}
195_widthhpref_ {200}
196_widthhpref_ [language=mi] {220}
197_heighthpref_ {57}
198
199
200#######################################################################
201# icons
202#######################################################################
203
204_iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
205_iconthispage_ [language=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
206
207
208#######################################################################
209# english macros
210#######################################################################
211
212_textpreferences_ {Preferences}
213_textignorecase_ { ignore case differences}
214_textmatchcase_ { upper/lower case must match}
215_textstem_ { ignore word endings}
216_textnostem_ { whole word must match}
217_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
218_textlanguage_ {Interface language: }
219_textformat_ {Interface format: }
220
221#######################################################################
222# maori macros
223#######################################################################
224
225_textpreferences_ [language=mi] {Whiriwhiringa}
226_textignorecase_ [language=mi] { hei aha te p&uuml; matua me te p&uuml; iti}
227_textmatchcase_ [language=mi] { me tika te p&uuml; matua me te p&uuml; iti}
228_textstem_ [language=mi] { hei aha te k&uuml;muri}
229_textnostem_ [language=mi] { me tika te k&uuml;muri}
230_textprefop_ [language=mi] {Whakahokia mai te _maxdocoption_ kupu, &auml;, kia _hitsperpageoption_ kupu ki ia wh&auml;rangi.}
231
232
233
234
235
236
Note: See TracBrowser for help on using the repository browser.