From 87f17385a29a2bc1094895fa3d6767748e05890a Mon Sep 17 00:00:00 2001 From: Tom Gilder Date: Tue, 11 Oct 2005 00:33:23 +0000 Subject: [PATCH] New tabbed preferences UI --- includes/SpecialPreferences.php | 21 +++++---- languages/Language.php | 7 ++- skins/common/wikibits.js | 9 ++-- skins/monobook/main.css | 84 ++++++++++++++++++++++++++++----- 4 files changed, 91 insertions(+), 30 deletions(-) diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 465f69cd53..1a56bc51e2 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -434,17 +434,16 @@ class PreferencesForm { $wgOut->setRobotpolicy( 'noindex,nofollow' ); if ( $this->mSuccess || 'success' == $status ) { - $wgOut->addWikitext( ''. wfMsg( 'savedprefs' ) . "\n----" ); + $wgOut->addWikitext( '
'. wfMsg( 'savedprefs' ) . '
' ); } else if ( 'error' == $status ) { - $wgOut->addWikitext( "" . $message . "\n----" ); + $wgOut->addWikitext( '
' . $message . '
' ); } else if ( '' != $status ) { $wgOut->addWikitext( $message . "\n----" ); } $uname = $wgUser->getName(); $uid = $wgUser->getID(); - $wgOut->addWikiText( wfMsg( 'prefslogintext', $uname, $uid ) ); - $wgOut->addWikiText( wfMsg('clearyourcache')); + $wgOut->addWikiText( '
' . wfMsg( 'prefslogintext', $uname, $uid ) . '
' ); $qbs = $wgLang->getQuickbarSettings(); $skinNames = $wgLang->getSkinNames(); @@ -499,7 +498,8 @@ class PreferencesForm { # - $wgOut->addHTML( "
" ); + $wgOut->addHTML( "" ); + $wgOut->addHTML( "
" ); # User data # @@ -606,7 +606,7 @@ class PreferencesForm { if ($wgEnableUserEmail) { $emf = wfMsg( 'emailflag' ); $wgOut->addHTML( - "
" ); + "
" ); } $wgOut->addHTML( '' ); @@ -700,7 +700,7 @@ class PreferencesForm { foreach($dateopts as $key => $option) { ($key == $this->mDate) ? $checked = ' checked="checked"' : $checked = ''; $wgOut->addHTML( "
\n" ); + "value=\"$key\"$checked /> $option
\n" ); } $wgOut->addHTML( "\n\n"); } @@ -803,7 +803,7 @@ class PreferencesForm { $wgOut->addHTML( "
-
@@ -811,7 +811,10 @@ class PreferencesForm {
-
\n" ); + \n" ); + + $wgOut->addWikiText( wfMsg('clearyourcache') ); + } } ?> diff --git a/languages/Language.php b/languages/Language.php index 2ca27d5135..92e78da550 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -849,8 +849,7 @@ $2 List redirects   Search for $3 $9", 'preferences' => 'Preferences', 'prefsnologin' => 'Not logged in', 'prefsnologintext' => "You must be [[Special:Userlogin|logged in]] to set user preferences.", -'prefslogintext' => "You are logged in as \"$1\". -Your internal ID number is $2. +'prefslogintext' => "You are logged in as \"$1\". Your internal ID number is $2. See [[Project:User preferences help]] for help deciphering the options.", 'prefsreset' => 'Preferences have been reset from storage.', @@ -871,7 +870,7 @@ See [[Project:User preferences help]] for help deciphering the options.", 'prefs-personal' => 'User data', 'prefs-rc' => 'Recent changes & stubs', 'prefs-misc' => 'Misc', -'saveprefs' => 'Save', +'saveprefs' => 'Save Preferences', 'resetprefs' => 'Reset', 'oldpassword' => 'Old password', 'newpassword' => 'New password', @@ -892,7 +891,7 @@ See [[Project:User preferences help]] for help deciphering the options.", 'timezoneoffset' => 'Offset¹', 'servertime' => 'Server time', 'guesstimezone' => 'Fill in from browser', -'emailflag' => 'Disable e-mail from other users', +'emailflag' => 'Disable email from other users', 'defaultns' => 'Search in these namespaces by default:', 'default' => 'default', 'files' => 'Files', diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 7ee99f7831..f324e89907 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -108,7 +108,7 @@ function diffcheck() { // XXX: needs testing on IE/Mac and safari // more comments to follow function tabbedprefs() { - prefform = document.getElementById('preferences'); + var prefform = document.getElementById('preferences'); if(!prefform || !document.createElement) return; if(prefform.nodeName.toLowerCase() == 'a') return; // Occasional IE problem prefform.className = prefform.className + 'jsprefs'; @@ -116,12 +116,13 @@ function tabbedprefs() { children = prefform.childNodes; var seci = 0; for(i=0;i li.selected { + top: 0; } #preftoc a, #preftoc a:active { display: block; - color: #0014a6; + color: #000; + padding: 0 .7em; + position: relative; +} +#preftoc li.selected a { + cursor: default; + text-decoration: none; } #prefcontrol { - clear: both; - float: left; - margin-top: 1em; + padding-top: 2em; +} +#preferences { + margin: 0; + border: 1px solid #aaa; + clear: left; + padding: 1.5em; + background-color: #F9F9F9; +} +.prefsection { + border: none; + padding: 0; + margin: 0; +} +.prefsection table, .prefsection legend { + background-color: #F9F9F9; +} +.mainLegend { + display: none; } div.prefsectiontip { font-size: 95%; - margin-top: 1em; + margin-top: 0; + background-color: #FFC1C1; + padding: .2em .7em; +} +.btnSavePrefs { + font-weight: bold; +} + +.preferences-save-success { + border: 2px solid green; + color: #000; + padding: .5em 1.2em; + background-color: #ddffdd; + float: left; + margin-bottom: 1em; } -fieldset.operaprefsection { - margin-left: 15em; + +.preferences-login { + clear: both; + margin-bottom: 1.5em; } /* -- 2.20.1