[6778] | 1 | package preferences
|
---|
| 2 |
|
---|
| 3 | # set within server
|
---|
| 4 |
|
---|
| 5 | # this macro will be set to _textprefschanged_ when the "set preferences"
|
---|
| 6 | # button has been pressed
|
---|
| 7 | _prefschanged_ {}
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | #######################################################################
|
---|
| 11 | # scripts
|
---|
| 12 | #######################################################################
|
---|
| 13 |
|
---|
| 14 | _getargsfunction_ {
|
---|
| 15 | function getargs () \{
|
---|
| 16 | return argk + args + argm + argo + argrd + arghd + argb + argqf + argqb + argfqn;
|
---|
| 17 | \}
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | _pagescriptextra_ {
|
---|
| 22 | // preferences scripts generated from \_preferences:pagescriptextra\_
|
---|
| 23 |
|
---|
| 24 | argk = "";
|
---|
| 25 | args = "";
|
---|
| 26 | argm = "";
|
---|
| 27 | argo = "";
|
---|
| 28 | argrd = "";
|
---|
| 29 | arghd = "";
|
---|
| 30 | argb = "";
|
---|
| 31 | argqf = "";
|
---|
| 32 | argqb = "";
|
---|
| 33 | argfqn = "";
|
---|
| 34 |
|
---|
| 35 | _getargsfunction_
|
---|
| 36 |
|
---|
| 37 | function updatel () \{
|
---|
| 38 | value = document.PrefForm.l.options[document.PrefForm.l.selectedIndex].value;
|
---|
| 39 | href = location.href;
|
---|
| 40 | if (href.match(/&l=[\\w\\-]+/)) href = href.replace(/&l=[\\w\\-]+/, "&l=" + value);
|
---|
| 41 | else href += "&l=" + value;
|
---|
| 42 | if (!location.href.match(/&nl=1$/)) href += "&nl=1";
|
---|
| 43 | location.href = href + getargs();
|
---|
| 44 | \}
|
---|
| 45 |
|
---|
| 46 | function updatev () \{
|
---|
| 47 | value = document.PrefForm.v.options[document.PrefForm.v.selectedIndex].value;
|
---|
| 48 | href = location.href;
|
---|
| 49 | if (href.match(/&v=\\d/)) href = href.replace(/&v=\\d/, "&v=" + value);
|
---|
| 50 | else href += "&v=" + value;
|
---|
| 51 | location.href = href + getargs();
|
---|
| 52 | \}
|
---|
| 53 |
|
---|
| 54 | function updatew () \{
|
---|
| 55 | value = document.PrefForm.w.options[document.PrefForm.w.selectedIndex].value;
|
---|
| 56 | href = location.href;
|
---|
| 57 | if (href.match(/&nw=[^&]+/)) href = href.replace(/&nw=[^&]+/, "&nw=" + value);
|
---|
| 58 | else href += "&nw=" + value;
|
---|
| 59 | if (!location.href.match(/&nl=0$/)) href += "&nl=0";
|
---|
| 60 | location.href = href + getargs();
|
---|
| 61 | \}
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 |
|
---|
| 65 | # set from within pageaction
|
---|
| 66 | _languageoption_ {}
|
---|
| 67 | _encodingoption_ {}
|
---|
| 68 |
|
---|
| 69 | _formatoption_ {
|
---|
| 70 | <td>_textformat_</td>
|
---|
| 71 | <td><select name="v" onChange="updatev();">
|
---|
| 72 | <option value="0"_If_("_cgiargv_" eq "0", selected)>_textgraphical_
|
---|
| 73 | <option value="1"_If_("_cgiargv_" eq "1", selected)>_texttextual_
|
---|
| 74 | </select></td>
|
---|
| 75 | }
|
---|