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

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

lots more changes

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 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 <option value="500"_If_("_cgiargm_" eq "500", selected)>500
134</select>
135}
136
137_hitsperpageoption_ {
138<select name="o" onChange="o\_update();">
139 <option value="10"_If_("_cgiargo_" eq "10", selected)>10
140 <option value="20"_If_("_cgiargo_" eq "20", selected)>20
141 <option value="50"_If_("_cgiargo_" eq "50", selected)>50
142 <option value="100")_If_("_cgiargo_" eq "100", selected)>100
143 <option value="500"_If_("_cgiargo_" eq "500", selected)>all
144</select>
145}
146
147_languageoption_ {
148_textlanguage_
149<select name="l" onChange="l\_update();">
150 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
151 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>Maori
152</select>
153}
154
155_formatoption_ {
156_textformat_
157<select name="v" onChange="v\_update();">
158 <option value="0"_If_("_cgiargv_" eq "0", selected)>Graphical
159 <option value="1"_If_("_cgiargv_" eq "1", selected)>Textual
160</select>
161}
162
163_content_ {
164<center>
165_navigationbar_
166</center>
167<blockquote>
168
169<form name=PrefForm method=get action="_gwcgi_">
170
171<input type="hidden" name="e" value="_compressedoptions_">
172
173<p>_caseoption_
174
175<p>_stemoption_
176
177<p>
178_textprefop_
179
180<p>
181_languageoption_
182
183<p>
184_formatoption_
185
186</blockquote>
187</form>
188}
189
190
191#######################################################################
192# https
193#######################################################################
194
195_httpiconhpref_ {_httpimg_/h\_pref.gif}
196_httpiconhpref_ [language=mi] {_httpimg_/mh\_pref.gif}
197_widthhpref_ {200}
198_widthhpref_ [language=mi] {220}
199_heighthpref_ {57}
200
201
202#######################################################################
203# icons
204#######################################################################
205
206_iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
207_iconthispage_ [language=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
208
209
210#######################################################################
211# english macros
212#######################################################################
213
214_textpreferences_ {Preferences}
215_textignorecase_ { ignore case differences}
216_textmatchcase_ { upper/lower case must match}
217_textstem_ { ignore word endings}
218_textnostem_ { whole word must match}
219_textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
220_textlanguage_ {Interface language: }
221_textformat_ {Interface format: }
222
223#######################################################################
224# maori macros
225#######################################################################
226
227_textpreferences_ [language=mi] {Whiriwhiringa}
228_textignorecase_ [language=mi] { hei aha te p&uuml; matua me te p&uuml; iti}
229_textmatchcase_ [language=mi] { me tika te p&uuml; matua me te p&uuml; iti}
230_textstem_ [language=mi] { hei aha te k&uuml;muri}
231_textnostem_ [language=mi] { me tika te k&uuml;muri}
232_textprefop_ [language=mi] {Whakahokia mai te _maxdocoption_ kupu, &auml;, kia _hitsperpageoption_ kupu ki ia wh&auml;rangi.}
233
234
235
236
237
238
Note: See TracBrowser for help on using the repository browser.