1 | package preferences
|
---|
2 |
|
---|
3 |
|
---|
4 | #######################################################################
|
---|
5 | # scripts
|
---|
6 | # note that changing either the "m" or the "o" argument
|
---|
7 | # from the preferences page necessitates reseting the "r"
|
---|
8 | # argument to 1
|
---|
9 | #######################################################################
|
---|
10 |
|
---|
11 | _pagescriptextra_ {
|
---|
12 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
13 |
|
---|
14 | savedhrefs = new Object();
|
---|
15 |
|
---|
16 | k\_arg = "";
|
---|
17 | s\_arg = "";
|
---|
18 | m\_arg = "";
|
---|
19 | o\_arg = "";
|
---|
20 |
|
---|
21 | function initialize () \{
|
---|
22 | for (i = 0; i < document.links.length; i++)
|
---|
23 | savedhrefs[i] = document.links[i].href;
|
---|
24 | \}
|
---|
25 |
|
---|
26 | function update\_hrefs () \{
|
---|
27 | for (i = 0; i < document.links.length; i++)
|
---|
28 | document.links[i].href = savedhrefs[i] + k\_arg + s\_arg + m\_arg + o\_arg;
|
---|
29 | \}
|
---|
30 |
|
---|
31 | function k\_update (value) \{
|
---|
32 | if (value != _cgiargk_) k\_arg = "&k=" + value;
|
---|
33 | else k\_arg = "";
|
---|
34 | update\_hrefs();
|
---|
35 | \}
|
---|
36 |
|
---|
37 | function s\_update (value) \{
|
---|
38 | if (value != _cgiargs_) s\_arg = "&s=" + value;
|
---|
39 | else s\_arg = "";
|
---|
40 | update\_hrefs();
|
---|
41 | \}
|
---|
42 |
|
---|
43 | function m\_update () \{
|
---|
44 | value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value;
|
---|
45 | if (value != _cgiargm_) m\_arg = "&r=1&m=" + value;
|
---|
46 | else m\_arg = "";
|
---|
47 | update\_hrefs();
|
---|
48 | \}
|
---|
49 |
|
---|
50 | function o\_update () \{
|
---|
51 | value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value;
|
---|
52 | if (value != _cgiargo_) o\_arg = "&r=1&o=" + value;
|
---|
53 | else o\_arg = "";
|
---|
54 | update\_hrefs();
|
---|
55 | \}
|
---|
56 |
|
---|
57 | function l\_update () \{
|
---|
58 | value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
|
---|
59 | location.href = location.href + k\_arg + s\_arg + m\_arg + o\_arg + "&l=" + value;
|
---|
60 | \}
|
---|
61 |
|
---|
62 | function v\_update () \{
|
---|
63 | value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
|
---|
64 | location.href = location.href + k\_arg + s\_arg + m\_arg + o\_arg + "&v=" + value;
|
---|
65 | \}
|
---|
66 | }
|
---|
67 |
|
---|
68 | #######################################################################
|
---|
69 | # headers
|
---|
70 | # these are overridden so we can put an onLoad event handler
|
---|
71 | # in the <body> tag of this page
|
---|
72 | #######################################################################
|
---|
73 |
|
---|
74 |
|
---|
75 | _header_ {_cgihead_
|
---|
76 | _htmlhead_(background="_httpiconchalk_" onLoad="initialize();")_startspacer__pagebanner_
|
---|
77 | }
|
---|
78 |
|
---|
79 | # this declaration ends up being the same as style=restrict, never mind
|
---|
80 | _header_[version=text] {_cgihead_
|
---|
81 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
82 | }
|
---|
83 |
|
---|
84 | # style=restrict lacks the sidestripe, version links and
|
---|
85 | # language links
|
---|
86 | _header_[style=restrict] {_cgihead_
|
---|
87 | _htmlhead_(onLoad="initialize();")_pagebanner_
|
---|
88 | }
|
---|
89 |
|
---|
90 |
|
---|
91 | #######################################################################
|
---|
92 | # page content
|
---|
93 | #######################################################################
|
---|
94 |
|
---|
95 | _pagetitle_ {_collectionname_: _textpreferences_}
|
---|
96 | _imagethispage_ {_iconthispage_}
|
---|
97 |
|
---|
98 | _caseoption_ {
|
---|
99 | <input type=radio name=k value=1 onClick="k\_update(1);"
|
---|
100 | _If_(_cgiargk_, checked)>_textignorecase_<br>
|
---|
101 | <input type=radio name=k value=0 onClick="k\_update(0);"
|
---|
102 | _If_(_cgiargk_,, checked)>_textmatchcase_
|
---|
103 | }
|
---|
104 |
|
---|
105 | _stemoption_ {
|
---|
106 | <input type=radio name=s value=1 onClick="s\_update(1);"
|
---|
107 | _If_(_cgiargs_, checked)>_textstem_<br>
|
---|
108 | <input type=radio name=s value=0 onClick="s\_update(0);"
|
---|
109 | _If_(_cgiargs_,, checked)>_textnostem_
|
---|
110 | }
|
---|
111 |
|
---|
112 | _maxdocoption_ {
|
---|
113 | <select name="m" onChange="m\_update();">
|
---|
114 | <option value="50"_If_("_cgiargm_" eq "50", selected)>50
|
---|
115 | <option value="100"_If_("_cgiargm_" eq "100", selected)>100
|
---|
116 | <option value="200"_If_("_cgiargm_" eq "200", selected)>200
|
---|
117 | <option value="500"_If_("_cgiargm_" eq "500", selected)>500
|
---|
118 | </select>
|
---|
119 | }
|
---|
120 |
|
---|
121 | _hitsperpageoption_ {
|
---|
122 | <select name="o" onChange="o\_update();">
|
---|
123 | <option value="10"_If_("_cgiargo_" eq "10", selected)>10
|
---|
124 | <option value="20"_If_("_cgiargo_" eq "20", selected)>20
|
---|
125 | <option value="50"_If_("_cgiargo_" eq "50", selected)>50
|
---|
126 | <option value="100")_If_("_cgiargo_" eq "100", selected)>100
|
---|
127 | <option value="500"_If_("_cgiargo_" eq "500", selected)>all
|
---|
128 | </select>
|
---|
129 | }
|
---|
130 |
|
---|
131 | _languageoption_ {
|
---|
132 | _textlanguage_
|
---|
133 | <select name="l" onChange="l\_update();">
|
---|
134 | <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English
|
---|
135 | <option value="mi"_If_("_cgiargl_" eq "mi", selected)>Maori
|
---|
136 | </select>
|
---|
137 | }
|
---|
138 |
|
---|
139 | _formatoption_ {
|
---|
140 | _textformat_
|
---|
141 | <select name="v" onChange="v\_update();">
|
---|
142 | <option value="0"_If_("_cgiargv_" eq "0", selected)>Graphical
|
---|
143 | <option value="1"_If_("_cgiargv_" eq "1", selected)>Textual
|
---|
144 | </select>
|
---|
145 | }
|
---|
146 |
|
---|
147 | _content_ {
|
---|
148 | <center>
|
---|
149 | _navigationbar_
|
---|
150 | </center>
|
---|
151 | <blockquote>
|
---|
152 |
|
---|
153 | <form name=PrefForm method=get action="_gwcgi_">
|
---|
154 |
|
---|
155 | <input type="hidden" name="e" value="_compressedoptions_">
|
---|
156 |
|
---|
157 | <p>_caseoption_
|
---|
158 |
|
---|
159 | <p>_stemoption_
|
---|
160 |
|
---|
161 | <p>
|
---|
162 | _textprefop_
|
---|
163 |
|
---|
164 | <p>
|
---|
165 | _languageoption_
|
---|
166 |
|
---|
167 | <p>
|
---|
168 | _formatoption_
|
---|
169 |
|
---|
170 | </blockquote>
|
---|
171 | </form>
|
---|
172 | }
|
---|
173 |
|
---|
174 |
|
---|
175 | #######################################################################
|
---|
176 | # https
|
---|
177 | #######################################################################
|
---|
178 |
|
---|
179 | _httpiconhpref_ {_httpimg_/h\_pref.gif}
|
---|
180 | _httpiconhpref_ [language=mi] {_httpimg_/mh\_pref.gif}
|
---|
181 | _widthhpref_ {200}
|
---|
182 | _widthhpref_ [language=mi] {220}
|
---|
183 | _heighthpref_ {57}
|
---|
184 |
|
---|
185 |
|
---|
186 | #######################################################################
|
---|
187 | # icons
|
---|
188 | #######################################################################
|
---|
189 |
|
---|
190 | _iconthispage_ {<img src="_httpiconhpref_" alt="_textpreferences_" width="_widthhpref_" height="_heighthpref_">}
|
---|
191 | _iconthispage_ [language=mi] {<img src="_httpimg_/mh\_pref.gif" alt="" width="220" height="57">}
|
---|
192 |
|
---|
193 |
|
---|
194 | #######################################################################
|
---|
195 | # english macros
|
---|
196 | #######################################################################
|
---|
197 |
|
---|
198 | _textpreferences_ {Preferences}
|
---|
199 | _textignorecase_ { ignore case differences}
|
---|
200 | _textmatchcase_ { upper/lower case must match}
|
---|
201 | _textstem_ { ignore word endings}
|
---|
202 | _textnostem_ { whole word must match}
|
---|
203 | _textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.}
|
---|
204 | _textlanguage_ {Interface language: }
|
---|
205 | _textformat_ {Interface format: }
|
---|
206 |
|
---|
207 | #######################################################################
|
---|
208 | # maori macros
|
---|
209 | #######################################################################
|
---|
210 |
|
---|
211 | _textpreferences_ [language=mi] {Whiriwhiringa}
|
---|
212 | _textignorecase_ [language=mi] { hei aha te pü matua me te pü iti}
|
---|
213 | _textmatchcase_ [language=mi] { me tika te pü matua me te pü iti}
|
---|
214 | _textstem_ [language=mi] { hei aha te kümuri}
|
---|
215 | _textnostem_ [language=mi] { me tika te kümuri}
|
---|
216 | _textprefop_ [language=mi] {Whakahokia mai te _maxdocoption_ kupu, ä, kia _hitsperpageoption_ kupu ki ia whärangi.}
|
---|
217 |
|
---|
218 |
|
---|
219 |
|
---|
220 |
|
---|
221 |
|
---|
222 |
|
---|