Changeset 276 for trunk/gsdl/macros/pref.dm
- Timestamp:
- 1999-06-16T14:22:05+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/pref.dm
r180 r276 1 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 } 2 89 3 90 … … 10 97 11 98 _caseoption_ { 12 <input type=radio name=k value=1 99 <input type=radio name=k value=1 onClick="k\_update(1);" 13 100 _If_(_cgiargk_, checked)>_textignorecase_<br> 14 <input type=radio name=k value=0 101 <input type=radio name=k value=0 onClick="k\_update(0);" 15 102 _If_(_cgiargk_,, checked)>_textmatchcase_ 16 103 } 17 104 18 105 _stemoption_ { 19 <input type=radio name=s value=1 106 <input type=radio name=s value=1 onClick="s\_update(1);" 20 107 _If_(_cgiargs_, checked)>_textstem_<br> 21 <input type=radio name=s value=0 108 <input type=radio name=s value=0 onClick="s\_update(0);" 22 109 _If_(_cgiargs_,, checked)>_textnostem_ 23 110 } 24 111 25 112 _maxdocoption_ { 26 <select name="m" >113 <select name="m" onChange="m\_update();"> 27 114 <option value="50"_If_("_cgiargm_" eq "50", selected)>50 28 115 <option value="100"_If_("_cgiargm_" eq "100", selected)>100 … … 33 120 34 121 _hitsperpageoption_ { 35 <select name="o" >122 <select name="o" onChange="o\_update();"> 36 123 <option value="10"_If_("_cgiargo_" eq "10", selected)>10 37 124 <option value="20"_If_("_cgiargo_" eq "20", selected)>20 … … 42 129 } 43 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 44 147 _content_ { 148 <center> 149 _navigationbar_ 150 </center> 45 151 <blockquote> 46 152 47 153 <form name=PrefForm method=get action="_gwcgi_"> 48 <_font_>49 154 50 155 <input type="hidden" name="e" value="_compressedoptions_"> 51 <input type="hidden" name="q" value="_querystring_">52 <input type="hidden" name="a" value="q">53 <input type="hidden" name="r" value="1">54 156 55 157 <p>_caseoption_ … … 60 162 _textprefop_ 61 163 62 <table width="100%"> 63 <tr><td> 64 <input type="submit" value="_textsetprefs_"> 65 </td></tr></table> 164 <p> 165 _languageoption_ 166 167 <p> 168 _formatoption_ 169 66 170 </blockquote> 67 </font>68 171 </form> 69 172 } … … 99 202 _textnostem_ { whole word must match} 100 203 _textprefop_ {Return up to _maxdocoption_ hits with _hitsperpageoption_ hits per page.} 101 _textsetprefs_ {Set these preferences} 204 _textlanguage_ {Interface language: } 205 _textformat_ {Interface format: } 102 206 103 207 ####################################################################### … … 111 215 _textnostem_ [language=mi] { me tika te kümuri} 112 216 _textprefop_ [language=mi] {Whakahokia mai te _maxdocoption_ kupu, ä, kia _hitsperpageoption_ kupu ki ia whärangi.} 113 _textsetprefs_ [language=mi] {Whakamaua} 114 115 116 117 118 217 218 219 220 221 222
Note:
See TracChangeset
for help on using the changeset viewer.