Index: trunk/phase3/skins/monobook/rtl.css |
— | — | @@ -190,16 +190,21 @@ |
191 | 191 | * html #column-one { right: 0; } |
192 | 192 | |
193 | 193 | /* js pref toc */ |
194 | | -#preftoc { float: right; } |
195 | | -/* workaround for moz bug, displayed bullets on left side */ |
196 | | -#preftoc li { list-style: none; } |
197 | | -#prefcontrol { float: right; } |
198 | | -fieldset.prefsection, |
199 | | -fieldset.operaprefsection { |
200 | | - margin-left: 0 !important; |
201 | | - margin-right: 15em; |
| 194 | + |
| 195 | +#preftoc { |
| 196 | + margin-right: 1em; |
202 | 197 | } |
203 | 198 | |
| 199 | +.preferences-save-success, #preftoc li, .prefsection fieldset { |
| 200 | + float: right; |
| 201 | +} |
| 202 | + |
| 203 | +.prefsection { |
| 204 | + padding-right: 2em; |
| 205 | +} |
| 206 | + |
| 207 | +/* workaround for moz bug, displayed bullets on left side */ |
| 208 | + |
204 | 209 | #toc ul { |
205 | 210 | text-align: right; |
206 | 211 | } |
Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -914,6 +914,7 @@ |
915 | 915 | margin: 0; |
916 | 916 | padding: 0; |
917 | 917 | width: 100%; |
| 918 | + clear: both; |
918 | 919 | } |
919 | 920 | #preftoc li { |
920 | 921 | margin: 1px -2px 1px 2px; |
— | — | @@ -957,12 +958,12 @@ |
958 | 959 | } |
959 | 960 | #prefcontrol { |
960 | 961 | padding-top: 2em; |
961 | | - clear: left; |
| 962 | + clear: both; |
962 | 963 | } |
963 | 964 | #preferences { |
964 | 965 | margin: 0; |
965 | 966 | border: 1px solid #aaa; |
966 | | - clear: left; |
| 967 | + clear: both; |
967 | 968 | padding: 1.5em; |
968 | 969 | background-color: #F9F9F9; |
969 | 970 | } |
— | — | @@ -990,10 +991,12 @@ |
991 | 992 | margin-top: 0; |
992 | 993 | background-color: #FFC1C1; |
993 | 994 | padding: .2em .7em; |
994 | | - clear: left; |
| 995 | + clear: both; |
995 | 996 | } |
996 | 997 | .btnSavePrefs { |
997 | 998 | font-weight: bold; |
| 999 | + padding-left: .3em; |
| 1000 | + padding-right: .3em; |
998 | 1001 | } |
999 | 1002 | |
1000 | 1003 | .preferences-save-success { |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | if(i == 0) li.className = 'selected'; |
143 | 143 | var a = document.createElement('a'); |
144 | 144 | a.href = '#' + sections[i].secid; |
145 | | - a.onclick = uncoversection; |
| 145 | + a.onmousedown = a.onclick = uncoversection; |
146 | 146 | a.appendChild(document.createTextNode(sections[i].text)); |
147 | 147 | a.secid = sections[i].secid; |
148 | 148 | li.appendChild(a); |
Index: trunk/phase3/includes/SpecialPreferences.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | $this->mDate = $request->getVal( 'wpDate' ); |
53 | 53 | $this->mUserEmail = $request->getVal( 'wpUserEmail' ); |
54 | 54 | $this->mRealName = $wgAllowRealName ? $request->getVal( 'wpRealName' ) : ''; |
55 | | - $this->mEmailFlag = $request->getCheck( 'wpEmailFlag' ) ? 1 : 0; |
| 55 | + $this->mEmailFlag = $request->getCheck( 'wpEmailFlag' ) ? 0 : 1; |
56 | 56 | $this->mNick = $request->getVal( 'wpNick' ); |
57 | 57 | $this->mUserLanguage = $request->getVal( 'wpUserLanguage' ); |
58 | 58 | $this->mUserVariant = $request->getVal( 'wpUserVariant' ); |
— | — | @@ -385,15 +385,16 @@ |
386 | 386 | } |
387 | 387 | |
388 | 388 | |
389 | | - function getToggle( $tname, $trailer = false) { |
| 389 | + function getToggle( $tname, $trailer = false, $disabled = false ) { |
390 | 390 | global $wgUser, $wgLang; |
391 | 391 | |
392 | 392 | $this->mUsedToggles[$tname] = true; |
393 | 393 | $ttext = $wgLang->getUserToggle( $tname ); |
394 | 394 | |
395 | 395 | $checked = $wgUser->getOption( $tname ) == 1 ? ' checked="checked"' : ''; |
| 396 | + $disabled = $disabled ? ' disabled="disabled"' : ''; |
396 | 397 | $trailer = $trailer ? $trailer : ''; |
397 | | - return "<div class='toggle'><input type='checkbox' value='1' id=\"$tname\" name=\"wpOp$tname\"$checked />" . |
| 398 | + return "<div class='toggle'><input type='checkbox' value='1' id=\"$tname\" name=\"wpOp$tname\"$checked$disabled />" . |
398 | 399 | " <span class='toggletext'><label for=\"$tname\">$ttext</label>$trailer</span></div>\n"; |
399 | 400 | } |
400 | 401 | |
— | — | @@ -463,13 +464,16 @@ |
464 | 465 | $this->mUserEmail = htmlspecialchars( $this->mUserEmail ); |
465 | 466 | $this->mRealName = htmlspecialchars( $this->mRealName ); |
466 | 467 | $this->mNick = htmlspecialchars( $this->mNick ); |
467 | | - if ( $this->mEmailFlag ) { $emfc = 'checked="checked"'; } |
| 468 | + if ( !$this->mEmailFlag ) { $emfc = 'checked="checked"'; } |
468 | 469 | else { $emfc = ''; } |
469 | 470 | |
| 471 | + |
470 | 472 | if ($wgEmailAuthentication && ($this->mUserEmail != '') ) { |
471 | 473 | if( $wgUser->getEmailAuthenticationTimestamp() ) { |
472 | 474 | $emailauthenticated = wfMsg('emailauthenticated',$wgLang->timeanddate($wgUser->getEmailAuthenticationTimestamp(), true ) ).'<br />'; |
| 475 | + $disableEmailPrefs = false; |
473 | 476 | } else { |
| 477 | + $disableEmailPrefs = true; |
474 | 478 | $skin = $wgUser->getSkin(); |
475 | 479 | $emailauthenticated = wfMsg('emailnotauthenticated').'<br />' . |
476 | 480 | $skin->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Confirmemail' ), |
— | — | @@ -477,6 +481,7 @@ |
478 | 482 | } |
479 | 483 | } else { |
480 | 484 | $emailauthenticated = ''; |
| 485 | + $disableEmailPrefs = false; |
481 | 486 | } |
482 | 487 | |
483 | 488 | if ($this->mUserEmail == '') { |
— | — | @@ -485,10 +490,10 @@ |
486 | 491 | |
487 | 492 | $ps = $this->namespacesCheckboxes(); |
488 | 493 | |
489 | | - $enotifwatchlistpages = ($wgEnotifWatchlist) ? $this->getToggle( 'enotifwatchlistpages' ) : ''; |
490 | | - $enotifusertalkpages = ($wgEnotifUserTalk) ? $this->getToggle( 'enotifusertalkpages' ) : ''; |
491 | | - $enotifminoredits = ($wgEnotifWatchlist && $wgEnotifMinorEdits) ? $this->getToggle( 'enotifminoredits' ) : ''; |
492 | | - $enotifrevealaddr = (($wgEnotifWatchlist || $wgEnotifUserTalk) && $wgEnotifRevealEditorAddress) ? $this->getToggle( 'enotifrevealaddr' ) : ''; |
| 494 | + $enotifwatchlistpages = ($wgEnotifWatchlist) ? $this->getToggle( 'enotifwatchlistpages', false, $disableEmailPrefs ) : ''; |
| 495 | + $enotifusertalkpages = ($wgEnotifUserTalk) ? $this->getToggle( 'enotifusertalkpages', false, $disableEmailPrefs ) : ''; |
| 496 | + $enotifminoredits = ($wgEnotifWatchlist && $wgEnotifMinorEdits) ? $this->getToggle( 'enotifminoredits', false, $disableEmailPrefs ) : ''; |
| 497 | + $enotifrevealaddr = (($wgEnotifWatchlist || $wgEnotifUserTalk) && $wgEnotifRevealEditorAddress) ? $this->getToggle( 'enotifrevealaddr', false, $disableEmailPrefs ) : ''; |
493 | 498 | $prefs_help_email_enotif = ( $wgEnotifWatchlist || $wgEnotifUserTalk) ? ' ' . wfMsg('prefs-help-email-enotif') : ''; |
494 | 499 | $prefs_help_realname = ''; |
495 | 500 | |
— | — | @@ -520,24 +525,24 @@ |
521 | 526 | if ($wgAllowRealName) { |
522 | 527 | $wgOut->addHTML( |
523 | 528 | $this->addRow( |
524 | | - wfMsg('yourrealname'), |
525 | | - "<input type='text' name='wpRealName' value=\"{$this->mRealName}\" size='25' />" |
| 529 | + '<label for="wpRealName">' . wfMsg('yourrealname') . '</label>', |
| 530 | + "<input type='text' name='wpRealName' id='wpRealName' value=\"{$this->mRealName}\" size='25' />" |
526 | 531 | ) |
527 | 532 | ); |
528 | 533 | } |
529 | 534 | if ($wgEnableEmail) { |
530 | 535 | $wgOut->addHTML( |
531 | 536 | $this->addRow( |
532 | | - wfMsg( 'youremail' ), |
533 | | - "<input type='text' name='wpUserEmail' value=\"{$this->mUserEmail}\" size='25' />" |
| 537 | + '<label for="wpUserEmail">' . wfMsg( 'youremail' ) . '</label>', |
| 538 | + "<input type='text' name='wpUserEmail' id='wpUserEmail' value=\"{$this->mUserEmail}\" size='25' />" |
534 | 539 | ) |
535 | 540 | ); |
536 | 541 | } |
537 | 542 | |
538 | 543 | $wgOut->addHTML( |
539 | 544 | $this->addRow( |
540 | | - wfMsg( 'yournick' ), |
541 | | - "<input type='text' name='wpNick' value=\"{$this->mNick}\" size='25' />" |
| 545 | + '<label for="wpNick">' . wfMsg( 'yournick' ) . '</label>', |
| 546 | + "<input type='text' name='wpNick' id='wpNick' value=\"{$this->mNick}\" size='25' />" |
542 | 547 | ) . |
543 | 548 | # FIXME: The <input> part should be where the is, getToggle() needs |
544 | 549 | # to be changed to out return its output in two parts. -ævar |
— | — | @@ -564,7 +569,12 @@ |
565 | 570 | $selbox .= "<option value=\"$code\"$sel>$code - $name</option>\n"; |
566 | 571 | } |
567 | 572 | } |
568 | | - $wgOut->addHTML( $this->addRow( wfMsg('yourlanguage'), "<select name='wpUserLanguage'>$selbox</select>" )); |
| 573 | + $wgOut->addHTML( |
| 574 | + $this->addRow( |
| 575 | + '<label for="wpUserLanguage">' . wfMsg('yourlanguage') . '</label>', |
| 576 | + "<select name='wpUserLanguage' id='wpUserLanguage'>$selbox</select>" |
| 577 | + ) |
| 578 | + ); |
569 | 579 | |
570 | 580 | /* see if there are multiple language variants to choose from*/ |
571 | 581 | if(!$wgDisableLangConversion) { |
— | — | @@ -614,11 +624,12 @@ |
615 | 625 | $enotifwatchlistpages. |
616 | 626 | $enotifusertalkpages. |
617 | 627 | $enotifminoredits ); |
618 | | - if ($wgEnableUserEmail) { |
619 | | - $emf = wfMsg( 'emailflag' ); |
620 | | - $wgOut->addHTML( |
621 | | - "<div><input type='checkbox' $emfc value='1' name='wpEmailFlag' id='wpEmailFlag' /> <label for='wpEmailFlag'>$emf</label></div>" ); |
622 | | - } |
| 628 | + if ($wgEnableUserEmail) { |
| 629 | + $emf = wfMsg( 'emailflag' ); |
| 630 | + $disabled = $disableEmailPrefs ? ' disabled="disabled"' : ''; |
| 631 | + $wgOut->addHTML( |
| 632 | + "<div><input type='checkbox' $emfc $disabled value='1' name='wpEmailFlag' id='wpEmailFlag' /> <label for='wpEmailFlag'>$emf</label></div>" ); |
| 633 | + } |
623 | 634 | |
624 | 635 | $wgOut->addHTML( '</fieldset>' ); |
625 | 636 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -143,6 +143,7 @@ |
144 | 144 | * (bug 3163) Full translation of LanguageBr |
145 | 145 | * (bug 3617) Update for portuguese language (pt) |
146 | 146 | * Namespaces hacks on LanguagePl |
| 147 | +* New preferences design and reorganisation |
147 | 148 | |
148 | 149 | |
149 | 150 | === Caveats === |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -892,7 +892,7 @@ |
893 | 893 | 'timezoneoffset' => 'Offset¹', |
894 | 894 | 'servertime' => 'Server time', |
895 | 895 | 'guesstimezone' => 'Fill in from browser', |
896 | | -'emailflag' => 'Disable email from other users', |
| 896 | +'emailflag' => 'Enable email from other users', |
897 | 897 | 'defaultns' => 'Search in these namespaces by default:', |
898 | 898 | 'default' => 'default', |
899 | 899 | 'files' => 'Files', |