Index: branches/preferences-work/phase3/skins/monobook/main.css |
— | — | @@ -1031,15 +1031,16 @@ |
1032 | 1032 | .mainLegend { |
1033 | 1033 | display: none; |
1034 | 1034 | } |
1035 | | -div.prefsectiontip { |
| 1035 | +td.htmlform-tip { |
1036 | 1036 | font-size: x-small; |
1037 | 1037 | padding: .2em 2em; |
1038 | 1038 | color: #666; |
1039 | 1039 | } |
1040 | | -.btnSavePrefs { |
| 1040 | +.mw-htmlform-submit { |
1041 | 1041 | font-weight: bold; |
1042 | 1042 | padding-left: .3em; |
1043 | 1043 | padding-right: .3em; |
| 1044 | + margin-right: 2em; |
1044 | 1045 | } |
1045 | 1046 | |
1046 | 1047 | .preferences-login { |
Index: branches/preferences-work/phase3/skins/common/shared.css |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | body.rtl td.mw-input { text-align: right; } |
76 | 76 | body.rtl td.mw-submit { text-align: right; } |
77 | 77 | |
78 | | -td.mw-label { vertical-align: top; } |
| 78 | +td.mw-label { vertical-align: top; width: 20%; } |
79 | 79 | td.mw-submit { white-space: nowrap; } |
80 | 80 | |
81 | 81 | /** |
Index: branches/preferences-work/phase3/skins/common/htmlform.js |
— | — | @@ -6,6 +6,9 @@ |
7 | 7 | var select = fields[i]; |
8 | 8 | |
9 | 9 | addHandler( select, 'change', htmlforms.selectOrOtherSelectChanged ); |
| 10 | + |
| 11 | + // Use a fake 'e' to update it. |
| 12 | + htmlforms.selectOrOtherSelectChanged( { 'target': select } ); |
10 | 13 | } |
11 | 14 | } ); |
12 | 15 | |
Index: branches/preferences-work/phase3/includes/HTMLForm.php |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | 'toggle' => 'HTMLCheckField', |
23 | 23 | 'int' => 'HTMLIntField', |
24 | 24 | 'info' => 'HTMLInfoField', |
| 25 | + 'selectorother' => 'HTMLSelectOrOtherField', |
25 | 26 | ); |
26 | 27 | |
27 | 28 | function __construct( $descriptor, $messagePrefix ) { |
— | — | @@ -192,6 +193,8 @@ |
193 | 194 | if ( isset($this->mSubmitID) ) |
194 | 195 | $attribs['id'] = $this->mSubmitID; |
195 | 196 | |
| 197 | + $attribs['class'] = 'mw-htmlform-submit'; |
| 198 | + |
196 | 199 | $html .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n"; |
197 | 200 | |
198 | 201 | if ($this->mShowReset) { |
— | — | @@ -543,6 +546,14 @@ |
544 | 547 | class HTMLSelectOrOtherField extends HTMLTextField { |
545 | 548 | static $jsAdded = false; |
546 | 549 | |
| 550 | + function __construct( $params ) { |
| 551 | + if (! array_key_exists('other', $params['options']) ) { |
| 552 | + $params['options']['other'] = wfMsg( 'htmlform-selectorother-other' ); |
| 553 | + } |
| 554 | + |
| 555 | + parent::__construct( $params ); |
| 556 | + } |
| 557 | + |
547 | 558 | function getInputHTML( $value ) { |
548 | 559 | $valInSelect = array_key_exists( $value, $this->mParams['options'] ); |
549 | 560 | |
Index: branches/preferences-work/phase3/includes/Preferences.php |
— | — | @@ -374,18 +374,26 @@ |
375 | 375 | 'label-message' => 'tog-underline', |
376 | 376 | 'section' => 'rendering', |
377 | 377 | ); |
| 378 | + |
| 379 | + $stubThresholdValues = array( 0, 50, 100, 500, 1000, 2000, 5000, 10000 ); |
| 380 | + $stubThresholdOptions = array(); |
| 381 | + foreach( $stubThresholdValues as $value ) { |
| 382 | + $stubThresholdOptions[$value] = wfMsg( 'size-bytes', $value ); |
| 383 | + } |
| 384 | + |
| 385 | + $defaultPreferences['stubthreshold'] = |
| 386 | + array( |
| 387 | + 'type' => 'selectorother', |
| 388 | + 'section' => 'rendering', |
| 389 | + 'options' => $stubThresholdOptions, |
| 390 | + 'label' => wfMsg('stub-threshold'), // Raw HTML message. Yay? |
| 391 | + ); |
378 | 392 | $defaultPreferences['highlightbroken'] = |
379 | 393 | array( |
380 | 394 | 'type' => 'toggle', |
381 | 395 | 'section' => 'rendering', |
382 | 396 | 'label' => wfMsg('tog-highlightbroken'), // Raw HTML |
383 | 397 | ); |
384 | | - $defaultPreferences['stubthreshold'] = |
385 | | - array( |
386 | | - 'type' => 'int', |
387 | | - 'section' => 'rendering', |
388 | | - 'label' => wfMsg('stub-threshold'), // Raw HTML message. Yay? |
389 | | - ); |
390 | 398 | $defaultPreferences['showtoc'] = |
391 | 399 | array( |
392 | 400 | 'type' => 'toggle', |
— | — | @@ -514,12 +522,6 @@ |
515 | 523 | ); |
516 | 524 | |
517 | 525 | ## RecentChanges ##################################### |
518 | | - $defaultPreferences['usenewrc'] = |
519 | | - array( |
520 | | - 'type' => 'toggle', |
521 | | - 'label-message' => 'tog-usenewrc', |
522 | | - 'section' => 'rc', |
523 | | - ); |
524 | 526 | $defaultPreferences['rcdays'] = |
525 | 527 | array( |
526 | 528 | 'type' => 'int', |
— | — | @@ -534,6 +536,12 @@ |
535 | 537 | 'label-message' => 'recentchangescount', |
536 | 538 | 'section' => 'rc', |
537 | 539 | ); |
| 540 | + $defaultPreferences['usenewrc'] = |
| 541 | + array( |
| 542 | + 'type' => 'toggle', |
| 543 | + 'label-message' => 'tog-usenewrc', |
| 544 | + 'section' => 'rc', |
| 545 | + ); |
538 | 546 | $defaultPreferences['hideminor'] = |
539 | 547 | array( |
540 | 548 | 'type' => 'toggle', |
Index: branches/preferences-work/phase3/languages/messages/MessagesEn.php |
— | — | @@ -492,14 +492,14 @@ |
493 | 493 | * LANGUAGES', # do not translate or duplicate this message to other languages |
494 | 494 | |
495 | 495 | # User preference toggles |
496 | | -'tog-underline' => 'Underline links:', |
| 496 | +'tog-underline' => 'Link underlining:', |
497 | 497 | 'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>)', |
498 | 498 | 'tog-justify' => 'Justify paragraphs', |
499 | 499 | 'tog-hideminor' => 'Hide minor edits in recent changes', |
500 | 500 | 'tog-hidepatrolled' => 'Hide patrolled edits in recent changes', |
501 | 501 | 'tog-newpageshidepatrolled' => 'Hide patrolled pages from new page list', |
502 | 502 | 'tog-extendwatchlist' => 'Expand watchlist to show all changes, not just the most recent', |
503 | | -'tog-usenewrc' => 'Enhanced recent changes (requires JavaScript)', |
| 503 | +'tog-usenewrc' => 'Use enhanced recent changes (requires JavaScript)', |
504 | 504 | 'tog-numberheadings' => 'Auto-number headings', |
505 | 505 | 'tog-showtoolbar' => 'Show edit toolbar (requires JavaScript)', |
506 | 506 | 'tog-editondblclick' => 'Edit pages on double click (requires JavaScript)', |
— | — | @@ -507,7 +507,7 @@ |
508 | 508 | 'tog-editsectiononrightclick' => 'Enable section editing by right clicking on section titles (requires JavaScript)', |
509 | 509 | 'tog-showtoc' => 'Show table of contents (for pages with more than 3 headings)', |
510 | 510 | 'tog-rememberpassword' => 'Remember my login on this computer', |
511 | | -'tog-editwidth' => 'Edit box has full width', |
| 511 | +'tog-editwidth' => 'Widen the edit box to fill the entire screen', |
512 | 512 | 'tog-watchcreations' => 'Add pages I create to my watchlist', |
513 | 513 | 'tog-watchdefault' => 'Add pages I edit to my watchlist', |
514 | 514 | 'tog-watchmoves' => 'Add pages I move to my watchlist', |
— | — | @@ -521,7 +521,7 @@ |
522 | 522 | 'tog-enotifminoredits' => 'E-mail me also for minor edits of pages', |
523 | 523 | 'tog-enotifrevealaddr' => 'Reveal my e-mail address in notification e-mails', |
524 | 524 | 'tog-shownumberswatching' => 'Show the number of watching users', |
525 | | -'tog-fancysig' => 'Raw signatures (without automatic link)', |
| 525 | +'tog-fancysig' => 'Do not automatically link my signature to my userpage', |
526 | 526 | 'tog-externaleditor' => 'Use external editor by default (for experts only, needs special settings on your computer)', |
527 | 527 | 'tog-externaldiff' => 'Use external diff by default (for experts only, needs special settings on your computer)', |
528 | 528 | 'tog-showjumplinks' => 'Enable "jump to" accessibility links', |
— | — | @@ -1579,10 +1579,11 @@ |
1580 | 1580 | 'prefs-misc' => 'Misc', |
1581 | 1581 | 'prefs-resetpass' => 'Change password', |
1582 | 1582 | 'prefs-email' => 'Email options', |
| 1583 | +'prefs-rendering' => 'Page Rendering', |
1583 | 1584 | 'saveprefs' => 'Save', |
1584 | 1585 | 'resetprefs' => 'Clear unsaved changes', |
1585 | 1586 | 'restoreprefs' => 'Restore all default settings', |
1586 | | -'prefs-editing' => 'Editing', |
| 1587 | +'prefs-editing' => 'Editing', |
1587 | 1588 | 'prefs-edit-boxsize' => 'Size of the edit window.', |
1588 | 1589 | 'rows' => 'Rows:', |
1589 | 1590 | 'columns' => 'Columns:', |
— | — | @@ -3146,7 +3147,7 @@ |
3147 | 3148 | |
3148 | 3149 | # Media information |
3149 | 3150 | 'mediawarning' => "'''Warning''': This file may contain malicious code, by executing it your system may be compromised.<hr />", |
3150 | | -'imagemaxsize' => 'Limit images on file description pages to:', |
| 3151 | +'imagemaxsize' => "Image size limit:<br/>''(for file description pages)''", |
3151 | 3152 | 'thumbsize' => 'Thumbnail size:', |
3152 | 3153 | 'widthheight' => '$1×$2', # only translate this message to other languages if you have to change it |
3153 | 3154 | 'widthheightpage' => '$1×$2, $3 {{PLURAL:$3|page|pages}}', |
— | — | @@ -3889,4 +3890,5 @@ |
3890 | 3891 | 'htmlform-int-toohigh' => 'The value you specified is above the maximum of $1', |
3891 | 3892 | 'htmlform-submit' => 'Submit', |
3892 | 3893 | 'htmlform-reset' => 'Undo changes', |
| 3894 | +'htmlform-selectorother-other' => 'Other', |
3893 | 3895 | ); |