Changeset 876 for trunk/gsdl/macros/pref.dm
- Timestamp:
- 2000-01-27T09:33:49+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/pref.dm
r735 r876 1 1 package preferences 2 3 # set within server 4 5 # collectionoption is only set when cross-collection searching is turned on 6 _collectionoption_ {} 7 8 # this macro will be set to "1" when the "source docs retrived from dl/web 9 # button is required - i.e. whenever PreferenceDocsFromWeb isn't set to false 10 # in collect.cfg 11 _PreferenceDocsFromWeb_ {} 2 12 3 13 … … 24 34 ####################################################################### 25 35 36 _ccsfunctions_ {argcc = ""; 37 savedccs = new Object(); 38 39 function initialize () \{ 40 for (i = 0; i < document.links.length; i++) 41 savedhrefs[i] = document.links[i].href; 42 43 s = "_cgiargcc_"; 44 a = s.split (","); 45 for (i = 0; i < a.length ;i++) \{ 46 for (j = 0; j < document.PrefForm.cc.length; j++) \{ 47 if (a[i] == document.PrefForm.elements["cc"][j].value) \{ 48 document.PrefForm.elements["cc"][j].checked = true; 49 savedccs[a[i]] = 1; 50 argcc = argcc + "&cc=" + a[i]; 51 break; 52 \} else \{ 53 savedccs[a[i]] = 0; 54 \} 55 \} 56 \} 57 updatehrefs(); 58 \} 59 60 function updatecc (collection) \{ 61 if (savedccs[collection] == 1) savedccs[collection] = 0; 62 else savedccs[collection] = 1; 63 64 var i; 65 argcc = ""; 66 for (i in savedccs) 67 if (savedccs[i] == 1) argcc += "&cc=" + i; 68 updatehrefs(); 69 \} 70 } 71 72 _standardfunctions_ { 73 function initialize () \{ 74 for (i = 0; i < document.links.length; i++) 75 savedhrefs[i] = document.links[i].href; 76 \} 77 } 78 79 _getargsfunction_ { 80 function getargs () \{ 81 return argk + args + argm + argo + argb_If_('_cgiargccs_ == 1',_ccsargs_)_If_(_htmloptions_,_htmlargs_); 82 \} 83 } 84 85 _ccsargs_ {+ argcc} 86 _htmlargs_ {+ argel + argil + argfc + arghl} 87 88 _htmlfunctions_ {argel = ""; 89 argil = ""; 90 argfc = ""; 91 arghl = ""; 92 93 function updateel () \{ 94 value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value; 95 if (value != "_cgiargel_") argel = "&el=" + value; 96 else argel = ""; 97 updatehrefs(); 98 \} 99 100 function updateil () \{ 101 value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value; 102 if (value != "_cgiargil_") argil = "&il=" + value; 103 else argil = ""; 104 updatehrefs(); 105 \} 106 107 function updatefc () \{ 108 if (document.PrefForm.fc.checked) 109 _If_("_cgiargfc_" eq "1",_argfcblank_,_argfcon_) 110 else 111 _If_("_cgiargfc_" ne "1",_argfcblank_,_argfcoff_) 112 updatehrefs(); 113 \} 114 115 function updatehl () \{ 116 if (document.PrefForm.hl.checked) 117 _If_("_cgiarghl_" eq "1",_arghlblank_,_arghlon_) 118 else 119 _If_("_cgiarghl_" ne "1",_arghlblank_,_arghloff_) 120 updatehrefs(); 121 \} 122 } 123 124 _argfcblank_ {argfc = "";} 125 _argfcon_ {argfc = "&fc=1&f=1";} 126 _argfcoff_ {argfc = "&fc=0&f=0";} 127 128 _arghlblank_ {arghl = "";} 129 _arghlon_ {arghl = "&hl=1";} 130 _arghloff_ {arghl = "&hl=0";} 131 26 132 _pagescriptextra_ { 27 133 // preferences scripts generated from \_preferences:pagescriptextra\_ 28 134 29 savedhrefs = new Object(); 30 31 argk = ""; 32 args = ""; 33 argm = ""; 34 argo = ""; 35 argb = ""; 36 argel = ""; 37 argil = ""; 38 39 function initialize () \{ 40 for (i = 0; i < document.links.length; i++) 41 savedhrefs[i] = document.links[i].href; 42 \} 43 44 function updatehrefs () \{ 45 for (i = 0; i < document.links.length; i++) 46 document.links[i].href = savedhrefs[i] + argk + args + argm + argo + argb + argel + argil; 47 \} 48 49 function updatek (value) \{ 50 if (value != _cgiargk_) argk = "&k=" + value; 51 else argk = ""; 52 updatehrefs(); 53 \} 54 55 function updates (value) \{ 56 if (value != _cgiargs_) args = "&s=" + value; 57 else args = ""; 58 updatehrefs(); 59 \} 60 61 function updatem () \{ 62 value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value; 63 if (value != _cgiargm_) argm = "&r=1&m=" + value; 64 else argm = ""; 65 updatehrefs(); 66 \} 67 68 function updateo () \{ 69 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value; 70 if (value != _cgiargo_) argo = "&r=1&o=" + value; 71 else argo = ""; 72 updatehrefs(); 73 \} 74 75 function updateb (value) \{ 76 if (value != _cgiargb_) argb = "&b=" + value; 77 else argb = ""; 78 updatehrefs(); 79 \} 80 81 function updateel () \{ 82 value = document.PrefForm.el.options[document.PrefForm.el.selectedIndex].value; 83 if (value != "_cgiargel_") argel = "&el=" + value; 84 else argel = ""; 85 updatehrefs(); 86 \} 87 88 function updateil () \{ 89 value = document.PrefForm.il.options[document.PrefForm.il.selectedIndex].value; 90 if (value != "_cgiargil_") argil = "&il=" + value; 91 else argil = ""; 92 updatehrefs(); 93 \} 94 95 function updatel () \{ 96 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value; 97 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&l=" + value; 98 \} 99 100 function updatev () \{ 101 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value; 102 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&v=" + value; 103 \} 104 105 function updatew () \{ 106 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value; 107 location.href = location.href + argk + args + argm + argo + argb + argel + argil + "&nw=" + value; 108 \} 109 135 savedhrefs = new Object(); 136 137 argk = ""; 138 args = ""; 139 argm = ""; 140 argo = ""; 141 argb = ""; 142 _If_('_cgiargccs_ == 1',_ccsfunctions_,_standardfunctions_) 143 _If_(_htmloptions_,_htmlfunctions_) 144 _getargsfunction_ 145 function updatehrefs () \{ 146 for (i = 0; i < document.links.length; i++) 147 document.links[i].href = savedhrefs[i] + getargs(); 148 \} 149 150 function updatek (value) \{ 151 if (value != _cgiargk_) argk = "&k=" + value; 152 else argk = ""; 153 updatehrefs(); 154 \} 155 156 function updates (value) \{ 157 if (value != _cgiargs_) args = "&s=" + value; 158 else args = ""; 159 updatehrefs(); 160 \} 161 162 function updatem () \{ 163 value = document.PrefForm.m.options[document.PrefForm.m.selectedIndex].value; 164 if (value != _cgiargm_) argm = "&r=1&m=" + value; 165 else argm = ""; 166 updatehrefs(); 167 \} 168 169 function updateo () \{ 170 value = document.PrefForm.o.options[document.PrefForm.o.selectedIndex].value; 171 if (value != _cgiargo_) argo = "&r=1&o=" + value; 172 else argo = ""; 173 updatehrefs(); 174 \} 175 176 function updateb (value) \{ 177 if (value != _cgiargb_) argb = "&b=" + value; 178 else argb = ""; 179 updatehrefs(); 180 \} 181 182 function updatel () \{ 183 value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value; 184 location.href = location.href + "&l=" + value + getargs(); 185 \} 186 187 function updatev () \{ 188 value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value; 189 location.href = location.href + "&v=" + value + getargs(); 190 \} 191 192 function updatew () \{ 193 value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value; 194 location.href = location.href + "&nw=" + value + getargs(); 195 \} 110 196 } 111 197 … … 133 219 _pagetitle_ {_collectionname_: _textpreferences_} 134 220 _imagethispage_ {_iconthispage_} 221 222 _htmloptions_ {} 223 224 _htmloptionson_ { 225 <p> 226 _fcoption_ 227 <p> 228 _hloption_ 229 <p> 230 _extlinkoption_ 231 _If_(_PreferenceDocsFromWeb_,<p> 232 _intlinkoption_) 233 } 135 234 136 235 _caseoption_ { … … 141 240 } 142 241 242 _fcoption_ { 243 <input type=checkbox name=fc onClick="updatefc();"_If_("_cgiargfc_" eq "1", checked)> 244 _textfcoption_ 245 } 246 247 _hloption_ { 248 <input type=checkbox name=hl onClick="updatehl();"_If_("_cgiarghl_" eq "1", checked)> 249 _texthloption_ 250 } 251 143 252 _caseoption_ [l=zh] {} 144 253 145 254 _stemoption_ { 146 255 <input type=radio name=s value=1 onClick="updates(1);" 147 256 _If_(_cgiargs_, checked)>_textstem_<br> 148 257 <input type=radio name=s value=0 onClick="updates(0);" 149 258 _If_(_cgiargs_,, checked)>_textnostem_ 150 259 } 151 260 … … 165 274 <option value="20"_If_("_cgiargo_" eq "20", selected)>20 166 275 <option value="50"_If_("_cgiargo_" eq "50", selected)>50 167 <option value="100")_If_("_cgiargo_" eq "100", selected)> all276 <option value="100")_If_("_cgiargo_" eq "100", selected)>_textall_ 168 277 </select> 169 278 } … … 180 289 <select name="el" onChange="updateel();"> 181 290 <option value="prompt"_If_("_cgiargel_" eq "prompt", selected)> 182 through intermediate page291 _textlinkinterm_ 183 292 <option value="direct"_If_("_cgiargel_" eq "direct", selected)> 184 go directly there293 _textlinkdirect_ 185 294 </select> 186 295 } … … 190 299 <select name="il" onChange="updateil();"> 191 300 <option value="l"_If_("_cgiargil_" eq "l", selected)> 192 the digital library301 _textdigitlib_ 193 302 <option value="w"_If_("_cgiargil_" eq "w", selected)> 194 the Web 195 </select> 196 } 197 198 199 _languageoption_ { 200 _textlanguage_ 201 <select name="l" onChange="updatel();"> 202 <option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>English 203 <option value="mi"_If_("_cgiargl_" eq "mi", selected)>Mäori 204 <option value="zh"_If_("_cgiargl_" eq "zh", selected)>Chinese 205 </select> 206 } 303 _textweb_ 304 </select> 305 } 306 307 _languageoption_ {} 308 309 _enlanguageoption_ {<option value="en"_If_("_cgiargl_",, selected)_If_("_cgiargl_" eq "en", selected)>_textlangeng_} 310 _milanguageoption_ {<option value="mi"_If_("_cgiargl_" eq "mi", selected)>_textlangmaori_} 311 _zhlanguageoption_ {<option value="zh"_If_("_cgiargl_" eq "zh", selected)>_textlangchinese_} 207 312 208 313 _encodingoption_ { … … 231 336 <form name=PrefForm method=get action="_gwcgi_"> 232 337 233 <input type="hidden" name="e" value="_compressedoptions_"> 234 235 <p> 236 _caseoption_ 237 238 <p> 239 _stemoption_ 240 241 <p> 242 _textprefop_ 243 244 <p> 245 _modeoption_ 246 247 <p> 248 _extlinkoption_ 249 250 <p> 251 _intlinkoption_ 252 253 <p> 254 _languageoption_ 255 256 <p> 257 _encodingoption_ 258 259 <p> 260 _formatoption_ 338 <input type="hidden" name="e" value="_decodedcompressedoptions_"> 339 340 _If_(_collectionoption_,_collectionprefs_) 341 _presentationprefs_ 342 _searchprefs_ 261 343 262 344 </blockquote> … … 264 346 } 265 347 348 _searchprefs_ { 349 <h3>_textsearchprefs_</h3> 350 <p> 351 _caseoption_ 352 353 <p> 354 _stemoption_ 355 356 <p> 357 _modeoption_ 358 359 <p> 360 _textprefop_ 361 <br>_iconblankbar_ 362 } 363 364 _collectionprefs_ { 365 <h3>_textcollectionprefs_</h3> 366 _collectionoption_ 367 <br>_iconblankbar_ 368 } 369 370 _presentationprefs_ { 371 <h3>_textpresentationprefs_</h3> 372 _htmloptions_ 373 374 <p> 375 _languageoption_ 376 377 <p> 378 _encodingoption_ 379 380 <p> 381 _formatoption_ 382 <br>_iconblankbar_ 383 } 266 384 267 385 ####################################################################### … … 284 402 285 403 286 ####################################################################### 287 # english macros 288 ####################################################################### 289 290 _textpreferences_ {Preferences} 291 _textignorecase_ { ignore case differences} 292 _textmatchcase_ { upper/lower case must match} 293 _textstem_ { ignore word endings} 294 _textnostem_ { whole word must match} 295 _textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.} 296 _textextlink_ {Access to external Web pages: } 297 _textintlink_ {Source documents retrieved from:} 298 _textlanguage_ {Interface language: } 299 _textencoding_ {Encoding: } 300 _textformat_ {Interface format: } 301 _textsimplemode_ {simple query mode} 302 _textadvancedmode_ {advanced query mode (allows boolean searching using !, &, |, and parenthesis)} 303 _textgraphical_ {Graphical} 304 _texttextual_ {Textual} 305 306 307 ####################################################################### 308 # chinese macros 309 ####################################################################### 310 _textintlink_ [l=zh] {} 311 _textextlink_ [l=zh] {} 312 313 _textprefop_ [l=zh] {æ¥è¯¢æå€è¿åã 314 ã _maxdocoption_ è®°åœïŒæ¯é¡µè¿å 315 _hitsperpageoption_ è®°åœ} 316 _textlanguage_ [l=zh] {çé¢è¯èšïŒ} 317 _textsimplemode_ [l=zh] {ç®åæ¥è¯¢æ¹åŒ} 318 _textadvancedmode_ [l=zh] {é«çº§æ¥è¯¢æ¹åŒ(å¯ä»¥äœ¿çš !ã&ã| åæ¬å·æ¥è¿è¡åžå°æ¥è¯¢)} 319 _textencoding_ [l=zh] {çŒç æ¹åŒïŒ} 320 _textformat_ [l=zh] {çé¢æ ŒåŒïŒ} 321 322 ####################################################################### 323 # maori macros 324 ####################################################################### 325 326 _textpreferences_ [l=mi] {Whiriwhiringa} 327 _textignorecase_ [l=mi] { hei aha te pü matua me te pü iti} 328 _textmatchcase_ [l=mi] { me tika te pü matua me te pü iti} 329 _textstem_ [l=mi] { hei aha te kümuri} 330 _textnostem_ [l=mi] { me tika te kümuri} 331 _textprefop_ [l=mi] {Whakahokia mai te _maxdocoption_ kupu, ä, kia _hitsperpageoption_ kupu ki ia whärangi.} 332 _textlanguage_ [l=mi] {Reo: } 333 _textencoding_ [l=mi] {Whakatakotoranga pü: } 334 _textformat_ [l=mi] {Whakatakotoranga whärangi: } 335 _textsimplemode_ [l=mi] {te rapu whäiti} 336 _textadvancedmode_ [l=mi] {te rapu whänui (ka taea te whakamahia ngä pü boolean, 337 përä i te !, &, |, me te "()" hoki)} 338 _textgraphical_ [l=mi] {Whakaahua} 339 _texttextual_ [l=mi] {Käore he whakaahua} 340 341 342 343 404 405 406 407 408 409
Note:
See TracChangeset
for help on using the changeset viewer.